未验证 提交 120b9b71 编写于 作者: O openharmony_ci 提交者: Gitee

!4432 修改fileTestCallBack.test.ets、fileTestPromise.test.ets和mediaLibraryTestPromiseOnOff.test.ets文件

Merge pull request !4432 from 王龙飞/master
...@@ -25,20 +25,20 @@ let videoType = mediaLibrary.MediaType.VIDEO; ...@@ -25,20 +25,20 @@ let videoType = mediaLibrary.MediaType.VIDEO;
let audioType = mediaLibrary.MediaType.AUDIO; let audioType = mediaLibrary.MediaType.AUDIO;
let imagesfetchOp = { let imagesfetchOp = {
selections: fileKeyObj.MEDIA_TYPE + '= ?', selections: fileKeyObj.RELATIVE_PATH + '= ? AND ' + fileKeyObj.MEDIA_TYPE + '= ?',
selectionArgs: [imageType.toString()], selectionArgs: ['Pictures/Dynamic01/', imageType.toString()],
}; };
let videosfetchOp = { let videosfetchOp = {
selections: fileKeyObj.MEDIA_TYPE + '= ?', selections: fileKeyObj.RELATIVE_PATH + '= ? AND ' + fileKeyObj.MEDIA_TYPE + '= ?',
selectionArgs: [videoType.toString()], selectionArgs: ['Videos/Dynamic01/', videoType.toString()],
}; };
let audiosfetchOp = { let audiosfetchOp = {
selections: fileKeyObj.MEDIA_TYPE + '= ?', selections: fileKeyObj.RELATIVE_PATH + '= ? AND ' + fileKeyObj.MEDIA_TYPE + '= ?',
selectionArgs: [audioType.toString()], selectionArgs: ['Audios/Dynamic01/', audioType.toString()],
}; };
let filesfetchOp = { let filesfetchOp = {
selections: fileKeyObj.MEDIA_TYPE + '= ?', selections: fileKeyObj.RELATIVE_PATH + '= ? AND ' + fileKeyObj.MEDIA_TYPE + '= ?',
selectionArgs: [fileType.toString()], selectionArgs: ['Documents/Dynamic01/', fileType.toString()],
}; };
function checkAssetAttr(done, attr, testNum, asset, checkType) { function checkAssetAttr(done, attr, testNum, asset, checkType) {
......
...@@ -18,6 +18,7 @@ import featureAbility from '@ohos.ability.featureAbility'; ...@@ -18,6 +18,7 @@ import featureAbility from '@ohos.ability.featureAbility';
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'; import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index';
let fileKeyObj = mediaLibrary.FileKey; let fileKeyObj = mediaLibrary.FileKey;
let fileType = mediaLibrary.MediaType.FILE; let fileType = mediaLibrary.MediaType.FILE;
let imageType = mediaLibrary.MediaType.IMAGE; let imageType = mediaLibrary.MediaType.IMAGE;
...@@ -25,20 +26,20 @@ let videoType = mediaLibrary.MediaType.VIDEO; ...@@ -25,20 +26,20 @@ let videoType = mediaLibrary.MediaType.VIDEO;
let audioType = mediaLibrary.MediaType.AUDIO; let audioType = mediaLibrary.MediaType.AUDIO;
let imagesfetchOp = { let imagesfetchOp = {
selections: fileKeyObj.MEDIA_TYPE + '= ?', selections: fileKeyObj.RELATIVE_PATH + '= ? AND ' + fileKeyObj.MEDIA_TYPE + '= ?',
selectionArgs: [imageType.toString()], selectionArgs: ['Pictures/Dynamic01/', imageType.toString()],
}; };
let videosfetchOp = { let videosfetchOp = {
selections: fileKeyObj.MEDIA_TYPE + '= ?', selections: fileKeyObj.RELATIVE_PATH + '= ? AND ' + fileKeyObj.MEDIA_TYPE + '= ?',
selectionArgs: [videoType.toString()], selectionArgs: ['Videos/Dynamic01/', videoType.toString()],
}; };
let audiosfetchOp = { let audiosfetchOp = {
selections: fileKeyObj.MEDIA_TYPE + '= ?', selections: fileKeyObj.RELATIVE_PATH + '= ? AND ' + fileKeyObj.MEDIA_TYPE + '= ?',
selectionArgs: [audioType.toString()], selectionArgs: ['Audios/Dynamic01/', audioType.toString()],
}; };
let filesfetchOp = { let filesfetchOp = {
selections: fileKeyObj.MEDIA_TYPE + '= ?', selections: fileKeyObj.RELATIVE_PATH + '= ? AND ' + fileKeyObj.MEDIA_TYPE + '= ?',
selectionArgs: [fileType.toString()], selectionArgs: ['Documents/Dynamic01/', fileType.toString()],
}; };
function checkAssetAttr(done, attr, testNum, asset, checkType) { function checkAssetAttr(done, attr, testNum, asset, checkType) {
......
...@@ -32,20 +32,20 @@ export default function mediaLibraryTestPromiseOnOffTest(abilityContext){ ...@@ -32,20 +32,20 @@ export default function mediaLibraryTestPromiseOnOffTest(abilityContext){
let fileType = mediaLibrary.MediaType.FILE; let fileType = mediaLibrary.MediaType.FILE;
let imagesfetchOp = { let imagesfetchOp = {
selections: fileKeyObj.MEDIA_TYPE + '= ?', selections: fileKeyObj.RELATIVE_PATH + '= ? AND ' + fileKeyObj.MEDIA_TYPE + '= ?',
selectionArgs: [imageType.toString()], selectionArgs: ['Pictures/Dynamic01/', imageType.toString()],
}; };
let videosfetchOp = { let videosfetchOp = {
selections: fileKeyObj.MEDIA_TYPE + '= ?', selections: fileKeyObj.RELATIVE_PATH + '= ? AND ' + fileKeyObj.MEDIA_TYPE + '= ?',
selectionArgs: [videoType.toString()], selectionArgs: ['Videos/Dynamic01/', videoType.toString()],
}; };
let audiosfetchOp = { let audiosfetchOp = {
selections: fileKeyObj.MEDIA_TYPE + '= ?', selections: fileKeyObj.RELATIVE_PATH + '= ? AND ' + fileKeyObj.MEDIA_TYPE + '= ?',
selectionArgs: [audioType.toString()], selectionArgs: ['Audios/Dynamic01/', audioType.toString()],
}; };
let filesfetchOp = { let filesfetchOp = {
selections: fileKeyObj.MEDIA_TYPE + '= ?', selections: fileKeyObj.RELATIVE_PATH + '= ? AND ' + fileKeyObj.MEDIA_TYPE + '= ?',
selectionArgs: [fileType.toString()], selectionArgs: ['Documents/Dynamic01/', fileType.toString()],
}; };
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册