From 9d7191de8a93a6a885b3511e6fcbfe26996f3d25 Mon Sep 17 00:00:00 2001 From: hdx Date: Fri, 26 Jan 2024 17:12:30 +0800 Subject: [PATCH] =?UTF-8?q?button.test:=20=E8=B0=83=E6=95=B4=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96=E6=B5=8B=E8=AF=95=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/button/button.test.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/pages/component/button/button.test.js b/pages/component/button/button.test.js index 7fb1a908..ab21e798 100644 --- a/pages/component/button/button.test.js +++ b/pages/component/button/button.test.js @@ -56,19 +56,25 @@ describe('Button.uvue', () => { expect(await btn.property('size')).toBe('mini') }) it('plain', async () => { - const btn = await page.$('.btn') - expect(await btn.property('plain')).toBe(false) + const btn = await page.$('.btn') + // TODO + const newValue1 = await btn.property('plain') + expect(newValue1.toString()).toBe(false + '') await page.setData({ plain_boolean: true, - }) - expect(await btn.property('plain')).toBe(true) + }) + const newValue2 = await btn.property('plain') + expect(newValue2.toString()).toBe(true + '') }) it('disabled', async () => { - const btn = await page.$('.btn') - expect(await btn.property('disabled')).toBe(false) + const btn = await page.$('.btn') + // TODO + const newValue1 = await btn.property('disabled') + expect(newValue1.toString()).toBe(false + '') await page.setData({ disabled_boolean: true, - }) - expect(await btn.property('disabled')).toBe(true) + }) + const newValue2 = await btn.property('disabled') + expect(newValue2.toString()).toBe(true + '') }) }) -- GitLab