提交 76bd7734 编写于 作者: shutao-dc's avatar shutao-dc

web暂不支持checkUniButtonElement测试例

上级 51d5c9ff
...@@ -56,30 +56,34 @@ describe('Button.uvue', () => { ...@@ -56,30 +56,34 @@ 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')
// TODO // TODO
const newValue1 = await btn.property('plain') const newValue1 = await btn.property('plain')
expect(newValue1.toString()).toBe(false + '') expect(newValue1.toString()).toBe(false + '')
await page.setData({ await page.setData({
plain_boolean: true, plain_boolean: true,
}) })
const newValue2 = await btn.property('plain') const newValue2 = await btn.property('plain')
expect(newValue2.toString()).toBe(true + '') expect(newValue2.toString()).toBe(true + '')
}) })
it('disabled', async () => { it('disabled', async () => {
const btn = await page.$('.btn') const btn = await page.$('.btn')
// TODO // TODO
const newValue1 = await btn.property('disabled') const newValue1 = await btn.property('disabled')
expect(newValue1.toString()).toBe(false + '') expect(newValue1.toString()).toBe(false + '')
await page.setData({ await page.setData({
disabled_boolean: true, disabled_boolean: true,
}) })
const newValue2 = await btn.property('disabled') const newValue2 = await btn.property('disabled')
expect(newValue2.toString()).toBe(true + '') expect(newValue2.toString()).toBe(true + '')
}) })
it("checkUniButtonElement", async () => { it("checkUniButtonElement", async () => {
const value = await page.callMethod('checkUniButtonElement') if (process.env.uniTestPlatformInfo.startsWith('web')) {
expect(value).toBe(true) expect(1).toBe(1)
return
}
const value = await page.callMethod('checkUniButtonElement')
expect(value).toBe(true)
}) })
}) })
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册