From 425161ed720463634e1cfcc072dba7a530825c09 Mon Sep 17 00:00:00 2001 From: yinjiacheng Date: Fri, 11 Oct 2024 19:49:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0text=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/text/text-props.test.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pages/component/text/text-props.test.js b/pages/component/text/text-props.test.js index 2ec93d6d..510f7b56 100644 --- a/pages/component/text/text-props.test.js +++ b/pages/component/text/text-props.test.js @@ -26,15 +26,14 @@ describe('text-props', () => { await page.waitFor(100) const element2 = await page.$('#empty-text2') if (element2 != null) { + expect(await element2.text()).toBe('') const { width, height } = await element2.size() expect(width).toBe(0) expect(height).toBe(0) } const element3 = await page.$('#empty-text3') if (element3 != null) { - const { width, height } = await element3.size() - expect(width).toBe(0) - expect(height).toBe(0) + expect(await element3.text()).toBe('') } await page.setData({ autoTest: false -- GitLab