diff --git a/pages/API/get-file-system-manager/get-file-system-manager.test.js b/pages/API/get-file-system-manager/get-file-system-manager.test.js index 7870ea3f627c3b52947faef77376a3535cf1b4f4..8c92a1e37d36dff5289d56bbd64ac1e5ce59f97b 100644 --- a/pages/API/get-file-system-manager/get-file-system-manager.test.js +++ b/pages/API/get-file-system-manager/get-file-system-manager.test.js @@ -1156,7 +1156,7 @@ describe('ExtApi-FileManagerTest', () => { return } - + console.log('start saveFileSyncTest') let globalTempPath = await getData('globalTempPath') let basePath = await getData('basePath') await page.setData({ @@ -1164,6 +1164,7 @@ describe('ExtApi-FileManagerTest', () => { basePath: basePath }) await clearDir('') + console.log('end saveFileSyncTest1') await page.setData({ logAble: false, basePath: globalTempPath, @@ -1173,22 +1174,26 @@ describe('ExtApi-FileManagerTest', () => { accessFile: '2.txt' }) await createFile() + console.log('end saveFileSyncTest2') await page.setData({ basePath: basePath, writeFile: 'save/2.txt', }) btnSaveFile = await page.$('#btn-save-file-sync') await btnSaveFile.tap() - + console.log('end saveFileSyncTest3') let btnRemoveSavedFileRet = await page.$('#btn-remove-saved-file') await btnRemoveSavedFileRet.tap() + await isDone() + console.log('end saveFileSyncTest4') + let removeSavedFileRet = await getData("removeSavedFileRet") expect(removeSavedFileRet).toEqual('removeSavedFile:ok') - await isDone() await page.setData({ removeSavedFileRet: '' }) await clearDir('') + console.log('end saveFileSyncTest') }); it('getSavedFileListTest', @@ -1224,8 +1229,8 @@ describe('ExtApi-FileManagerTest', () => { let btnSavedFileList = await page.$('#btn-getsaved-filelist') await btnSavedFileList.tap() await isDone() - let fileListSuccess = await getData("fileListSuccess") - expect(fileListSuccess.length > 0).toEqual(true) + let fileListSuccess = await getData("getSavedFileListRet") + expect(fileListSuccess).toEqual('getSavedFileList:ok') await clearDir('') }); diff --git a/pages/API/get-file-system-manager/get-file-system-manager.uvue b/pages/API/get-file-system-manager/get-file-system-manager.uvue index a09ce29d1dc6f5534bff76ffcdc5c5078e9f9ed5..cd3465e83ae76c90419ffb078180cf9cbacdb88f 100644 --- a/pages/API/get-file-system-manager/get-file-system-manager.uvue +++ b/pages/API/get-file-system-manager/get-file-system-manager.uvue @@ -135,6 +135,7 @@ fstat: new Stats(), ftruncateRet: '', readZipFile: 'to.zip', + getSavedFileListRet:'', /** * 待测试的全局环境变量 */ @@ -812,6 +813,7 @@ } console.log("getSavedFileListTest success", res) this.fileListSuccess = res.fileList + this.getSavedFileListRet = "getSavedFileList:ok" }, fail: (res : UniError) => { if (this.logAble) {