From 2d75a04aa6a1c35a58c73ee2153ce5fae407c132 Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Wed, 24 Jan 2024 22:02:33 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E4=BF=AE=E5=A4=8D=20firefox=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=85=BC=E5=AE=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/directive/v-bind/v-bind-style.test.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pages/directive/v-bind/v-bind-style.test.js b/pages/directive/v-bind/v-bind-style.test.js index a55aa3e..9f2d403 100644 --- a/pages/directive/v-bind/v-bind-style.test.js +++ b/pages/directive/v-bind/v-bind-style.test.js @@ -1,6 +1,7 @@ const PAGE_PATH = '/pages/directive/v-bind/v-bind-style' describe('v-bind-style', () => { + const isFirefox = process.env.uniTestPlatformInfo.indexOf('firefox') > -1 let page beforeAll(async () => { page = await program.reLaunch(PAGE_PATH) @@ -16,9 +17,9 @@ describe('v-bind-style', () => { } else { expect(await view.style('backgroundColor')).toBe('#008000') } - expect(await view.style('borderWidth')).toBe('2px') - if(process.env.uniTestPlatformInfo.startsWith('web')) { - expect(await view.style('borderColor')).toBe('rgb(0, 0, 255)') + expect(await view.style(isFirefox ? 'borderTopWidth' : 'borderWidth')).toBe('2px') + if (process.env.uniTestPlatformInfo.startsWith('web')) { + expect(await view.style(isFirefox ? 'borderTopColor' : 'borderColor')).toBe('rgb(0, 0, 255)') } else { expect(await view.style('borderColor')).toBe('#0000FF') } -- GitLab