提交 1c4929b2 编写于 作者: W WOSHIMAHAIFENG

修改file测试用例超时问题

上级 aeb77f2e
......@@ -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('')
});
......
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册