未验证 提交 d4a0b716 编写于 作者: O openharmony_ci 提交者: Gitee

!4296 Image monthly失败用例修改

Merge pull request !4296 from 秦莉文/cherry-pick-1657717696
...@@ -26,14 +26,16 @@ ...@@ -26,14 +26,16 @@
"pre-push": [ "pre-push": [
], ],
"push": [ "push": [
"./resource/image/test_exif.jpg ->/data/app/el2/100/base/ohos.acts.multimedia.image.Exif/files" "./resource/image/test_exif.jpg ->/data/app/el2/100/base/ohos.acts.multimedia.image.Exif/files",
"./resource/image/test_exif1.jpg ->/data/app/el2/100/base/ohos.acts.multimedia.image.Exif/files"
] ]
}, },
{ {
"type": "ShellKit", "type": "ShellKit",
"run-command": [ "run-command": [
"chmod 777 /data/app/el2/100/base/ohos.acts.multimedia.image.Exif/files/test_exif.jpg" "chmod 777 /data/app/el2/100/base/ohos.acts.multimedia.image.Exif/files/test_exif.jpg",
"chmod 777 /data/app/el2/100/base/ohos.acts.multimedia.image.Exif/files/test_exif1.jpg"
], ],
"teardown-command":[ "teardown-command":[
......
...@@ -22,6 +22,7 @@ import bundle from '@ohos.bundle' ...@@ -22,6 +22,7 @@ import bundle from '@ohos.bundle'
describe('Image', function () { describe('Image', function () {
var pathExifJpg = '/data/storage/el2/base/files/test_exif.jpg'; var pathExifJpg = '/data/storage/el2/base/files/test_exif.jpg';
var pathExifJpg1 = '/data/storage/el2/base/files/test_exif1.jpg';
let globalpixelmap; let globalpixelmap;
beforeAll(async function () { beforeAll(async function () {
await applyPermission(); await applyPermission();
...@@ -1230,7 +1231,7 @@ describe('Image', function () { ...@@ -1230,7 +1231,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_171', 0, async function (done) { it('TC_171', 0, async function (done) {
let fdNumber = fileio.openSync(pathExifJpg); let fdNumber = fileio.openSync(pathExifJpg1);
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_171 create image source failed'); console.info('TC_171 create image source failed');
...@@ -1240,7 +1241,7 @@ describe('Image', function () { ...@@ -1240,7 +1241,7 @@ describe('Image', function () {
imageSourceApi.getImageProperty("BitsPerSample") imageSourceApi.getImageProperty("BitsPerSample")
.then(data => { .then(data => {
console.info('TC_171 BitsPerSample ' + data); console.info('TC_171 BitsPerSample ' + data);
expect(data != undefined).assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
}) })
.catch(error => { .catch(error => {
...@@ -1526,7 +1527,7 @@ describe('Image', function () { ...@@ -1526,7 +1527,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_172', 0, async function (done) { it('TC_172', 0, async function (done) {
let fdNumber = fileio.openSync(pathExifJpg); let fdNumber = fileio.openSync(pathExifJpg1);
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_172 create image source failed'); console.info('TC_172 create image source failed');
...@@ -1540,7 +1541,7 @@ describe('Image', function () { ...@@ -1540,7 +1541,7 @@ describe('Image', function () {
done(); done();
} else { } else {
console.info('TC_172 BitsPerSample ' + data); console.info('TC_172 BitsPerSample ' + data);
expect(data != undefined).assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
} }
}) })
...@@ -1815,7 +1816,7 @@ describe('Image', function () { ...@@ -1815,7 +1816,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_173', 0, async function (done) { it('TC_173', 0, async function (done) {
let fdNumber = fileio.openSync(pathExifJpg); let fdNumber = fileio.openSync(pathExifJpg1);
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_173 create image source failed'); console.info('TC_173 create image source failed');
...@@ -1830,7 +1831,7 @@ describe('Image', function () { ...@@ -1830,7 +1831,7 @@ describe('Image', function () {
done(); done();
} else { } else {
console.info('TC_173 BitsPerSample ' + data); console.info('TC_173 BitsPerSample ' + data);
expect(data != '9999' && data != undefined).assertTrue(); expect(data != '9999' && data != undefined && data != '').assertTrue();
done(); done();
} }
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册