提交 20eba6e2 编写于 作者: C caochuan

mediaLibrary 修复 测试用例名称

Signed-off-by: Ncaochuan <caochuan@huawei.com>
上级 641152c8
...@@ -404,7 +404,7 @@ export default function mediaLibraryTestCallback(abilityContext) { ...@@ -404,7 +404,7 @@ export default function mediaLibraryTestCallback(abilityContext) {
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_MEDIA_MEDIALIBRARY_CALLBACK_GETFILEASSETS_007', 0, async function (done) { it('SUB_MEDIA_MEDIALIBRARY_CALLBACK_GETFILEASSETS_007', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CALLBACK_GETFILEASSETS_006'; let testNum = 'SUB_MEDIA_MEDIALIBRARY_CALLBACK_GETFILEASSETS_007';
let currentFetchOps = imageAndVideoAndfileAndAudiofetchOp; let currentFetchOps = imageAndVideoAndfileAndAudiofetchOp;
let type = 'audio'; let type = 'audio';
let count = 4; let count = 4;
...@@ -729,7 +729,7 @@ export default function mediaLibraryTestCallback(abilityContext) { ...@@ -729,7 +729,7 @@ export default function mediaLibraryTestCallback(abilityContext) {
}); });
/** /**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_CALLBACK_CREATEASSET_001 * @tc.number : SUB_MEDIA_MEDIALIBRARY_CALLBACK_CREATEASSET_009
* @tc.name : createAsset * @tc.name : createAsset
* @tc.desc : Create File Asset image (does not exist) * @tc.desc : Create File Asset image (does not exist)
* @tc.size : MEDIUM * @tc.size : MEDIUM
...@@ -737,7 +737,7 @@ export default function mediaLibraryTestCallback(abilityContext) { ...@@ -737,7 +737,7 @@ export default function mediaLibraryTestCallback(abilityContext) {
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_MEDIA_MEDIALIBRARY_CALLBACK_CREATEASSET_009', 0, async function (done) { it('SUB_MEDIA_MEDIALIBRARY_CALLBACK_CREATEASSET_009', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_CALLBACK_CREATEASSET_001'; let testNum = 'SUB_MEDIA_MEDIALIBRARY_CALLBACK_CREATEASSET_009';
let currentFetchOps = fetchOps(testNum, 'Pictures/Static/', IMAGE_TYPE); let currentFetchOps = fetchOps(testNum, 'Pictures/Static/', IMAGE_TYPE);
let type = IMAGE_TYPE; let type = IMAGE_TYPE;
let name = new Date().getTime() + '.jpg'; let name = new Date().getTime() + '.jpg';
......
...@@ -383,7 +383,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { ...@@ -383,7 +383,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) {
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_MEDIA_MEDIALIBRARY_PROMISE_GETFILEASSETS_007', 0, async function (done) { it('SUB_MEDIA_MEDIALIBRARY_PROMISE_GETFILEASSETS_007', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_PROMISE_GETFILEASSETS_006'; let testNum = 'SUB_MEDIA_MEDIALIBRARY_PROMISE_GETFILEASSETS_007';
let currentFetchOps = imageAndVideoAndfileAndAudiofetchOp; let currentFetchOps = imageAndVideoAndfileAndAudiofetchOp;
let type = 'audio'; let type = 'audio';
let count = 4; let count = 4;
...@@ -709,7 +709,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { ...@@ -709,7 +709,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) {
}); });
/** /**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_PROMISE_CREATEASSET_001 * @tc.number : SUB_MEDIA_MEDIALIBRARY_PROMISE_CREATEASSET_009
* @tc.name : createAsset * @tc.name : createAsset
* @tc.desc : Create File Asset image (does not exist) * @tc.desc : Create File Asset image (does not exist)
* @tc.size : MEDIUM * @tc.size : MEDIUM
...@@ -717,7 +717,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { ...@@ -717,7 +717,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) {
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_MEDIA_MEDIALIBRARY_PROMISE_CREATEASSET_009', 0, async function (done) { it('SUB_MEDIA_MEDIALIBRARY_PROMISE_CREATEASSET_009', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_PROMISE_CREATEASSET_001'; let testNum = 'SUB_MEDIA_MEDIALIBRARY_PROMISE_CREATEASSET_009';
let currentFetchOps = fetchOps(testNum, 'Pictures/Static/', IMAGE_TYPE); let currentFetchOps = fetchOps(testNum, 'Pictures/Static/', IMAGE_TYPE);
let type = IMAGE_TYPE; let type = IMAGE_TYPE;
let name = new Date().getTime() + '.jpg'; let name = new Date().getTime() + '.jpg';
......
...@@ -223,7 +223,7 @@ export default function mediaLibraryTestPromiseOnOffTest(abilityContext) { ...@@ -223,7 +223,7 @@ export default function mediaLibraryTestPromiseOnOffTest(abilityContext) {
}); });
/** /**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_PROMISE_ON_006 * @tc.number : SUB_MEDIA_MEDIALIBRARY_PROMISE_ON_007
* @tc.name : ON * @tc.name : ON
* @tc.desc : ON REMOTE_FILE ASSET * @tc.desc : ON REMOTE_FILE ASSET
* @tc.size : MEDIUM * @tc.size : MEDIUM
...@@ -254,7 +254,7 @@ export default function mediaLibraryTestPromiseOnOffTest(abilityContext) { ...@@ -254,7 +254,7 @@ export default function mediaLibraryTestPromiseOnOffTest(abilityContext) {
expect(count == 0).assertTrue(); expect(count == 0).assertTrue();
done(); done();
} catch (error) { } catch (error) {
console.info(`MediaLibraryTest : on 006 failed, error: ${error}`); console.info(`MediaLibraryTest : on 007 failed, error: ${error}`);
expect(false).assertTrue(); expect(false).assertTrue();
media.off('remoteFileChange'); media.off('remoteFileChange');
done(); done();
...@@ -450,7 +450,7 @@ export default function mediaLibraryTestPromiseOnOffTest(abilityContext) { ...@@ -450,7 +450,7 @@ export default function mediaLibraryTestPromiseOnOffTest(abilityContext) {
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} catch (error) { } catch (error) {
console.info(`MediaLibraryTest : off 006 failed, error: ${error}`); console.info(`MediaLibraryTest : off 007 failed, error: ${error}`);
expect(false).assertTrue(); expect(false).assertTrue();
media.off('fileChange'); media.off('fileChange');
done(); done();
......
...@@ -246,27 +246,27 @@ export default function filekeyTestCallbackTest(abilityContext) { ...@@ -246,27 +246,27 @@ export default function filekeyTestCallbackTest(abilityContext) {
}); });
/** /**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0014 * @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_014
* @tc.name : getFileAssets * @tc.name : getFileAssets
* @tc.desc : filekey artistOp * @tc.desc : filekey artistOp
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0014', 0, async function (done) { it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_014', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_014' let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_014'
await getFileAssetsBy(done, testNum, 'artist', ARTIST); await getFileAssetsBy(done, testNum, 'artist', ARTIST);
}); });
/** /**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0015 * @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_015
* @tc.name : getFileAssets * @tc.name : getFileAssets
* @tc.desc : filekey audioAlbumOp * @tc.desc : filekey audioAlbumOp
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0015', 0, async function (done) { it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_015', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_015' let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_015'
await getFileAssetsBy(done, testNum, 'audioAlbum', AUDIOALBUM); await getFileAssetsBy(done, testNum, 'audioAlbum', AUDIOALBUM);
}); });
...@@ -279,34 +279,34 @@ export default function filekeyTestCallbackTest(abilityContext) { ...@@ -279,34 +279,34 @@ export default function filekeyTestCallbackTest(abilityContext) {
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0016', 0, async function (done) { it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_016', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0016' let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_016'
await getFileAssetsBy(done, testNum, 'relativePath', RELATIVE_PATH); await getFileAssetsBy(done, testNum, 'relativePath', RELATIVE_PATH);
}); });
/** /**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0017 * @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_017
* @tc.name : getFileAssets * @tc.name : getFileAssets
* @tc.desc : filekey display_name * @tc.desc : filekey display_name
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0017', 0, async function (done) { it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_017', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0017' let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_017'
await getFileAssetsBy(done, testNum, 'displayName', DISPLAY_NAME); await getFileAssetsBy(done, testNum, 'displayName', DISPLAY_NAME);
}); });
/** /**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0018 * @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_018
* @tc.name : getFileAssets * @tc.name : getFileAssets
* @tc.desc : filekey album_name * @tc.desc : filekey album_name
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0018', 0, async function (done) { it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_018', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0018' let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_018'
try { try {
let albumName = 'ImageInfo' let albumName = 'ImageInfo'
let currentFetchOp = { let currentFetchOp = {
......
...@@ -239,67 +239,67 @@ export default function filekeyTestPromiseTest(abilityContext) { ...@@ -239,67 +239,67 @@ export default function filekeyTestPromiseTest(abilityContext) {
}); });
/** /**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0014 * @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_014
* @tc.name : getFileAssets * @tc.name : getFileAssets
* @tc.desc : filekey artistOp * @tc.desc : filekey artistOp
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0014', 0, async function (done) { it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_014', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_014' let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_014'
await getFileAssetsBy(done, testNum, 'artist', ARTIST); await getFileAssetsBy(done, testNum, 'artist', ARTIST);
}); });
/** /**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0015 * @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_015
* @tc.name : getFileAssets * @tc.name : getFileAssets
* @tc.desc : filekey audioAlbumOp * @tc.desc : filekey audioAlbumOp
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0015', 0, async function (done) { it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_015', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_015' let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_015'
await getFileAssetsBy(done, testNum, 'audioAlbum', AUDIOALBUM); await getFileAssetsBy(done, testNum, 'audioAlbum', AUDIOALBUM);
}); });
/** /**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0016 * @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_016
* @tc.name : getFileAssets * @tc.name : getFileAssets
* @tc.desc : filekey relative_path * @tc.desc : filekey relative_path
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0016', 0, async function (done) { it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_016', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0016' let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_016'
await getFileAssetsBy(done, testNum, 'relativePath', RELATIVE_PATH); await getFileAssetsBy(done, testNum, 'relativePath', RELATIVE_PATH);
}); });
/** /**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0017 * @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_017
* @tc.name : getFileAssets * @tc.name : getFileAssets
* @tc.desc : filekey display_name * @tc.desc : filekey display_name
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0017', 0, async function (done) { it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_017', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0017' let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_017'
await getFileAssetsBy(done, testNum, 'displayName', DISPLAY_NAME); await getFileAssetsBy(done, testNum, 'displayName', DISPLAY_NAME);
}); });
/** /**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0018 * @tc.number : SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_018
* @tc.name : getFileAssets * @tc.name : getFileAssets
* @tc.desc : filekey album_name * @tc.desc : filekey album_name
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0018', 0, async function (done) { it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_018', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0018' let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_018'
try { try {
let albumName = 'ImageInfo' let albumName = 'ImageInfo'
let currentFetchOp = { let currentFetchOp = {
......
...@@ -172,7 +172,7 @@ export default function fetchFileResultCallbackTest(abilityContext) { ...@@ -172,7 +172,7 @@ export default function fetchFileResultCallbackTest(abilityContext) {
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_MEDIA_MEDIALIBRARY_FETCHRESULT_GETCOUNT_CALLBACK_001_04', 0, async function (done) { it('SUB_MEDIA_MEDIALIBRARY_FETCHRESULT_GETCOUNT_CALLBACK_001_04', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FETCHRESULT_GETCOUNT_CALLBACK_001_03' let testNum = 'SUB_MEDIA_MEDIALIBRARY_FETCHRESULT_GETCOUNT_CALLBACK_001_04'
let expectCount = 0 let expectCount = 0
let currentFetchOp = fetchOps(testNum, 'Documents/zeor/', FILE_TYPE) let currentFetchOp = fetchOps(testNum, 'Documents/zeor/', FILE_TYPE)
await checkAssetCount(done, testNum, currentFetchOp, expectCount) await checkAssetCount(done, testNum, currentFetchOp, expectCount)
...@@ -324,7 +324,7 @@ export default function fetchFileResultCallbackTest(abilityContext) { ...@@ -324,7 +324,7 @@ export default function fetchFileResultCallbackTest(abilityContext) {
}); });
/** /**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FETCHRESULT_GETPOSITIONOBJECT_CALLBACK_007_02 * @tc.number : SUB_MEDIA_MEDIALIBRARY_FETCHRESULT_GETPOSITIONOBJECT_CALLBACK_007_03
* @tc.name : getPositionObject * @tc.name : getPositionObject
* @tc.desc : Get FetchResult, get position 1 object, check result * @tc.desc : Get FetchResult, get position 1 object, check result
* @tc.size : MEDIUM * @tc.size : MEDIUM
......
...@@ -159,7 +159,7 @@ export default function fetchFileResultPromiseTest(abilityContext) { ...@@ -159,7 +159,7 @@ export default function fetchFileResultPromiseTest(abilityContext) {
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_MEDIA_MEDIALIBRARY_FETCHRESULT_GETCOUNT_PROMISE_001_04', 0, async function (done) { it('SUB_MEDIA_MEDIALIBRARY_FETCHRESULT_GETCOUNT_PROMISE_001_04', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FETCHRESULT_GETCOUNT_PROMISE_001_03' let testNum = 'SUB_MEDIA_MEDIALIBRARY_FETCHRESULT_GETCOUNT_PROMISE_001_04'
let expectCount = 0 let expectCount = 0
let currentFetchOp = fetchOps(testNum, 'Documents/zeor/', FILE_TYPE) let currentFetchOp = fetchOps(testNum, 'Documents/zeor/', FILE_TYPE)
await checkAssetCount(done, testNum, currentFetchOp, expectCount) await checkAssetCount(done, testNum, currentFetchOp, expectCount)
...@@ -378,7 +378,7 @@ export default function fetchFileResultPromiseTest(abilityContext) { ...@@ -378,7 +378,7 @@ export default function fetchFileResultPromiseTest(abilityContext) {
}); });
/** /**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FETCHRESULT_GETPOSITIONOBJECT_PROMISE_007_02 * @tc.number : SUB_MEDIA_MEDIALIBRARY_FETCHRESULT_GETPOSITIONOBJECT_PROMISE_007_03
* @tc.name : getPositionObject * @tc.name : getPositionObject
* @tc.desc : Get FetchResult, get position 1 object, check result * @tc.desc : Get FetchResult, get position 1 object, check result
* @tc.size : MEDIUM * @tc.size : MEDIUM
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册