From 278b4dda86e5a7b5f2f4141e93c9b9864313ac86 Mon Sep 17 00:00:00 2001 From: caochuan Date: Wed, 24 Aug 2022 13:31:04 +0800 Subject: [PATCH] mediaLibrary add DIR_DOWNLOAD test case Signed-off-by: caochuan --- .../test/mediaLibraryTestCallback.test.ets | 19 ++++++++++++++-- .../ets/test/mediaLibraryTestPromise.test.ets | 22 ++++++++++++++++--- 2 files changed, 36 insertions(+), 5 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 06fab4edc..7f2cda75c 100644 --- 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 @@ -528,7 +528,7 @@ export default function mediaLibraryTestCallback(abilityContext) { /** * @tc.number : SUB__MEDIA_MIDIALIBRARY_CALLBACK_GETPUBLICDIRECTORY_004 * @tc.name : getPublicDirectory - * @tc.desc : getPublicDirectory DIR_IMAGE + * @tc.desc : getPublicDirectory DIR_AUDIO * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 @@ -549,7 +549,7 @@ export default function mediaLibraryTestCallback(abilityContext) { * @tc.level : Level 0 */ it('SUB__MEDIA_MIDIALIBRARY_CALLBACK_GETPUBLICDIRECTORY_005', 0, async function (done) { - let testNum = 'SUB__MEDIA_MIDIALIBRARY_CALLBACK_GETPUBLICDIRECTORY_004'; + let testNum = 'SUB__MEDIA_MIDIALIBRARY_CALLBACK_GETPUBLICDIRECTORY_005'; let dir = mediaLibrary.DirectoryType.DIR_DOCUMENTS; let val = 'Documents/'; await checkGetPublicDirectory(done, testNum, dir, val) @@ -576,6 +576,21 @@ export default function mediaLibraryTestCallback(abilityContext) { } }); + /** + * @tc.number : SUB__MEDIA_MIDIALIBRARY_CALLBACK_GETPUBLICDIRECTORY_007 + * @tc.name : getPublicDirectory + * @tc.desc : getPublicDirectory DIR_DOWNLOAD + * @tc.size : MEDIUM + * @tc.type : Function + * @tc.level : Level 0 + */ + it('SUB__MEDIA_MIDIALIBRARY_CALLBACK_GETPUBLICDIRECTORY_007', 0, async function (done) { + let testNum = 'SUB__MEDIA_MIDIALIBRARY_CALLBACK_GETPUBLICDIRECTORY_007'; + let dir = mediaLibrary.DirectoryType.DIR_DOWNLOAD; + let val = 'Download/'; + await checkGetPublicDirectory(done, testNum, dir, val) + }); + /** * @tc.number : SUB__MEDIA_MIDIALIBRARY_CALLBACK_CREATEASSET_001 * @tc.name : createAsset 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 396ef3eb0..6311159e1 100644 --- 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 @@ -507,7 +507,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { /** * @tc.number : SUB__MEDIA_MIDIALIBRARY_PROMISE_GETPUBLICDIRECTORY_004 * @tc.name : getPublicDirectory - * @tc.desc : getPublicDirectory DIR_IMAGE + * @tc.desc : getPublicDirectory DIR_AUDIO * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 @@ -522,13 +522,13 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { /** * @tc.number : SUB__MEDIA_MIDIALIBRARY_PROMISE_GETPUBLICDIRECTORY_005 * @tc.name : getPublicDirectory - * @tc.desc : getPublicDirectory DIR_IMAGE + * @tc.desc : getPublicDirectory DIR_DOCUMENTS * @tc.size : MEDIUM * @tc.type : Function * @tc.level : Level 0 */ it('SUB__MEDIA_MIDIALIBRARY_PROMISE_GETPUBLICDIRECTORY_005', 0, async function (done) { - let testNum = 'SUB__MEDIA_MIDIALIBRARY_PROMISE_GETPUBLICDIRECTORY_004'; + let testNum = 'SUB__MEDIA_MIDIALIBRARY_PROMISE_GETPUBLICDIRECTORY_005'; let dir = mediaLibrary.DirectoryType.DIR_DOCUMENTS; let val = 'Documents/'; await checkGetPublicDirectory(done, testNum, dir, val) @@ -555,6 +555,22 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { } }); + /** + * @tc.number : SUB__MEDIA_MIDIALIBRARY_PROMISE_GETPUBLICDIRECTORY_007 + * @tc.name : getPublicDirectory + * @tc.desc : getPublicDirectory DIR_DOWNLOAD + * @tc.size : MEDIUM + * @tc.type : Function + * @tc.level : Level 0 + */ + it('SUB__MEDIA_MIDIALIBRARY_PROMISE_GETPUBLICDIRECTORY_007', 0, async function (done) { + let testNum = 'SUB__MEDIA_MIDIALIBRARY_PROMISE_GETPUBLICDIRECTORY_007'; + let dir = mediaLibrary.DirectoryType.DIR_DOWNLOAD; + let val = 'Download/'; + await checkGetPublicDirectory(done, testNum, dir, val) + }); + + /** * @tc.number : SUB__MEDIA_MIDIALIBRARY_PROMISE_CREATEASSET_001 * @tc.name : createAsset -- GitLab