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

!4169 3.2.5.1 camera xts-acts check in

Merge pull request !4169 from veereshkadasani/3.2.5.1
......@@ -15,10 +15,10 @@
import cameraJSUnitEnum from './CameraJSUnitEnum.test.ets'
import cameraJSUnitCameraFormat from './CameraJSUnitCameraFormat.test.ets'
//import cameraJSUnitPhotoAsync from './CameraJSUnitPhotoAsync.test.ets'
//import cameraJSUnitPhotoPromise from './CameraJSUnitPhotoPromise.test.ets'
//import cameraJSUnitVideoAsync from './CameraJSUnitVideoAsync.test.ets'
//import cameraJSUnitVideoPromise from './CameraJSUnitVideoPromise.test.ets'
import cameraJSUnitPhotoAsync from './CameraJSUnitPhotoAsync.test.ets'
import cameraJSUnitPhotoPromise from './CameraJSUnitPhotoPromise.test.ets'
import cameraJSUnitVideoAsync from './CameraJSUnitVideoAsync.test.ets'
import cameraJSUnitVideoPromise from './CameraJSUnitVideoPromise.test.ets'
let TAG = 'CameraModuleTest: '
......@@ -28,8 +28,8 @@ export default function cameraKit(surfaceId: any) {
cameraJSUnitEnum(surfaceId)
cameraJSUnitCameraFormat(surfaceId)
//cameraJSUnitPhotoAsync(surfaceId)
//cameraJSUnitPhotoPromise(surfaceId)
//cameraJSUnitVideoAsync(surfaceId)
//cameraJSUnitVideoPromise(surfaceId)
cameraJSUnitPhotoAsync(surfaceId)
cameraJSUnitPhotoPromise(surfaceId)
cameraJSUnitVideoAsync(surfaceId)
cameraJSUnitVideoPromise(surfaceId)
}
\ No newline at end of file
......@@ -286,7 +286,6 @@ export default function cameraJSUnitCameraFormat(surfaceId: any) {
console.info(TAG + "Entering CREATE_CAMERA_INPUT_TC_005 FAILED: " + err.message);
}
console.info(TAG + "Entering CREATE_CAMERA_INPUT_TC_005 ends here");
camera0Input.release();
await sleep(1000);
done();
})
......@@ -689,7 +688,6 @@ export default function cameraJSUnitCameraFormat(surfaceId: any) {
*/
it('CREATE_CAMERA_INPUT_POS_BACK_TYPE_UNSPECIFIED_TC_021', 0, async function (done) {
console.info("--------------CREATE_CAMERA_INPUT_POS_BACK_TYPE_UNSPECIFIED_TC_021--------------");
camera0InputPromise.release();
cameraManager.createCameraInput(cameraObj.CameraPosition.CAMERA_POSITION_BACK, cameraObj.CameraType.CAMERA_TYPE_UNSPECIFIED, async (err, data) => {
if (!err) {
console.info(TAG + "Entering CREATE_CAMERA_INPUT_POS_BACK_TYPE_UNSPECIFIED_TC_021 success");
......@@ -704,7 +702,6 @@ export default function cameraJSUnitCameraFormat(surfaceId: any) {
expect().assertFail();
}
console.info(TAG + "Entering CREATE_CAMERA_INPUT_POS_BACK_TYPE_UNSPECIFIED_TC_021 ends here");
camera0InputPosBack.release();
await sleep(1000);
done();
})
......@@ -1007,7 +1004,6 @@ export default function cameraJSUnitCameraFormat(surfaceId: any) {
expect().assertFail();
}
console.info(TAG + "Entering CREATE_CAMERA_INPUT_POS_FRONT_TYPE_UNSPECIFIED_TC_031 ends here");
camera0InputPosFront.release();
await sleep(1000);
done();
})
......
......@@ -226,7 +226,6 @@ export default function cameraJSUnitEnum(surfaceId: any) {
console.info(TAG + "Entering CREATE_CAMERA_INPUT_TC_003 FAILED: " + err.message);
}
console.info(TAG + "Entering CREATE_CAMERA_INPUT_TC_003 ends here");
camera0Input.release();
await sleep(1000);
done();
})
......@@ -481,5 +480,29 @@ export default function cameraJSUnitEnum(surfaceId: any) {
await sleep(1000);
done();
})
/**
* @tc.number : VIDEOSTABILIZATION_ENUM
* @tc.name : VIDEOSTABILIZATION ENAME
* @tc.desc : VIDEOSTABILIZATION ENAME
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('VideoStabilization', 0, async function (done) {
console.info(TAG + "--------------VideoStabilization ------------")
console.info(TAG + "VideoStabilization OFF : " + cameraObj.VideoStabilizationMode.OFF);
expect(cameraObj.VideoStabilizationMode.OFF).assertEqual(0);
console.info(TAG + "VideoStabilization LOW : " + cameraObj.VideoStabilizationMode.LOW);
expect(cameraObj.VideoStabilizationMode.LOW).assertEqual(1);
console.info(TAG + "VideoStabilization MIDDLE : " + cameraObj.VideoStabilizationMode.MIDDLE);
expect(cameraObj.VideoStabilizationMode.MIDDLE).assertEqual(2);
console.info(TAG + "VideoStabilization HIGH : " + cameraObj.VideoStabilizationMode.HIGH);
expect(cameraObj.VideoStabilizationMode.HIGH).assertEqual(3);
console.info(TAG + "VideoStabilization AUTO : " + cameraObj.VideoStabilizationMode.AUTO);
expect(cameraObj.VideoStabilizationMode.AUTO).assertEqual(4);
await sleep(1000);
done();
})
})
}
\ No newline at end of file
......@@ -456,35 +456,6 @@ export default function cameraJSUnitPhotoAsync(surfaceId: any) {
done();
})
/**
* @tc.number : isMirrorSupported_PHOTO_OUTPUT
* @tc.name : isMirrorSupported
* @tc.desc : isMirrorSupported
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('isMirrorSupported_PHOTO_OUTPUT', 0, async function (done) {
if (photoOutputAsync == null || photoOutputAsync == undefined) {
console.info(TAG + "photoOutput == null || undefined");
} else {
console.info(TAG + "Entering isMirrorSupported_PHOTO_OUTPUT to operate");
photoOutputAsync.isMirrorSupported(async (err, data) => {
if (!err) {
console.info(TAG + "Entering isMirrorSupported_PHOTO_OUTPUT is success");
console.info(TAG + "isMirrorSupported : " + data);
expect(true).assertTrue();
} else {
expect().assertFail();
}
await sleep(1000);
done();
})
await sleep(1000);
done();
}
})
/**
* @tc.number : PHOTO_OUTPUT_CALLBACK_ON_ERROR
* @tc.name : Photo output callback on error api
......@@ -868,64 +839,6 @@ export default function cameraJSUnitPhotoAsync(surfaceId: any) {
}
})
/**
* @tc.number : setMirror_1
* @tc.name : setMirror 1
* @tc.desc : setMirror 1
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('setMirror_1', 0, async function (done) {
if (photoOutputAsync == null || photoOutputAsync == undefined) {
console.info(TAG + "photoOutput == null || undefined");
} else {
console.info(TAG + "Entering setMirror_1 to operate");
photoOutputAsync.setMirror(1, async (err, data) => {
if (!err) {
console.info(TAG + "Entering setMirror_1 is success:");
console.info(TAG + "setMirror is : " + '1');
expect(true).assertTrue();
} else {
expect().assertFail();
}
await sleep(1000);
done();
})
await sleep(1000);
done();
}
})
/**
* @tc.number : setMirror_0
* @tc.name : setMirror 0
* @tc.desc : setMirror 0
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('setMirror_0', 0, async function (done) {
if (photoOutputAsync == null || photoOutputAsync == undefined) {
console.info(TAG + "photoOutput == null || undefined");
} else {
console.info(TAG + "Entering setMirror_0 to operate");
photoOutputAsync.setMirror(0, async (err, data) => {
if (!err) {
console.info(TAG + "Entering setMirror_0 is success:");
console.info(TAG + "setMirror is : " + '0');
expect(true).assertTrue();
} else {
expect().assertFail();
}
await sleep(1000);
done();
})
await sleep(1000);
done();
}
})
/*CaptureSession APIs*/
/**
* @tc.number : BEGIN_CONFIG_SUCCESS
......
......@@ -419,36 +419,6 @@ export default function cameraJSUnitPhotoPromise(surfaceId: any) {
done();
})
/**
* @tc.number : isMirrorSupported_PHOTO_OUTPUT
* @tc.name : isMirrorSupported
* @tc.desc : isMirrorSupported
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('isMirrorSupported_PHOTO_OUTPUT', 0, async function (done) {
if (photoOutputPromise == null || photoOutputPromise == undefined) {
console.info(TAG + "photoOutput == null || undefined");
} else {
console.info(TAG + "Entering isMirrorSupported_PHOTO_OUTPUT to operate");
await photoOutputPromise.isMirrorSupported()
.then(function (data) {
console.info(TAG + "Entering isMirrorSupported_PHOTO_OUTPUT is success");
console.info(TAG + "isMirrorSupported : " + data);
expect(true).assertTrue();
})
.catch((err) => {
expect().assertFail();
console.info(TAG + "isMirrorSupported_PHOTO_OUTPUT FAILED : " + err.message);
});
await sleep(1000);
done();
}
await sleep(1000);
done();
})
/**
* @tc.number : PHOTO_OUTPUT_CALLBACK_ON_ERROR
* @tc.name : Photo output callback on error api
......@@ -778,10 +748,10 @@ export default function cameraJSUnitPhotoPromise(surfaceId: any) {
expect().assertFail();
console.info(TAG + "setMirror_true FAILED : " + err.message);
});
await sleep(2000);
await sleep(1000);
done();
}
await sleep(2000);
await sleep(1000);
done();
})
......@@ -808,70 +778,10 @@ export default function cameraJSUnitPhotoPromise(surfaceId: any) {
expect().assertFail();
console.info(TAG + "setMirror_false FAILED : " + err.message);
});
await sleep(2000);
done();
}
await sleep(2000);
done();
})
/**
* @tc.number : setMirror_1
* @tc.name : setMirror 1
* @tc.desc : setMirror 1
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('setMirror_1', 0, async function (done) {
if (photoOutputPromise == null || photoOutputPromise == undefined) {
console.info(TAG + "photoOutput == null || undefined");
} else {
console.info(TAG + "Entering setMirror_1 to operate");
await photoOutputPromise.setMirror(1)
.then(function (data) {
console.info(TAG + "Entering setMirror_1 is success:");
console.info(TAG + "setMirror is : " + '1');
expect(true).assertTrue();
})
.catch((err) => {
expect().assertFail();
console.info(TAG + "setMirror_1 FAILED : " + err.message);
});
await sleep(2000);
done();
}
await sleep(2000);
done();
})
/**
* @tc.number : setMirror_0
* @tc.name : setMirror 0
* @tc.desc : setMirror 0
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('setMirror_0', 0, async function (done) {
if (photoOutputPromise == null || photoOutputPromise == undefined) {
console.info(TAG + "photoOutput == null || undefined");
} else {
console.info(TAG + "Entering setMirror_0 to operate");
await photoOutputPromise.setMirror(0)
.then(function (data) {
console.info(TAG + "Entering setMirror_0 is success:");
console.info(TAG + "setMirror is : " + '0');
expect(true).assertTrue();
})
.catch((err) => {
expect().assertFail();
console.info(TAG + "setMirror_0 FAILED : " + err.message);
});
await sleep(2000);
await sleep(1000);
done();
}
await sleep(2000);
await sleep(1000);
done();
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册