提交 1f15f0b1 编写于 作者: M mahaifeng

[filemanager]修改测试用例

上级 fe7c408e
...@@ -1411,7 +1411,7 @@ describe('ExtApi-FileManagerTest', () => { ...@@ -1411,7 +1411,7 @@ describe('ExtApi-FileManagerTest', () => {
console.log('ftruncateFileTest', '7') console.log('ftruncateFileTest', '7')
}); });
//testAppendFileBuffer //testAppendFileBuffer
it('testAppendFileBuffer', async () => { it('testAppendFileBuffer', async () => {
if (!isAndroid()) { if (!isAndroid()) {
return return
...@@ -1421,66 +1421,66 @@ describe('ExtApi-FileManagerTest', () => { ...@@ -1421,66 +1421,66 @@ describe('ExtApi-FileManagerTest', () => {
await btnWrite.tap() await btnWrite.tap()
await isDone() await isDone()
let arrayBufferRes = await getData("arrayBufferRes") let arrayBufferRes = await getData("arrayBufferRes")
expect(bytesWritten).toEqual(21) expect(arrayBufferRes).toEqual(21)
}); });
it('testAppendFileBufferSync', async () => { it('testAppendFileBufferSync', async () => {
if (!isAndroid()) { if (!isAndroid()) {
return return
} }
var btnWrite = await page.$('#btn-appendfilesync-buffer') var btnWrite = await page.$('#btn-appendfilesync-buffer')
await btnWrite.tap() await btnWrite.tap()
await isDone() await isDone()
let arrayBufferRes = await getData("arrayBufferRes") let arrayBufferRes = await getData("arrayBufferRes")
expect(bytesWritten).toEqual(20) expect(arrayBufferRes).toEqual(20)
}); });
it('testWriteReadSyncBuffer', async () => { it('testWriteReadSyncBuffer', async () => {
if (!isAndroid()) { if (!isAndroid()) {
return return
} }
var btnWrite = await page.$('#btn-writereadsync-buffer') var btnWrite = await page.$('#btn-writereadsync-buffer')
await btnWrite.tap() await btnWrite.tap()
await isDone() await isDone()
let arrayBufferRes = await getData("arrayBufferRes") let arrayBufferRes = await getData("arrayBufferRes")
expect(bytesWritten).toEqual(1.11) expect(arrayBufferRes).toEqual(1.11)
}); });
it('testWriteReadBuffer', async () => { it('testWriteReadBuffer', async () => {
if (!isAndroid()) { if (!isAndroid()) {
return return
} }
var btnWrite = await page.$('#btn-writeread-buffer') var btnWrite = await page.$('#btn-writeread-buffer')
await btnWrite.tap() await btnWrite.tap()
await isDone() await isDone()
let arrayBufferRes = await getData("arrayBufferRes") let arrayBufferRes = await getData("arrayBufferRes")
expect(bytesWritten).toEqual(1.24) expect(arrayBufferRes).toEqual(1.24)
}); });
it('testWriteReadFileSyncBuffer', async () => { it('testWriteReadFileSyncBuffer', async () => {
if (!isAndroid()) { if (!isAndroid()) {
return return
} }
var btnWrite = await page.$('#btn-writereadfilesync-buffer') var btnWrite = await page.$('#btn-writereadfilesync-buffer')
await btnWrite.tap() await btnWrite.tap()
await isDone() await isDone()
let arrayBufferRes = await getData("arrayBufferRes") let arrayBufferRes = await getData("arrayBufferRes")
expect(bytesWritten).toEqual(1.333) expect(arrayBufferRes).toEqual(1.333)
}); });
it('testReadFileBuffer', async () => { it('testReadFileBuffer', async () => {
if (!isAndroid()) { if (!isAndroid()) {
return return
} }
var btnWrite = await page.$('#btn-writereadfile-buffer') var btnWrite = await page.$('#btn-writereadfile-buffer')
await btnWrite.tap() await btnWrite.tap()
await isDone() await isDone()
let arrayBufferRes = await getData("arrayBufferRes") let arrayBufferRes = await getData("arrayBufferRes")
expect(bytesWritten).toEqual(1.2222222) expect(arrayBufferRes).toEqual(1.2222222)
}); });
}); });
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册