diff --git a/pages.json b/pages.json index 2bf06b50b7b123f8d406ac4f6f1ada16af3622a6..c64c934fd032cab9263fb2741dd8ac54037f5418 100644 --- a/pages.json +++ b/pages.json @@ -551,6 +551,13 @@ "navigationBarTitleText": "getLaunchOptionsSync | 获取启动参数" } }, + { + "path": "pages/API/get-enter-options-sync/get-enter-options-sync", + "group": "1,1,4,1", + "style": { + "navigationBarTitleText": "getEnterOptionsSync | 获取启动参数" + } + }, { "path": "pages/API/navigator/navigator", "group": "1,2,0", @@ -2075,6 +2082,10 @@ { "id": "api.base.launch.getLaunchOptionsSync", "name": "getLaunchOptionsSync" + }, + { + "id": "api.base.launch.getEnterOptionsSync", + "name": "getLEnterOptionsSync" } ] }, @@ -2744,4 +2755,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/pages/API/get-enter-options-sync/get-enter-options-sync.test.js b/pages/API/get-enter-options-sync/get-enter-options-sync.test.js new file mode 100644 index 0000000000000000000000000000000000000000..e5c7cac94f5e4082a036f236427087cb04581fb2 --- /dev/null +++ b/pages/API/get-enter-options-sync/get-enter-options-sync.test.js @@ -0,0 +1,23 @@ +const PAGE_PATH = '/pages/API/get-enter-options-sync/get-enter-options-sync' + +describe('getEnterOptionsSync', () => { + it('getEnterOptionsSync', async () => { + const page = await program.navigateTo(PAGE_PATH) + await page.waitFor('view') + await page.callMethod('getEnterOptionsSync') + const data = await page.data() + expect(data.checked).toBe(true) + }) + + it('app onShow 和 getEnterOptionsSync 结果一致', async () => { + const page = await program.navigateTo(PAGE_PATH) + await page.waitFor('view') + const res = await page.callMethod('compareOnShowRes') + + if (process.env.uniTestPlatformInfo.toLowerCase().startsWith('android')) { + // if android return + expect(true).toBe(true) + } + expect(res.appOnShow).toEqual(res.onShowOption) + }) +}) diff --git a/pages/API/get-enter-options-sync/get-enter-options-sync.uvue b/pages/API/get-enter-options-sync/get-enter-options-sync.uvue new file mode 100644 index 0000000000000000000000000000000000000000..bd2b77d5c044796d4dd51282b57d10b7fa6d60f6 --- /dev/null +++ b/pages/API/get-enter-options-sync/get-enter-options-sync.uvue @@ -0,0 +1,61 @@ + + +