提交 0c2b06ca 编写于 作者: W WOSHIMAHAIFENG

修改file测试用例

上级 4ce0fbbe
......@@ -1156,6 +1156,7 @@ describe('ExtApi-FileManagerTest', () => {
if (!isAndroid()) {
return
}
console.log('saveFileSyncTest', 'start')
let globalTempPath = await getData('globalTempPath')
let basePath = await getData('basePath')
await page.setData({
......@@ -1163,6 +1164,7 @@ describe('ExtApi-FileManagerTest', () => {
basePath: basePath
})
await clearDir('')
console.log('saveFileSyncTest', '1')
await page.setData({
logAble: false,
basePath: globalTempPath,
......@@ -1172,6 +1174,7 @@ describe('ExtApi-FileManagerTest', () => {
accessFile: '2.txt'
})
await createFile()
console.log('saveFileSyncTest', '2')
await page.setData({
basePath: basePath,
writeFile: 'save/2.txt',
......@@ -1181,6 +1184,7 @@ describe('ExtApi-FileManagerTest', () => {
let btnRemoveSavedFileRet = await page.$('#btn-remove-saved-file')
await btnRemoveSavedFileRet.tap()
await isDone()
console.log('saveFileSyncTest', '3')
let removeSavedFileRet = await getData("removeSavedFileRet")
expect(removeSavedFileRet).toEqual('removeSavedFile:ok')
......@@ -1188,6 +1192,7 @@ describe('ExtApi-FileManagerTest', () => {
removeSavedFileRet: ''
})
await clearDir('')
console.log('saveFileSyncTest', '4')
});
it('getSavedFileListTest',
......
......@@ -132,7 +132,7 @@
fd: '',
closeFileRet: '',
bytesWritten: 0,
fstat: new Stats(),
fstat: null as Stats | null,
ftruncateRet: '',
readZipFile: 'to.zip',
getSavedFileListRet:'',
......@@ -924,13 +924,13 @@
this.log += 'removeSavedFileTest success:' + JSON.stringify(res) + '\n\n'
}
this.removeSavedFileRet = res.errMsg
console.log("removeSavedFileTest success", res)
console.error("removeSavedFileTest success", res)
},
fail: (res : UniError) => {
if (this.logAble) {
this.log += 'removeSavedFileTest fail:' + JSON.stringify(res) + '\n\n'
}
console.log('removeSavedFileTest fail', res)
console.error('removeSavedFileTest fail', res)
},
complete: (_) => {
this.done = true
......
......@@ -138,7 +138,6 @@
this.isTransitionstyleBackground = !this.isTransitionstyleBackground
},
changeBackground2() {
console.log(aa)
this.styleBackground2?.style?.setProperty("background-color", this.isTransitionstyleBackground
? 'brown'
: 'rgba(0, 0, 0, 0.5);'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册