diff --git a/pages.json b/pages.json index 80ad54f89cb164a20eb017f403edc2533a899c50..a5a462939edcd9076da8552a2ca58777023a0bcd 100644 --- a/pages.json +++ b/pages.json @@ -283,32 +283,32 @@ } }, { - "path": "pages/component/unicloud-db/unicloud-db", + "path": "pages/component/unicloud-db/unicloud-db/contacts/list", "style": { "navigationBarTitleText": "联系人", "enablePullDownRefresh": true } }, { - "path": "pages/component/unicloud-db/add", + "path": "pages/component/unicloud-db/unicloud-db/contacts/add", "style": { "navigationBarTitleText": "新增联系人" } }, { - "path": "pages/component/unicloud-db/edit", + "path": "pages/component/unicloud-db/unicloud-db/contacts/edit", "style": { "navigationBarTitleText": "编辑联系人" } }, { - "path": "pages/component/unicloud-db/detail", + "path": "pages/component/unicloud-db/unicloud-db/contacts/detail", "style": { "navigationBarTitleText": "" } }, { - "path": "pages/component/unicloud-db/unicloud-db/mixin-datacom", + "path": "pages/component/unicloud-db/unicloud-db/mixin-datacom/mixin-datacom", "style": { "navigationBarTitleText": "mixinDatacom" } @@ -886,14 +886,14 @@ // #endif // #ifdef APP || WEB { - "path": "pages/API/request-payment-uni-pay/request-payment-uni-pay", + "path": "pages/API/request-payment/request-payment/request-payment-uni-pay", "style": { "navigationBarTitleText": "uni-pay示例", "enablePullDownRefresh": false } }, { - "path": "pages/API/request-payment-uni-pay/order-detail", + "path": "pages/API/request-payment/request-payment/order-detail", "style": { "navigationBarTitleText": "订单详情示例", "enablePullDownRefresh": false diff --git a/pages/API/request-payment-uni-pay/order-detail.uvue b/pages/API/request-payment/request-payment/order-detail.uvue similarity index 100% rename from pages/API/request-payment-uni-pay/order-detail.uvue rename to pages/API/request-payment/request-payment/order-detail.uvue diff --git a/pages/API/request-payment-uni-pay/request-payment-uni-pay.uvue b/pages/API/request-payment/request-payment/request-payment-uni-pay.uvue similarity index 100% rename from pages/API/request-payment-uni-pay/request-payment-uni-pay.uvue rename to pages/API/request-payment/request-payment/request-payment-uni-pay.uvue diff --git a/pages/API/unicloud-call-function/unicloud-call-function.test.js b/pages/API/unicloud-call-function/unicloud-call-function.test.js deleted file mode 100644 index 2917aef6f27db4e672ea04f5e87469588d60b3de..0000000000000000000000000000000000000000 --- a/pages/API/unicloud-call-function/unicloud-call-function.test.js +++ /dev/null @@ -1,33 +0,0 @@ -const PAGE_PATH = '/pages/API/unicloud-call-function/unicloud-call-function' - -describe('unicloud-call-function', () => { - let page - beforeAll(async () => { - page = await program.reLaunch(PAGE_PATH) - await page.waitFor(500) - await page.setData({ - isUniTest: true - }) - }) - - it('callFunction', async () => { - await page.callMethod('callFunction') - const { - callFunctionResult, - callFunctionError, - } = await page.data() - console.error(callFunctionResult) - console.error(callFunctionError) - expect(callFunctionResult['showMessage']).toBe("Hello uniCloud function") - expect(callFunctionResult['event']['num']).toBe(1) - expect(callFunctionResult['event']['str']).toBe('ABC') - }) - - it('callFunctionWithGeneric', async () => { - await page.callMethod('callFunctionWithGeneric') - const { - genericDemoShowMessage, - } = await page.data() - expect(genericDemoShowMessage).toBe("Hello uniCloud function") - }) -}) diff --git a/pages/API/unicloud-call-function/unicloud-call-function.uvue b/pages/API/unicloud-call-function/unicloud-call-function.uvue deleted file mode 100644 index 58f3284106c118e22183ecdd96e6304fcec4eb18..0000000000000000000000000000000000000000 --- a/pages/API/unicloud-call-function/unicloud-call-function.uvue +++ /dev/null @@ -1,108 +0,0 @@ - - - - - diff --git a/pages/API/unicloud-database/unicloud-database.uvue b/pages/API/unicloud-database/unicloud-database.uvue deleted file mode 100644 index f37730e2ee561ff5eab5fe85bc0cd33da99b4733..0000000000000000000000000000000000000000 --- a/pages/API/unicloud-database/unicloud-database.uvue +++ /dev/null @@ -1,322 +0,0 @@ - - - - - diff --git a/pages/API/unicloud-import-object/unicloud-import-object.uvue b/pages/API/unicloud-import-object/unicloud-import-object.uvue deleted file mode 100644 index 1b71ea1ea97b4217f82888c7612a2f2ee76eb94a..0000000000000000000000000000000000000000 --- a/pages/API/unicloud-import-object/unicloud-import-object.uvue +++ /dev/null @@ -1,161 +0,0 @@ - - - - - diff --git a/pages/API/unicloud/unicloud/call-function.test.js b/pages/API/unicloud/unicloud/call-function.test.js index acd034b692cd443538da940e26c1ad951b3fc5c9..65d0cf040c99808687dec581d31ec3ea350d58cc 100644 --- a/pages/API/unicloud/unicloud/call-function.test.js +++ b/pages/API/unicloud/unicloud/call-function.test.js @@ -1,4 +1,4 @@ -const PAGE_PATH = '/pages/API/call-function/call-function' +const PAGE_PATH = '/pages/API/unicloud/unicloud/call-function' describe('unicloud-call-function', () => { let page diff --git a/pages/API/unicloud-import-object/unicloud-import-object.test.js b/pages/API/unicloud/unicloud/cloud-object.test.js similarity index 93% rename from pages/API/unicloud-import-object/unicloud-import-object.test.js rename to pages/API/unicloud/unicloud/cloud-object.test.js index 46fbf87ca1c953642d4af7da22f7b7998e43d954..ec731d2015ef2eb00f0c7676f063e4a85baa1eaf 100644 --- a/pages/API/unicloud-import-object/unicloud-import-object.test.js +++ b/pages/API/unicloud/unicloud/cloud-object.test.js @@ -1,4 +1,4 @@ -const PAGE_PATH = '/pages/API/unicloud-import-object/unicloud-import-object' +const PAGE_PATH = '/pages/API/unicloud/unicloud/cloud-object' describe('unicloud-import-object', () => { let page diff --git a/pages/API/unicloud-database/unicloud-database.test.js b/pages/API/unicloud/unicloud/database.test.js similarity index 95% rename from pages/API/unicloud-database/unicloud-database.test.js rename to pages/API/unicloud/unicloud/database.test.js index cec19a63b982c7d2461344fa0bb682f917934fb4..d268f97dee8d42e1bf179fbae29d8125f4607eb5 100644 --- a/pages/API/unicloud-database/unicloud-database.test.js +++ b/pages/API/unicloud/unicloud/database.test.js @@ -1,4 +1,4 @@ -const PAGE_PATH = '/pages/API/unicloud-database/unicloud-database' +const PAGE_PATH = '/pages/API/unicloud/unicloud/database' describe('unicloud-database', () => { let page diff --git a/pages/API/websocket/websocket-socketTask.test.js b/pages/API/websocket/websocket-socketTask.test.js new file mode 100644 index 0000000000000000000000000000000000000000..0b53e85d85e748df3d717d9f88b7ed339a81f9dd --- /dev/null +++ b/pages/API/websocket/websocket-socketTask.test.js @@ -0,0 +1,18 @@ +const PAGE_PATH = '/pages/API/websocket/websocket-socketTask' + +describe('ExtApi-WebSocket', () => { + + let page; + let res; + beforeAll(async () => { + page = await program.reLaunch(PAGE_PATH) + await page.waitFor(600); + await page.callMethod('jest_connectSocket'); + await page.waitFor(1500); + res = await page.data('jest_result'); + }); + + it('Check ', async () => { + expect(res).toBe(2); + }); +}); diff --git a/pages/component/unicloud-db/add.uvue b/pages/component/unicloud-db/add.uvue deleted file mode 100644 index fd216944c21d71a025443996c04b3241c6c69171..0000000000000000000000000000000000000000 --- a/pages/component/unicloud-db/add.uvue +++ /dev/null @@ -1,117 +0,0 @@ -