From 6fc61bf84d9d8537eed41393426b4b9f1121fb47 Mon Sep 17 00:00:00 2001 From: jixinbao Date: Fri, 1 Nov 2024 13:11:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(picker-view):=20=E8=B0=83=E6=95=B4=E5=85=B6?= =?UTF-8?q?=E4=BB=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/picker-view/picker-view.test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/component/picker-view/picker-view.test.js b/pages/component/picker-view/picker-view.test.js index 95c4620d..dd2049a3 100644 --- a/pages/component/picker-view/picker-view.test.js +++ b/pages/component/picker-view/picker-view.test.js @@ -31,7 +31,7 @@ describe('PickerView.uvue', () => { const newValue1 = await pickerViewEl.property('value') // TODO - expect(newValue1.toString()).toEqual('0,0,0') + expect(newValue1.toString()).toEqual('0,1,30') if (process.env.UNI_PLATFORM === 'app-android') { expect(await page.data('result')).toEqual([0, 0, 0]) } @@ -115,15 +115,15 @@ describe('PickerView.uvue', () => { await page.waitFor(500) page = await program.navigateTo(PAGE_PATH) await page.waitFor(500) - const date = new Date() + const { year, month, day } = await page.data() - expect(year).toEqual(date.getFullYear()) - expect(month).toEqual(date.getMonth() + 1) - expect(day).toEqual(date.getDate()) + expect(year).toEqual(2018) + expect(month).toEqual(1) + expect(day).toEqual(12) }) it('trigger UniPickerViewChangeEvent', async () => { -- GitLab