diff --git a/pages.json b/pages.json index 3d3004afbbb47e51543a7ea40536ebec9c6d92ef..842f5b9f0cbaabf750bf175a33d0f3e44d989918 100644 --- a/pages.json +++ b/pages.json @@ -1379,6 +1379,13 @@ "navigationBarTitleText": "nested-scroll-body" } }, + { + "path": "pages/component/list-view/issue-2199", + "style": { + "navigationBarTitleText": "issue-2199", + "enablePullDownRefresh": false + } + }, // #ifdef APP || WEB { "path": "pages/API/request-payment/request-payment", diff --git a/pages/API/map/map.test.js b/pages/API/map/map.test.js index 4f19a170c32579d98c03ac237c0fc7b9a7d3dcf6..727866f6b68300ded824230a4aea9397e0d6e143 100644 --- a/pages/API/map/map.test.js +++ b/pages/API/map/map.test.js @@ -41,11 +41,13 @@ describe('web-map', () => { await page.callMethod('handleGetRegion') await page.waitFor(500); const regionRes = await page.data('getRegionTest') - const getRegionExpected = { - southwest: { latitude: 39.88334279187766, longitude: 116.31050146728515 }, - northeast: { latitude: 40.0149408585477, longitude: 116.56799353271484 }, - errMsg: 'getRegion:ok' - } - expect(regionRes).toEqual(expect.objectContaining(getRegionExpected)); + console.log('regionRes', regionRes); + const {southwest,northeast} = regionRes; + const southwestExp ={ latitude: 39.88334279187766, longitude: 116.31050146728515 } + const northeastExp ={ latitude: 40.0149408585477, longitude: 116.56799353271484 } + expect(southwest.latitude).toBeCloseTo(southwestExp.latitude, 3); + expect(southwest.longitude).toBeCloseTo(southwestExp.longitude, 3); + expect(northeast.latitude).toBeCloseTo(northeastExp.latitude, 3); + expect(northeast.longitude).toBeCloseTo(northeastExp.longitude, 3); }); }); diff --git a/pages/API/navigator/navigator.uvue b/pages/API/navigator/navigator.uvue index 2256e8a18494d7b349a28e702b26c67a088d31ad..0477d3c51370ba7a5e9681b7e6f650f2feda6050 100644 --- a/pages/API/navigator/navigator.uvue +++ b/pages/API/navigator/navigator.uvue @@ -32,7 +32,8 @@ + + @@ -59,7 +60,18 @@ onLoadTime: 0, onShowTime: 0, onReadyTime: 0, - onHideTime: 0, + onHideTime: 0, + animationTypeList: [ + 'slide-in-right', + 'slide-in-left', + 'slide-in-top', + 'slide-in-bottom', + 'pop-in', + 'fade-in', + 'zoom-out', + 'zoom-fade-out', + 'none', + ] } }, onLoad() { @@ -109,7 +121,31 @@ }, navigateTo() { uni.navigateTo({ - url: '/pages/API/navigator/new-page/new-page-1?data=Hello', + url: '/pages/API/navigator/new-page/new-page-1?data=Hello', + animationType: 'fade-in', + animationDuration: 200, + success(result) { + console.log('navigateTo success', result.errMsg) + // 自动化测试 + setLifeCycleNum(state.lifeCycleNum + 1) + }, + fail(error) { + console.log('navigateTo fail', error.errMsg) + // 自动化测试 + setLifeCycleNum(state.lifeCycleNum - 1) + }, + complete(result) { + console.log('navigateTo complete', result.errMsg) + // 自动化测试 + setLifeCycleNum(state.lifeCycleNum + 1) + }, + }) + }, + navigateToAnimationType(animationType: string) { + uni.navigateTo({ + url: '/pages/API/navigator/new-page/new-page-1?data=Hello', + animationType: animationType, + animationDuration: 200, success(result) { console.log('navigateTo success', result.errMsg) // 自动化测试 diff --git a/pages/component/list-view/issue-2199-item.uvue b/pages/component/list-view/issue-2199-item.uvue new file mode 100644 index 0000000000000000000000000000000000000000..75e3207942b7d5a2b8bd1b20c1f78615987eee9f --- /dev/null +++ b/pages/component/list-view/issue-2199-item.uvue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/component/list-view/issue-2199.test.js b/pages/component/list-view/issue-2199.test.js new file mode 100644 index 0000000000000000000000000000000000000000..eec53ee0f890e878e7c1fcc7ff68b009c8fe1e75 --- /dev/null +++ b/pages/component/list-view/issue-2199.test.js @@ -0,0 +1,15 @@ +describe('issue-2199', () => { + let page + beforeAll(async () => { + page = await program.reLaunch('/pages/component/list-view/issue-2199') + await page.waitFor(600) + }) + + it('screenshot', async () => { + const image = await program.screenshot({ + fullPage: true + }); + expect(image).toSaveImageSnapshot(); + }) + +}) diff --git a/pages/component/list-view/issue-2199.uvue b/pages/component/list-view/issue-2199.uvue new file mode 100644 index 0000000000000000000000000000000000000000..9794072f24e1f1f9ef137c705d70172eada1ece1 --- /dev/null +++ b/pages/component/list-view/issue-2199.uvue @@ -0,0 +1,42 @@ + + + + +