From 20eba6e244cd5d375b851a3c0940c03805f94359 Mon Sep 17 00:00:00 2001 From: caochuan Date: Mon, 17 Oct 2022 14:21:30 +0800 Subject: [PATCH] =?UTF-8?q?mediaLibrary=20=E4=BF=AE=E5=A4=8D=20=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: caochuan --- .../test/mediaLibraryTestCallback.test.ets | 6 ++--- .../ets/test/mediaLibraryTestPromise.test.ets | 6 ++--- .../mediaLibraryTestPromiseOnOff.test.ets | 6 ++--- .../main/ets/test/fileAssetPromise2.test.ets | 14 +++++----- .../ets/test/filekeyTestCallback.test.ets | 24 ++++++++--------- .../main/ets/test/filekeyTestPromise.test.ets | 26 +++++++++---------- .../ets/test/fetchFileResultCallback.test.ets | 4 +-- .../ets/test/fetchFileResultPromise.test.ets | 4 +-- 8 files changed, 45 insertions(+), 45 deletions(-) diff --git a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestCallback.test.ets b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestCallback.test.ets index 420c0d4a5..ff4da3097 100755 --- a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestCallback.test.ets +++ b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestCallback.test.ets @@ -404,7 +404,7 @@ export default function mediaLibraryTestCallback(abilityContext) { * @tc.level : Level 0 */ 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 type = 'audio'; let count = 4; @@ -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.desc : Create File Asset image (does not exist) * @tc.size : MEDIUM @@ -737,7 +737,7 @@ export default function mediaLibraryTestCallback(abilityContext) { * @tc.level : Level 0 */ 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 type = IMAGE_TYPE; let name = new Date().getTime() + '.jpg'; diff --git a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets index 722ba4bf1..12ea137b3 100755 --- a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets +++ b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets @@ -383,7 +383,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { * @tc.level : Level 0 */ 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 type = 'audio'; let count = 4; @@ -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.desc : Create File Asset image (does not exist) * @tc.size : MEDIUM @@ -717,7 +717,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { * @tc.level : Level 0 */ 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 type = IMAGE_TYPE; let name = new Date().getTime() + '.jpg'; diff --git a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromiseOnOff.test.ets b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromiseOnOff.test.ets index e74f4c6cd..f95243d03 100755 --- a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromiseOnOff.test.ets +++ b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromiseOnOff.test.ets @@ -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.desc : ON REMOTE_FILE ASSET * @tc.size : MEDIUM @@ -254,7 +254,7 @@ export default function mediaLibraryTestPromiseOnOffTest(abilityContext) { expect(count == 0).assertTrue(); done(); } catch (error) { - console.info(`MediaLibraryTest : on 006 failed, error: ${error}`); + console.info(`MediaLibraryTest : on 007 failed, error: ${error}`); expect(false).assertTrue(); media.off('remoteFileChange'); done(); @@ -450,7 +450,7 @@ export default function mediaLibraryTestPromiseOnOffTest(abilityContext) { expect(true).assertTrue(); done(); } catch (error) { - console.info(`MediaLibraryTest : off 006 failed, error: ${error}`); + console.info(`MediaLibraryTest : off 007 failed, error: ${error}`); expect(false).assertTrue(); media.off('fileChange'); done(); diff --git a/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetPromise2.test.ets b/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetPromise2.test.ets index 2be8986ff..f89010e4b 100755 --- a/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetPromise2.test.ets +++ b/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetPromise2.test.ets @@ -160,13 +160,13 @@ export default function fileAssetPromise2Test(abilityContext) { }); /** - * @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_005 - * @tc.name : commitModify - * @tc.desc : Modify uri - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 0 - */ + * @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_005 + * @tc.name : commitModify + * @tc.desc : Modify uri + * @tc.size : MEDIUM + * @tc.type : Function + * @tc.level : Level 0 + */ 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/', '06', IMAGE_TYPE); diff --git a/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/ets/test/filekeyTestCallback.test.ets b/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/ets/test/filekeyTestCallback.test.ets index 1749cbea6..b836d2bb4 100755 --- a/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/ets/test/filekeyTestCallback.test.ets +++ b/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/ets/test/filekeyTestCallback.test.ets @@ -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.desc : filekey artistOp * @tc.size : MEDIUM * @tc.type : Function * @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' 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.desc : filekey audioAlbumOp * @tc.size : MEDIUM * @tc.type : Function * @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' await getFileAssetsBy(done, testNum, 'audioAlbum', AUDIOALBUM); }); @@ -279,34 +279,34 @@ export default function filekeyTestCallbackTest(abilityContext) { * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0016', 0, async function (done) { - let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0016' + it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_016', 0, async function (done) { + let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_016' 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.desc : filekey display_name * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0017', 0, async function (done) { - let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0017' + it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_017', 0, async function (done) { + let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_017' 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.desc : filekey album_name * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0018', 0, async function (done) { - let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_0018' + it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_018', 0, async function (done) { + let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_CALLBACK_018' try { let albumName = 'ImageInfo' let currentFetchOp = { diff --git a/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/ets/test/filekeyTestPromise.test.ets b/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/ets/test/filekeyTestPromise.test.ets index e64a2e5cf..2b2c519f0 100755 --- a/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/ets/test/filekeyTestPromise.test.ets +++ b/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/ets/test/filekeyTestPromise.test.ets @@ -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.desc : filekey artistOp * @tc.size : MEDIUM * @tc.type : Function * @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' 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.desc : filekey audioAlbumOp * @tc.size : MEDIUM * @tc.type : Function * @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' 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.desc : filekey relative_path * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0016', 0, async function (done) { - let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0016' + it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_016', 0, async function (done) { + let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_016' 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.desc : filekey display_name * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0017', 0, async function (done) { - let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0017' + it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_017', 0, async function (done) { + let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_017' 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.desc : filekey album_name * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ - it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0018', 0, async function (done) { - let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_0018' + it('SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_018', 0, async function (done) { + let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILE_KEY_PROMISE_018' try { let albumName = 'ImageInfo' let currentFetchOp = { diff --git a/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/ets/test/fetchFileResultCallback.test.ets b/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/ets/test/fetchFileResultCallback.test.ets index 57f6244a6..604805f84 100755 --- a/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/ets/test/fetchFileResultCallback.test.ets +++ b/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/ets/test/fetchFileResultCallback.test.ets @@ -172,7 +172,7 @@ export default function fetchFileResultCallbackTest(abilityContext) { * @tc.level : Level 0 */ 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 currentFetchOp = fetchOps(testNum, 'Documents/zeor/', FILE_TYPE) await checkAssetCount(done, testNum, currentFetchOp, expectCount) @@ -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.desc : Get FetchResult, get position 1 object, check result * @tc.size : MEDIUM diff --git a/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/ets/test/fetchFileResultPromise.test.ets b/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/ets/test/fetchFileResultPromise.test.ets index ab3280ba5..685fc5a54 100755 --- a/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/ets/test/fetchFileResultPromise.test.ets +++ b/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/ets/test/fetchFileResultPromise.test.ets @@ -159,7 +159,7 @@ export default function fetchFileResultPromiseTest(abilityContext) { * @tc.level : Level 0 */ 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 currentFetchOp = fetchOps(testNum, 'Documents/zeor/', FILE_TYPE) await checkAssetCount(done, testNum, currentFetchOp, expectCount) @@ -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.desc : Get FetchResult, get position 1 object, check result * @tc.size : MEDIUM -- GitLab