diff --git a/multimedia/image/image_js_standard/Test.json b/multimedia/image/image_js_standard/Test.json index c08e7f21d29092005cc4c912552d242abe5366f2..8227210afef73f6d78d8af7295d5bf54eec39eac 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 bad5afad6476ff00d50b4eed736add8bc403221c..640c7d457b8a50fe3b7610aaa57f0365f60a5613 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(); } })