From e4d0f826861be5bca81d8bacb35b033823185ce6 Mon Sep 17 00:00:00 2001 From: chenshuteng Date: Fri, 10 Mar 2023 16:41:04 +0800 Subject: [PATCH] fix xts failed by mimetype Signed-off-by: chenshuteng Change-Id: I0046feb21e07aa69d6ead69379da5706b98a7da1 --- .../ets/test/mediaLibraryTestCallback.test.ets | 16 ++++++++-------- .../ets/test/mediaLibraryTestPromise.test.ets | 14 +++++++------- 2 files changed, 15 insertions(+), 15 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 65ab89a2a..33b4c7ff9 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 @@ -130,7 +130,7 @@ export default function mediaLibraryTestCallback(abilityContext) { const props = { image: { - mimeType: "image/*", + mimeType: "image/jpeg", displayName: "01.jpg", relativePath: "Pictures/Static/", size: 348113, @@ -165,8 +165,8 @@ export default function mediaLibraryTestCallback(abilityContext) { orientation: 0, duration: "219600", }, - file: { - mimeType: "file/*", + application: { + mimeType: "application/octet-stream", displayName: "01.dat", relativePath: "Documents/Static/", size: 10, @@ -421,7 +421,7 @@ export default function mediaLibraryTestCallback(abilityContext) { it("SUB_MEDIA_MEDIALIBRARY_CALLBACK_GETFILEASSETS_004", 0, async function (done) { let testNum = "SUB_MEDIA_MEDIALIBRARY_CALLBACK_GETFILEASSETS_004"; let currentFetchOps = fetchOps(testNum, "Documents/Static/", FILE_TYPE); - let type = "file"; + let type = "application"; let count = 1; await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, null); }); @@ -439,7 +439,7 @@ export default function mediaLibraryTestCallback(abilityContext) { let currentFetchOps = imageAndVideofetchOp; let type = "video"; let count = 2; - let typesArr = ["image/*", "video/mp4"]; + let typesArr = ["image/jpeg", "video/mp4"]; await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr); }); @@ -454,9 +454,9 @@ export default function mediaLibraryTestCallback(abilityContext) { it("SUB_MEDIA_MEDIALIBRARY_CALLBACK_GETFILEASSETS_006", 0, async function (done) { let testNum = "SUB_MEDIA_MEDIALIBRARY_CALLBACK_GETFILEASSETS_006"; let currentFetchOps = imageAndVideoAndfilefetchOp; - let type = "file"; + let type = "application"; let count = 3; - let typesArr = ["image/*", "video/mp4", "file/*"]; + let typesArr = ["image/jpeg", "video/mp4", "application/octet-stream"]; await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr); }); @@ -473,7 +473,7 @@ export default function mediaLibraryTestCallback(abilityContext) { let currentFetchOps = imageAndVideoAndfileAndAudiofetchOp; let type = "audio"; let count = 4; - let typesArr = ["image/*", "video/mp4", "file/*", "audio/mpeg"]; + let typesArr = ["image/jpeg", "video/mp4", "application/octet-stream", "audio/mpeg"]; await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr); }); 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 aff9f0219..06ce75958 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 @@ -162,8 +162,8 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { orientation: 0, duration: "219600", }, - file: { - mimeType: "file/*", + application: { + mimeType: "application/octet-stream", displayName: "01.dat", relativePath: "Documents/Static/", size: 10, @@ -393,7 +393,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { it("SUB_MEDIA_MEDIALIBRARY_PROMISE_GETFILEASSETS_004", 0, async function (done) { let testNum = "SUB_MEDIA_MEDIALIBRARY_PROMISE_GETFILEASSETS_004"; let currentFetchOps = fetchOps(testNum, "Documents/Static/", FILE_TYPE); - let type = "file"; + let type = "application"; let count = 1; await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, null); }); @@ -411,7 +411,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { let currentFetchOps = imageAndVideofetchOp; let type = "video"; let count = 2; - let typesArr = ["image/*", "video/mp4"]; + let typesArr = ["image/jpeg", "video/mp4"]; await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr); }); @@ -426,9 +426,9 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { it("SUB_MEDIA_MEDIALIBRARY_PROMISE_GETFILEASSETS_006", 0, async function (done) { let testNum = "SUB_MEDIA_MEDIALIBRARY_PROMISE_GETFILEASSETS_006"; let currentFetchOps = imageAndVideoAndfilefetchOp; - let type = "file"; + let type = "application"; let count = 3; - let typesArr = ["image/*", "video/mp4", "file/*"]; + let typesArr = ["image/jpeg", "video/mp4", "application/octet-stream"]; await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr); }); @@ -445,7 +445,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { let currentFetchOps = imageAndVideoAndfileAndAudiofetchOp; let type = "audio"; let count = 4; - let typesArr = ["image/*", "video/mp4", "file/*", "audio/mpeg"]; + let typesArr = ["image/jpeg", "video/mp4", "application/octet-stream", "audio/mpeg"]; await checkFileAssetAttr(done, testNum, currentFetchOps, type, count, typesArr); }); -- GitLab