未验证 提交 0cf7e125 编写于 作者: O openharmony_ci 提交者: Gitee

!6611 【medialibrary_xts】nameFetch修改为检索display_name

Merge pull request !6611 from yangbo/master
......@@ -67,10 +67,10 @@ const fetchOps = function (testNum, path, type, others) {
console.info(`${testNum}: fetchOps${JSON.stringify(ops)}`)
return ops
}
const nameFetchOps = function (testNum, path, title, type) {
const nameFetchOps = function (testNum, path, display_name, type) {
let ops = {
selections: FILEKEY.RELATIVE_PATH + '= ? AND ' + FILEKEY.TITLE + '= ? AND ' + FILEKEY.MEDIA_TYPE + '=?',
selectionArgs: [path, title, type.toString()],
selections: FILEKEY.RELATIVE_PATH + '= ? AND ' + FILEKEY.DISPLAY_NAME + '= ? AND ' + FILEKEY.MEDIA_TYPE + '=?',
selectionArgs: [path, display_name, type.toString()],
};
console.info(`${testNum}: fetchOps${JSON.stringify(ops)}`)
return ops
......
......@@ -106,7 +106,7 @@ export default function mediaLibraryTestCallback(abilityContext) {
relativePath: 'Audios/Static/',
size: 1958311,
mediaType: AUDIO_TYPE.toString(),
title: '01',
title: 'test',
artist: '元数据测试',
orientation: 0,
duration: '219600',
......
......@@ -104,7 +104,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) {
relativePath: 'Audios/Static/',
size: 1958311,
mediaType: AUDIO_TYPE.toString(),
title: '01',
title: 'test',
artist: '元数据测试',
orientation: 0,
duration: '219600',
......
......@@ -130,7 +130,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_001_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_001_01'
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticCb/', '01', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticCb/', '01.jpg', IMAGE_TYPE)
await favoriteDefaultState(done, testNum, currentFetchOp)
});
......@@ -144,7 +144,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_001_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_001_02'
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticCb/', '02', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticCb/', '02.jpg', IMAGE_TYPE)
await favoriteByTrue(done, testNum, currentFetchOp)
});
......@@ -158,7 +158,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_001_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_001_03'
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticCb/', '03', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticCb/', '03.jpg', IMAGE_TYPE)
await favoriteByFalse(done, testNum, currentFetchOp)
});
......@@ -172,7 +172,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_002_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_002_01'
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticCb/', '01', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticCb/', '01.mp4', VIDEO_TYPE)
await favoriteDefaultState(done, testNum, currentFetchOp)
});
......@@ -186,7 +186,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_002_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_002_02'
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticCb/', '02', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticCb/', '02.mp4', VIDEO_TYPE)
await favoriteByTrue(done, testNum, currentFetchOp)
});
......@@ -200,7 +200,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_002_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_002_03'
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticCb/', '03', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticCb/', '03.mp4', VIDEO_TYPE)
await favoriteByFalse(done, testNum, currentFetchOp)
});
......@@ -214,7 +214,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_003_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_003_01'
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticCb/', '01', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticCb/', '01.mp3', AUDIO_TYPE)
await favoriteDefaultState(done, testNum, currentFetchOp)
});
......@@ -228,7 +228,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_003_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_003_02'
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticCb/', '02', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticCb/', '02.mp3', AUDIO_TYPE)
await favoriteByTrue(done, testNum, currentFetchOp)
});
......@@ -242,7 +242,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_003_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_003_03'
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticCb/', '03', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticCb/', '03.mp3', AUDIO_TYPE)
await favoriteByFalse(done, testNum, currentFetchOp)
});
......@@ -256,7 +256,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_004_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_004_01'
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticCb/', '01', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticCb/', '01.dat', FILE_TYPE)
await favoriteDefaultState(done, testNum, currentFetchOp)
});
......@@ -270,7 +270,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_004_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_004_02'
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticCb/', '02', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticCb/', '02.dat', FILE_TYPE)
await favoriteByTrue(done, testNum, currentFetchOp)
});
......@@ -284,7 +284,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_004_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_004_03'
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticCb/', '03', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticCb/', '03.dat', FILE_TYPE)
await favoriteByFalse(done, testNum, currentFetchOp)
});
});
......
......@@ -104,7 +104,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_001_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_001_01'
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticPro/', '01', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticPro/', '01.jpg', IMAGE_TYPE)
await favoriteDefaultState(done, testNum, currentFetchOp)
});
......@@ -118,7 +118,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_001_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_001_02'
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticPro/', '02', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticPro/', '02.jpg', IMAGE_TYPE)
await favoriteByTrue(done, testNum, currentFetchOp)
});
......@@ -132,7 +132,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_001_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_001_03'
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticPro/', '03', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticPro/', '03.jpg', IMAGE_TYPE)
await favoriteByFalse(done, testNum, currentFetchOp)
});
......@@ -146,7 +146,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_002_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_002_01'
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticPro/', '01', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticPro/', '01.mp4', VIDEO_TYPE)
await favoriteDefaultState(done, testNum, currentFetchOp)
});
......@@ -160,7 +160,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_002_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_002_02'
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticPro/', '02', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticPro/', '02.mp4', VIDEO_TYPE)
await favoriteByTrue(done, testNum, currentFetchOp)
});
......@@ -174,7 +174,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_002_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_002_03'
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticPro/', '03', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticPro/', '03.mp4', VIDEO_TYPE)
await favoriteByFalse(done, testNum, currentFetchOp)
});
......@@ -188,7 +188,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_003_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_003_01'
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticPro/', '01', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticPro/', '01.mp3', AUDIO_TYPE)
await favoriteDefaultState(done, testNum, currentFetchOp)
});
......@@ -202,7 +202,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_003_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_003_02'
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticPro/', '02', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticPro/', '02.mp3', AUDIO_TYPE)
await favoriteByTrue(done, testNum, currentFetchOp)
});
......@@ -216,7 +216,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_003_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_003_03'
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticPro/', '03', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticPro/', '03.mp3', AUDIO_TYPE)
await favoriteByFalse(done, testNum, currentFetchOp)
});
......@@ -230,7 +230,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_004_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_004_01'
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticPro/', '01', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticPro/', '01.dat', FILE_TYPE)
await favoriteDefaultState(done, testNum, currentFetchOp)
});
......@@ -244,7 +244,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_004_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_004_02'
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticPro/', '02', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticPro/', '02.dat', FILE_TYPE)
await favoriteByTrue(done, testNum, currentFetchOp)
});
......@@ -258,7 +258,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_004_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_004_03'
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticPro/', '03', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticPro/', '03.dat', FILE_TYPE)
await favoriteByFalse(done, testNum, currentFetchOp)
});
});
......
......@@ -168,7 +168,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_01';
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '01', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '01.jpg', IMAGE_TYPE)
let name = 'jpg'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_IMAGE) + 'create/'
let type = IMAGE_TYPE;
......@@ -185,7 +185,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_02';
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '02', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '02.jpg', IMAGE_TYPE)
let name = 'jpg'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_IMAGE) + 'create/';
let type = IMAGE_TYPE;
......@@ -204,7 +204,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_03';
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '03', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '03.jpg', IMAGE_TYPE)
let name = 'jpg'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_IMAGE) + 'create/';
let type = IMAGE_TYPE;
......@@ -237,7 +237,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_08', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_08';
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '04', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '04.jpg', IMAGE_TYPE)
let name = 'jpg'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_IMAGE) + 'create/';
let type = IMAGE_TYPE;
......@@ -256,7 +256,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_11', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_11';
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '05', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '05.jpg', IMAGE_TYPE)
let name = 'jpg'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_IMAGE) + 'create/';
let type = IMAGE_TYPE;
......@@ -278,7 +278,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_01';
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '01', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '01.mp4', VIDEO_TYPE)
let name = 'mp4'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_VIDEO) + 'create/'
let type = VIDEO_TYPE;
......@@ -295,7 +295,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_02';
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '02', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '02.mp4', VIDEO_TYPE)
let name = 'mp4'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_VIDEO) + 'create/';
let type = VIDEO_TYPE;
......@@ -314,7 +314,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_03';
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '03', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '03.mp4', VIDEO_TYPE)
let name = 'mp4'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_VIDEO) + 'create/';
let type = VIDEO_TYPE;
......@@ -347,7 +347,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_08', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_08';
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '04', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '04.mp4', VIDEO_TYPE)
let name = 'mp4'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_VIDEO) + 'create/';
let type = VIDEO_TYPE;
......@@ -366,7 +366,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_11', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_11';
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '05', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '05.mp4', VIDEO_TYPE)
let name = 'mp4'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_VIDEO) + 'create/';
let type = VIDEO_TYPE;
......@@ -387,7 +387,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_003_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_003_01';
let currentFetchOp = nameFetchOps(testNum, 'Audios/Static/', '01', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/Static/', '01.mp3', AUDIO_TYPE)
let name = 'mp3'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_AUDIO) + 'create/'
let type = AUDIO_TYPE;
......@@ -404,7 +404,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_003_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_003_02';
let currentFetchOp = nameFetchOps(testNum, 'Audios/Static/', '02', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/Static/', '02.mp3', AUDIO_TYPE)
let name = 'mp3'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_AUDIO) + 'create/';
let type = AUDIO_TYPE;
......@@ -423,7 +423,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_003_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_003_03';
let currentFetchOp = nameFetchOps(testNum, 'Audios/Static/', '03', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/Static/', '03.mp3', AUDIO_TYPE)
let name = 'mp3'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_AUDIO) + 'create/';
let type = AUDIO_TYPE;
......@@ -456,7 +456,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_003_08', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_003_08';
let currentFetchOp = nameFetchOps(testNum, 'Audios/Static/', '05', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/Static/', '05.mp3', AUDIO_TYPE)
let name = 'mp3'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_AUDIO) + 'create/';
let type = AUDIO_TYPE;
......@@ -478,7 +478,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_004_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_004_01';
let currentFetchOp = nameFetchOps(testNum, 'Documents/Static/', '01', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/Static/', '01.dat', FILE_TYPE)
let name = 'dat'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_DOCUMENTS) + 'create/'
let type = FILE_TYPE;
......@@ -495,7 +495,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_004_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_004_02';
let currentFetchOp = nameFetchOps(testNum, 'Documents/Static/', '02', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/Static/', '02.dat', FILE_TYPE)
let name = 'dat'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_DOCUMENTS) + 'create/';
let type = FILE_TYPE;
......@@ -514,7 +514,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_004_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_004_03';
let currentFetchOp = nameFetchOps(testNum, 'Documents/Static/', '03', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/Static/', '03.dat', FILE_TYPE)
let name = 'dat'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_DOCUMENTS) + 'create/';
let type = FILE_TYPE;
......@@ -547,7 +547,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_004_08', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_004_08';
let currentFetchOp = nameFetchOps(testNum, 'Documents/Static/', '04', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/Static/', '04.dat', FILE_TYPE)
let name = 'dat'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_DOCUMENTS) + 'create/';
let type = FILE_TYPE;
......
......@@ -150,7 +150,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_01';
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '01', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '01.jpg', IMAGE_TYPE)
let name = 'jpg'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_IMAGE) + 'create/'
let type = IMAGE_TYPE;
......@@ -167,7 +167,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_02';
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '02', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '02.jpg', IMAGE_TYPE)
let name = 'jpg'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_IMAGE) + 'create/';
let type = IMAGE_TYPE;
......@@ -186,7 +186,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_03';
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '03', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '03.jpg', IMAGE_TYPE)
let name = 'jpg'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_IMAGE) + 'create/';
let type = IMAGE_TYPE;
......@@ -219,7 +219,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_08', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_08';
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '04', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '04.jpg', IMAGE_TYPE)
let name = 'jpg'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_IMAGE) + 'create/';
let type = IMAGE_TYPE;
......@@ -238,7 +238,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_11', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_11';
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '05', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/Static/', '05.jpg', IMAGE_TYPE)
let name = 'jpg'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_IMAGE) + 'create/';
let type = IMAGE_TYPE;
......@@ -260,7 +260,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_01';
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '01', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '01.mp4', VIDEO_TYPE)
let name = 'mp4'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_VIDEO) + 'create/'
let type = VIDEO_TYPE;
......@@ -277,7 +277,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_02';
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '02', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '02.mp4', VIDEO_TYPE)
let name = 'mp4'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_VIDEO) + 'create/';
let type = VIDEO_TYPE;
......@@ -296,7 +296,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_03';
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '03', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '03.mp4', VIDEO_TYPE)
let name = 'mp4'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_VIDEO) + 'create/';
let type = VIDEO_TYPE;
......@@ -329,7 +329,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_08', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_08';
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '04', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '04.mp4', VIDEO_TYPE)
let name = 'mp4'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_VIDEO) + 'create/';
let type = VIDEO_TYPE;
......@@ -348,7 +348,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_11', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_11';
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '05', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/Static/', '05.mp4', VIDEO_TYPE)
let name = 'mp4'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_VIDEO) + 'create/';
let type = VIDEO_TYPE;
......@@ -369,7 +369,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_003_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_003_01';
let currentFetchOp = nameFetchOps(testNum, 'Audios/Static/', '01', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/Static/', '01.mp3', AUDIO_TYPE)
let name = 'mp3'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_AUDIO) + 'create/'
let type = AUDIO_TYPE;
......@@ -386,7 +386,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_003_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_003_02';
let currentFetchOp = nameFetchOps(testNum, 'Audios/Static/', '02', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/Static/', '02.mp3', AUDIO_TYPE)
let name = 'mp3'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_AUDIO) + 'create/';
let type = AUDIO_TYPE;
......@@ -405,7 +405,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_003_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_003_03';
let currentFetchOp = nameFetchOps(testNum, 'Audios/Static/', '03', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/Static/', '03.mp3', AUDIO_TYPE)
let name = 'mp3'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_AUDIO) + 'create/';
let type = AUDIO_TYPE;
......@@ -438,7 +438,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_003_08', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_003_08';
let currentFetchOp = nameFetchOps(testNum, 'Audios/Static/', '05', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/Static/', '05.mp3', AUDIO_TYPE)
let name = 'mp3'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_AUDIO) + 'create/';
let type = AUDIO_TYPE;
......@@ -460,7 +460,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_004_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_004_01';
let currentFetchOp = nameFetchOps(testNum, 'Documents/Static/', '01', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/Static/', '01.dat', FILE_TYPE)
let name = 'dat'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_DOCUMENTS) + 'create/'
let type = FILE_TYPE;
......@@ -477,7 +477,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_004_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_004_02';
let currentFetchOp = nameFetchOps(testNum, 'Documents/Static/', '02', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/Static/', '02.dat', FILE_TYPE)
let name = 'dat'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_DOCUMENTS) + 'create/';
let type = FILE_TYPE;
......@@ -496,7 +496,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_004_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_004_03';
let currentFetchOp = nameFetchOps(testNum, 'Documents/Static/', '03', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/Static/', '03.dat', FILE_TYPE)
let name = 'dat'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_DOCUMENTS) + 'create/';
let type = FILE_TYPE;
......@@ -529,7 +529,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_004_08', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_004_08';
let currentFetchOp = nameFetchOps(testNum, 'Documents/Static/', '04', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/Static/', '04.dat', FILE_TYPE)
let name = 'dat'
let path = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_DOCUMENTS) + 'create/';
let type = FILE_TYPE;
......
......@@ -117,7 +117,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_001', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_001'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '01', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '01.jpg', IMAGE_TYPE);
let prop = 'displayName'
let val = new Date().getTime() + '.jpg'
await checkCommitModify(done, testNum, fetchOp, prop, val)
......@@ -133,7 +133,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_002', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_002'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '02', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '02.jpg', IMAGE_TYPE);
let prop = 'title'
let val = new Date().getTime() + 'newTitle'
await checkCommitModify(done, testNum, fetchOp, prop, val)
......@@ -149,7 +149,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_003', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_003'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '03', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '03.jpg', IMAGE_TYPE);
let prop = 'relativePath'
let val = 'Pictures/Temp/'
await checkCommitModify(done, testNum, fetchOp, prop, val)
......@@ -166,7 +166,7 @@ export default function fileAssetCallback2Test(abilityContext) {
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_004', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_004'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '04', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '04.jpg', IMAGE_TYPE);
let prop = 'orientation'
let val = 1
await checkCommitModify(done, testNum, fetchOp, prop, val)
......@@ -182,7 +182,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_005', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_005'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '05', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '05.jpg', IMAGE_TYPE);
let prop = 'displayName'
let val = "";
for (var i = 0; i < 83; i++) {
......@@ -202,7 +202,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_006', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_006'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '06', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '06.jpg', IMAGE_TYPE);
let prop = 'displayName'
let val = "";
for (var i = 0; i < 251; i++) {
......@@ -222,7 +222,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_007", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_007";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "07", IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "07.jpg", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 85; i++) {
......@@ -241,7 +241,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_008", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_008";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "08", IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "08.jpg", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 255; i++) {
......@@ -260,7 +260,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_009', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_009'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '09', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '09.jpg', IMAGE_TYPE);
let prop = 'displayName'
let val = "";
for (var i = 0; i < 84; i++) {
......@@ -280,7 +280,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_010', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_010'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '010', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '010.jpg', IMAGE_TYPE);
let prop = 'displayName'
let val = "";
for (var i = 0; i < 252; i++) {
......@@ -300,7 +300,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_011", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_011";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "011", IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "011.jpg", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 86; i++) {
......@@ -319,7 +319,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_012", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_012";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "012", IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "012.jpg", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 256; i++) {
......@@ -339,7 +339,7 @@ export default function fileAssetCallback2Test(abilityContext) {
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_ISDIRECTORY_CALLBACK_001', 0, async function (done) {
try {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_ISDIRECTORY_CALLBACK_001'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '013', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '013.jpg', IMAGE_TYPE);
const fetchFileResult = await media.getFileAssets(fetchOp);
const asset = await fetchFileResult.getFirstObject();
asset.isDirectory((err, isDir) =>{
......
......@@ -127,7 +127,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_001', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_001'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '01', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '01.jpg', IMAGE_TYPE);
let prop = 'displayName'
let val = new Date().getTime() + '.jpg'
await checkCommitModify(done, testNum, fetchOp, prop, val)
......@@ -143,7 +143,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_002', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_002'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '02', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '02.jpg', IMAGE_TYPE);
let prop = 'title'
let val = new Date().getTime() + 'newTitle'
await checkCommitModify(done, testNum, fetchOp, prop, val)
......@@ -159,7 +159,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_003', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_003'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '03', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '03.jpg', IMAGE_TYPE);
let prop = 'relativePath'
let val = 'Pictures/Temp/'
await checkCommitModify(done, testNum, fetchOp, prop, val)
......@@ -175,7 +175,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_004', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_004'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '04', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '04.jpg', IMAGE_TYPE);
let prop = 'orientation'
let val = 1
await checkCommitModify(done, testNum, fetchOp, prop, val)
......@@ -191,7 +191,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_005', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_005'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '05', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '05.jpg', IMAGE_TYPE);
let prop = 'displayName'
let val = "";
for (var i = 0; i < 83; i++) {
......@@ -211,7 +211,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_006', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_006'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '06', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '06.jpg', IMAGE_TYPE);
let prop = 'displayName'
let val = "";
for (var i = 0; i < 251; i++) {
......@@ -231,7 +231,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_007', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_007'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '07', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '07.jpg', IMAGE_TYPE);
let prop = 'title'
let val = "";
for (var i = 0; i < 85; i++) {
......@@ -250,7 +250,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_008", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_008";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyPro/", "08", IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyPro/", "08.jpg", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 255; i++) {
......@@ -269,7 +269,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_009', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_009'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '09', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '09.jpg', IMAGE_TYPE);
let prop = 'displayName'
let val = "";
for (var i = 0; i < 84; i++) {
......@@ -289,7 +289,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_010', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_010'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '010', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '010.jpg', IMAGE_TYPE);
let prop = 'displayName'
let val = "";
for (var i = 0; i < 252; i++) {
......@@ -309,7 +309,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_011", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_011";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyPro/", "011", IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyPro/", "011.jpg", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 86; i++) {
......@@ -328,7 +328,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_012", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_012";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyPro/", "012", IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyPro/", "012.jpg", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 256; i++) {
......@@ -347,7 +347,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_02_001', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_02_001'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '013', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '013.jpg', IMAGE_TYPE);
let prop = 'uri'
let val = 'newUri'
await staticPropsCommitModify(done, testNum, fetchOp, prop, val)
......@@ -363,7 +363,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_02_002', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_02_002'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '014', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '014.jpg', IMAGE_TYPE);
let prop = 'mediaType'
let val = 'newMediaType'
await staticPropsCommitModify(done, testNum, fetchOp, prop, val)
......@@ -380,7 +380,7 @@ export default function fileAssetPromise2Test(abilityContext) {
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_ISDIRECTORY_PROMISE_001', 0, async function (done) {
try {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_ISDIRECTORY_PROMISE_001'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '015', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '015.jpg', IMAGE_TYPE);
const fetchFileResult = await media.getFileAssets(fetchOp);
const asset = await fetchFileResult.getFirstObject();
const isDir = await asset.isDirectory();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册