diff --git a/pages/API/get-app/get-app.uvue b/pages/API/get-app/get-app.uvue index 4fc32f471ce4f80bfd0f58a017dc201ae0880b13..bd31778c94c4a016fc4162813287019ab054d426 100644 --- a/pages/API/get-app/get-app.uvue +++ b/pages/API/get-app/get-app.uvue @@ -204,7 +204,7 @@ app.emit('fn3', null) const res = num == 6 - console.log('checkEventBus', res) + console.log('check eventBus', res) return res }, checkGetAndroidApplication() : boolean { @@ -216,7 +216,7 @@ // #ifndef APP-ANDROID const res = androidApplication == null // #endif - console.log('checkGetAndroidApplication', res) + console.log('check getAndroidApplication', res) return res } }, diff --git a/pages/API/get-current-pages/get-current-pages.test.js b/pages/API/get-current-pages/get-current-pages.test.js index 7e377cb849f66e5350198efd2492d5df997bd4be..fe8113428119090b24b469b566d855ceb8c8d85c 100644 --- a/pages/API/get-current-pages/get-current-pages.test.js +++ b/pages/API/get-current-pages/get-current-pages.test.js @@ -1,5 +1,5 @@ const HOME_PAGE_PATH = '/pages/tabBar/component' -const PAGE_PATH = '/pages/API/get-current-pages/get-current-pages' +const PAGE_PATH = '/pages/API/get-current-pages/get-current-pages?test=123' describe('getCurrentPages', () => { let page @@ -25,8 +25,6 @@ describe('getCurrentPages', () => { expect(data.checked).toBe(true) }) it('page-style', async () => { - page = await program.navigateTo(PAGE_PATH) - await page.callMethod('getPageStyle') await page.waitFor(200) const isEnablePullDownRefresh1 = (await page.data()).currentPageStyle.enablePullDownRefresh @@ -63,4 +61,29 @@ describe('getCurrentPages', () => { return 'get-current-pages-test-js-get-current-pages-page-style-after-set-page-style' }}); }) + it('$page', async () => { + await page.setData({testing: true}) + const res = await page.callMethod('check$page') + expect(res).toBe(true) + }) + it('eventBus', async () => { + const res = await page.callMethod('checkEventBus') + expect(res).toBe(true) + }) + it('getParentPage', async () => { + const res = await page.callMethod('checkGetParentPage') + expect(res).toBe(true) + }) + it('getDialogPages', async () => { + const res = await page.callMethod('checkGetDialogPages') + expect(res).toBe(true) + }) + it('getElementById', async () => { + const res = await page.callMethod('checkGetElementById') + expect(res).toBe(true) + }) + it('getAndroidView', async () => { + const res = await page.callMethod('checkGetAndroidView') + expect(res).toBe(true) + }) }) diff --git a/pages/API/get-current-pages/get-current-pages.uvue b/pages/API/get-current-pages/get-current-pages.uvue index 3e66d8f390cbedbc893e95475ec04d9551509c8b..67901a7a4e7ad7438f80cf4ec5985fbd7b2d6258 100644 --- a/pages/API/get-current-pages/get-current-pages.uvue +++ b/pages/API/get-current-pages/get-current-pages.uvue @@ -12,8 +12,16 @@ index: {{ index }}, route: {{ page.route }} + + + + + + +