提交 9d7191de 编写于 作者: H hdx

button.test: 调整自动化测试写法

上级 7201a46e
...@@ -56,19 +56,25 @@ describe('Button.uvue', () => { ...@@ -56,19 +56,25 @@ describe('Button.uvue', () => {
expect(await btn.property('size')).toBe('mini') expect(await btn.property('size')).toBe('mini')
}) })
it('plain', async () => { it('plain', async () => {
const btn = await page.$('.btn') const btn = await page.$('.btn')
expect(await btn.property('plain')).toBe(false) // TODO
const newValue1 = await btn.property('plain')
expect(newValue1.toString()).toBe(false + '')
await page.setData({ await page.setData({
plain_boolean: true, plain_boolean: true,
}) })
expect(await btn.property('plain')).toBe(true) const newValue2 = await btn.property('plain')
expect(newValue2.toString()).toBe(true + '')
}) })
it('disabled', async () => { it('disabled', async () => {
const btn = await page.$('.btn') const btn = await page.$('.btn')
expect(await btn.property('disabled')).toBe(false) // TODO
const newValue1 = await btn.property('disabled')
expect(newValue1.toString()).toBe(false + '')
await page.setData({ await page.setData({
disabled_boolean: true, disabled_boolean: true,
}) })
expect(await btn.property('disabled')).toBe(true) const newValue2 = await btn.property('disabled')
expect(newValue2.toString()).toBe(true + '')
}) })
}) })
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册