提交 7cf636cc 编写于 作者: W WOSHIMAHAIFENG

修改file测试用例

上级 a5eed7c5
...@@ -1185,14 +1185,14 @@ describe('ExtApi-FileManagerTest', () => { ...@@ -1185,14 +1185,14 @@ describe('ExtApi-FileManagerTest', () => {
await btnRemoveSavedFileRet.tap() await btnRemoveSavedFileRet.tap()
await isDone() await isDone()
console.log('saveFileSyncTest', '3') console.log('saveFileSyncTest', '3')
let removeSavedFileRet = await getData("removeSavedFileRet") let removeSavedFileRet = await getData("removeSavedFileRet")
console.log('saveFileSyncTest', '4')
expect(removeSavedFileRet).toEqual('removeSavedFile:ok') expect(removeSavedFileRet).toEqual('removeSavedFile:ok')
console.log('saveFileSyncTest', '5')
await page.setData({ await page.setData({
removeSavedFileRet: '' removeSavedFileRet: ''
}) })
await clearDir('') console.log('saveFileSyncTest', '6')
console.log('saveFileSyncTest', '4')
}); });
it('getSavedFileListTest', it('getSavedFileListTest',
...@@ -1208,7 +1208,9 @@ describe('ExtApi-FileManagerTest', () => { ...@@ -1208,7 +1208,9 @@ describe('ExtApi-FileManagerTest', () => {
logAble: false, logAble: false,
basePath: basePath basePath: basePath
}) })
await clearDir('') // console.log('getSavedFileListTest', 'start')
// await clearDir('')
// console.log('getSavedFileListTest', 'end')
await page.setData({ await page.setData({
logAble: false, logAble: false,
basePath: globalTempPath, basePath: globalTempPath,
...@@ -1230,8 +1232,6 @@ describe('ExtApi-FileManagerTest', () => { ...@@ -1230,8 +1232,6 @@ describe('ExtApi-FileManagerTest', () => {
await isDone() await isDone()
let fileListSuccess = await getData("getSavedFileListRet") let fileListSuccess = await getData("getSavedFileListRet")
expect(fileListSuccess).toEqual('getSavedFileList:ok') expect(fileListSuccess).toEqual('getSavedFileList:ok')
await clearDir('')
}); });
it('removeSavedFileTest', it('removeSavedFileTest',
...@@ -1270,7 +1270,6 @@ describe('ExtApi-FileManagerTest', () => { ...@@ -1270,7 +1270,6 @@ describe('ExtApi-FileManagerTest', () => {
await isDone() await isDone()
let removeSavedFileRet = await getData("removeSavedFileRet") let removeSavedFileRet = await getData("removeSavedFileRet")
expect(removeSavedFileRet).toEqual('removeSavedFile:ok') expect(removeSavedFileRet).toEqual('removeSavedFile:ok')
await clearDir('')
}); });
//openFiletest openFileSynctest closeTest closeTestSync writeTest writeSyncTest //openFiletest openFileSynctest closeTest closeTestSync writeTest writeSyncTest
...@@ -1280,7 +1279,7 @@ describe('ExtApi-FileManagerTest', () => { ...@@ -1280,7 +1279,7 @@ describe('ExtApi-FileManagerTest', () => {
} }
await clearDir('') // await clearDir('')
await page.setData({ await page.setData({
logAble: false, logAble: false,
mkdirFile: 'fd', mkdirFile: 'fd',
...@@ -1312,7 +1311,7 @@ describe('ExtApi-FileManagerTest', () => { ...@@ -1312,7 +1311,7 @@ describe('ExtApi-FileManagerTest', () => {
} }
await clearDir('') // await clearDir('')
await page.setData({ await page.setData({
logAble: false, logAble: false,
mkdirFile: 'fd', mkdirFile: 'fd',
...@@ -1343,7 +1342,7 @@ describe('ExtApi-FileManagerTest', () => { ...@@ -1343,7 +1342,7 @@ describe('ExtApi-FileManagerTest', () => {
return return
} }
await clearDir('') // await clearDir('')
await page.setData({ await page.setData({
logAble: false, logAble: false,
mkdirFile: 'fd', mkdirFile: 'fd',
...@@ -1418,7 +1417,7 @@ describe('ExtApi-FileManagerTest', () => { ...@@ -1418,7 +1417,7 @@ describe('ExtApi-FileManagerTest', () => {
logAble: false, logAble: false,
basePath: basePath basePath: basePath
}) })
await clearDir('') // await clearDir('')
await page.setData({ await page.setData({
......
...@@ -924,13 +924,13 @@ ...@@ -924,13 +924,13 @@
this.log += 'removeSavedFileTest success:' + JSON.stringify(res) + '\n\n' this.log += 'removeSavedFileTest success:' + JSON.stringify(res) + '\n\n'
} }
this.removeSavedFileRet = res.errMsg this.removeSavedFileRet = res.errMsg
console.error("removeSavedFileTest success", res) console.log("removeSavedFileTest success", res)
}, },
fail: (res : UniError) => { fail: (res : UniError) => {
if (this.logAble) { if (this.logAble) {
this.log += 'removeSavedFileTest fail:' + JSON.stringify(res) + '\n\n' this.log += 'removeSavedFileTest fail:' + JSON.stringify(res) + '\n\n'
} }
console.error('removeSavedFileTest fail', res) console.log('removeSavedFileTest fail', res)
}, },
complete: (_) => { complete: (_) => {
this.done = true this.done = true
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册