diff --git a/pages/API/unicloud-database/unicloud-database.test.js b/pages/API/unicloud-database/unicloud-database.test.js index 1af7f5da45ecb254753d52d993da7e6dac8daf00..f0be3dfda88c4393846fbaa62d0e36db60b7fae9 100644 --- a/pages/API/unicloud-database/unicloud-database.test.js +++ b/pages/API/unicloud-database/unicloud-database.test.js @@ -10,17 +10,17 @@ describe('unicloud-database', () => { await page.callMethod('dbRemove') await page.waitFor(3000) await page.callMethod('dbAdd') - await page.waitFor(1000) + await page.waitFor(2000) await page.callMethod('dbBatchAdd') - await page.waitFor(1000) + await page.waitFor(2000) await page.callMethod('dbGet') - await page.waitFor(1000) + await page.waitFor(2000) await page.callMethod('dbGetWithCommand') - await page.waitFor(1000) + await page.waitFor(2000) await page.callMethod('dbUpdate') - await page.waitFor(1000) + await page.waitFor(2000) await page.callMethod('dbRemove') - await page.waitFor(1000) + await page.waitFor(2000) const { addId, @@ -32,6 +32,8 @@ describe('unicloud-database', () => { removeDeleted, } = await page.data() + console.error((await page.data()).batchAddinserted) + expect(addId.length > 0).toBe(true) expect(batchAddIds.length).toBe(2) expect(batchAddinserted).toBe(2) @@ -44,9 +46,9 @@ describe('unicloud-database', () => { it('databaseLookup', async () => { await page.callMethod('dbLookupInit') - await page.waitFor(1000) + await page.waitFor(3000) await page.callMethod('dbLookup') - await page.waitFor(1000) + await page.waitFor(2000) const { lookupData diff --git a/pages/API/unicloud-database/unicloud-database.uvue b/pages/API/unicloud-database/unicloud-database.uvue index c11e4b643899ae38ac56cb3d7a64db7fb61b1bcb..0fb2e259601a36ac99b00256a8e5f7f4cd64c723 100644 --- a/pages/API/unicloud-database/unicloud-database.uvue +++ b/pages/API/unicloud-database/unicloud-database.uvue @@ -91,7 +91,7 @@ this.batchAddIds = res.ids this.batchAddinserted = res.inserted uni.showModal({ - content: `新增成功,id列表: ${res.ids.join(',')}`, + content: `新增成功条数${res.inserted}, id列表: ${res.ids.join(',')}`, showCancel: false }) })