diff --git a/pages/component/button/button.test.js b/pages/component/button/button.test.js index dd897ffb62fd380c1541f0edd1e10ff666cb2677..ccd09420ba41febaeeb0bbbeeaf30b8f1065aa10 100644 --- a/pages/component/button/button.test.js +++ b/pages/component/button/button.test.js @@ -56,30 +56,34 @@ describe('Button.uvue', () => { expect(await btn.property('size')).toBe('mini') }) it('plain', async () => { - const btn = await page.$('.btn') - // TODO + const btn = await page.$('.btn') + // TODO const newValue1 = await btn.property('plain') expect(newValue1.toString()).toBe(false + '') await page.setData({ plain_boolean: true, - }) + }) const newValue2 = await btn.property('plain') expect(newValue2.toString()).toBe(true + '') }) it('disabled', async () => { - const btn = await page.$('.btn') - // TODO + const btn = await page.$('.btn') + // TODO const newValue1 = await btn.property('disabled') expect(newValue1.toString()).toBe(false + '') await page.setData({ disabled_boolean: true, - }) + }) const newValue2 = await btn.property('disabled') expect(newValue2.toString()).toBe(true + '') - }) - - it("checkUniButtonElement", async () => { - const value = await page.callMethod('checkUniButtonElement') - expect(value).toBe(true) + }) + + it("checkUniButtonElement", async () => { + if (process.env.uniTestPlatformInfo.startsWith('web')) { + expect(1).toBe(1) + return + } + const value = await page.callMethod('checkUniButtonElement') + expect(value).toBe(true) }) })