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

修改file测试用例

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