From 2b38d04b1c4e73ad3045ca1ef816cc443acb60eb Mon Sep 17 00:00:00 2001 From: lwx1121892 Date: Wed, 29 Jun 2022 16:24:46 +0800 Subject: [PATCH] Signed-off-by: lwx1121892 --- multimedia/image/image_js_standard/Test.json | 1 + .../src/main/js/test/image.test.js | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/multimedia/image/image_js_standard/Test.json b/multimedia/image/image_js_standard/Test.json index c08e7f21d..8227210af 100644 --- a/multimedia/image/image_js_standard/Test.json +++ b/multimedia/image/image_js_standard/Test.json @@ -37,6 +37,7 @@ "./resource/image/test.jpg ->/data/app/el2/100/base/ohos.acts.multimedia.image/haps/entry/cache", "./resource/image/test.jpg ->/data/app/el2/100/base/ohos.acts.multimedia.image/haps/entry/cache", "./resource/image/test_exif.jpg ->/data/app/el2/100/base/ohos.acts.multimedia.image/haps/entry/cache", + "./resource/image/test_exif1.jpg ->/data/app/el2/100/base/ohos.acts.multimedia.image/haps/entry/cache", "./resource/image/moving_test.gif ->/data/app/el2/100/base/ohos.acts.multimedia.image/haps/entry/cache" ] } diff --git a/multimedia/image/image_js_standard/src/main/js/test/image.test.js b/multimedia/image/image_js_standard/src/main/js/test/image.test.js index bad5afad6..640c7d457 100644 --- a/multimedia/image/image_js_standard/src/main/js/test/image.test.js +++ b/multimedia/image/image_js_standard/src/main/js/test/image.test.js @@ -4661,7 +4661,7 @@ describe('Image', function () { * @tc.level : Level 1 */ it('TC_171', 0, async function (done) { - await getAbilityInfo('test_exif.jpg'); + await getAbilityInfo('test_exif1.jpg'); let fdExifJpg = fileio.openSync(filePath); const imageSourceApi = image.createImageSource(fdExifJpg); if (imageSourceApi == undefined) { @@ -4672,7 +4672,8 @@ describe('Image', function () { imageSourceApi.getImageProperty("BitsPerSample") .then(data => { console.info('TC_171 BitsPerSample ' + data); - expect(data != undefined).assertTrue(); + expect(data != undefined && data != '').assertTrue(); + done(); }) .catch(error => { @@ -4966,7 +4967,7 @@ describe('Image', function () { * @tc.level : Level 1 */ it('TC_172', 0, async function (done) { - await getAbilityInfo('test_exif.jpg'); + await getAbilityInfo('test_exif1.jpg'); let fdExifJpg = fileio.openSync(filePath); const imageSourceApi = image.createImageSource(fdExifJpg); if (imageSourceApi == undefined) { @@ -4981,7 +4982,7 @@ describe('Image', function () { done(); } else { console.info('TC_172 BitsPerSample ' + data); - expect(data != undefined).assertTrue(); + expect(data != undefined && data != '').assertTrue(); done(); } }) @@ -5264,7 +5265,7 @@ describe('Image', function () { * @tc.level : Level 1 */ it('TC_173', 0, async function (done) { - await getAbilityInfo('test_exif.jpg'); + await getAbilityInfo('test_exif1.jpg'); let fdExifJpg = fileio.openSync(filePath); const imageSourceApi = image.createImageSource(fdExifJpg); if (imageSourceApi == undefined) { @@ -5280,7 +5281,7 @@ describe('Image', function () { done(); } else { console.info('TC_173 BitsPerSample ' + data); - expect(data != '9999' && data != undefined).assertTrue(); + expect(data != '9999' && data != undefined && data != '').assertTrue(); done(); } }) -- GitLab