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

!6776 电话服务register用例整改

Merge pull request !6776 from zhangfuzhi/master
...@@ -19,7 +19,6 @@ import observer from '@ohos.telephony.observer'; ...@@ -19,7 +19,6 @@ import observer from '@ohos.telephony.observer';
export default function ObserverJsunit() { export default function ObserverJsunit() {
describe('ObserverJsunit', function () { describe('ObserverJsunit', function () {
console.log("************* Observer Test start *************"); console.log("************* Observer Test start *************");
let envReady = false;
/* /*
* @tc.number : Telephony_observer_observer_DataConnectState_0100 * @tc.number : Telephony_observer_observer_DataConnectState_0100
...@@ -446,11 +445,6 @@ export default function ObserverJsunit() { ...@@ -446,11 +445,6 @@ export default function ObserverJsunit() {
* @tc.desc : check the SIM_NONE property of LockReason * @tc.desc : check the SIM_NONE property of LockReason
*/ */
it('Telephony_observer_LockReason_SIM_NONE_0100', 0, function (done) { it('Telephony_observer_LockReason_SIM_NONE_0100', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("************* Telephony_observer_LockReason_SIM_NONE_0100 Test start *************") console.log("************* Telephony_observer_LockReason_SIM_NONE_0100 Test start *************")
expect(0).assertEqual(observer.LockReason.SIM_NONE); expect(0).assertEqual(observer.LockReason.SIM_NONE);
done(); done();
...@@ -463,11 +457,6 @@ export default function ObserverJsunit() { ...@@ -463,11 +457,6 @@ export default function ObserverJsunit() {
* @tc.desc : check the SIM_PIN property of LockReason * @tc.desc : check the SIM_PIN property of LockReason
*/ */
it('Telephony_observer_LockReason_SIM_PIN_0100', 0, function (done) { it('Telephony_observer_LockReason_SIM_PIN_0100', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("************* Telephony_observer_LockReason_SIM_PIN_0100 Test start *************"); console.log("************* Telephony_observer_LockReason_SIM_PIN_0100 Test start *************");
expect(1).assertEqual(observer.LockReason.SIM_PIN); expect(1).assertEqual(observer.LockReason.SIM_PIN);
done(); done();
...@@ -480,11 +469,6 @@ export default function ObserverJsunit() { ...@@ -480,11 +469,6 @@ export default function ObserverJsunit() {
* @tc.desc : check the SIM_PUK property of LockReason * @tc.desc : check the SIM_PUK property of LockReason
*/ */
it('Telephony_observer_LockReason_SIM_PUK_0100', 0, function (done) { it('Telephony_observer_LockReason_SIM_PUK_0100', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("************* Telephony_observer_LockReason_SIM_PUK_0100 Test start *************"); console.log("************* Telephony_observer_LockReason_SIM_PUK_0100 Test start *************");
expect(2).assertEqual(observer.LockReason.SIM_PUK); expect(2).assertEqual(observer.LockReason.SIM_PUK);
done(); done();
...@@ -497,11 +481,6 @@ export default function ObserverJsunit() { ...@@ -497,11 +481,6 @@ export default function ObserverJsunit() {
* @tc.desc : check the SIM_PN_PIN property of LockReason * @tc.desc : check the SIM_PN_PIN property of LockReason
*/ */
it('Telephony_observer_LockReason_SIM_PN_PIN_0100', 0, function (done) { it('Telephony_observer_LockReason_SIM_PN_PIN_0100', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("************* Telephony_observer_LockReason_SIM_PN_PIN_0100 Test start *************"); console.log("************* Telephony_observer_LockReason_SIM_PN_PIN_0100 Test start *************");
expect(3).assertEqual(observer.LockReason.SIM_PN_PIN); expect(3).assertEqual(observer.LockReason.SIM_PN_PIN);
done(); done();
...@@ -513,11 +492,6 @@ export default function ObserverJsunit() { ...@@ -513,11 +492,6 @@ export default function ObserverJsunit() {
* @tc.desc : check the SIM_PN_PUK property of LockReason * @tc.desc : check the SIM_PN_PUK property of LockReason
*/ */
it('Telephony_observer_LockReason_SIM_PN_PUK_0100', 0, function (done) { it('Telephony_observer_LockReason_SIM_PN_PUK_0100', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("************* Telephony_observer_LockReason_SIM_PN_PUK_0100 Test start *************"); console.log("************* Telephony_observer_LockReason_SIM_PN_PUK_0100 Test start *************");
expect(4).assertEqual(observer.LockReason.SIM_PN_PUK); expect(4).assertEqual(observer.LockReason.SIM_PN_PUK);
done(); done();
...@@ -530,11 +504,6 @@ export default function ObserverJsunit() { ...@@ -530,11 +504,6 @@ export default function ObserverJsunit() {
* @tc.desc : check the SIM_PU_PIN property of LockReason * @tc.desc : check the SIM_PU_PIN property of LockReason
*/ */
it('Telephony_observer_LockReason_SIM_PU_PIN_0100', 0, function (done) { it('Telephony_observer_LockReason_SIM_PU_PIN_0100', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("************* Telephony_observer_LockReason_SIM_PU_PIN_0100 Test start *************"); console.log("************* Telephony_observer_LockReason_SIM_PU_PIN_0100 Test start *************");
expect(5).assertEqual(observer.LockReason.SIM_PU_PIN); expect(5).assertEqual(observer.LockReason.SIM_PU_PIN);
done(); done();
...@@ -547,11 +516,6 @@ export default function ObserverJsunit() { ...@@ -547,11 +516,6 @@ export default function ObserverJsunit() {
* @tc.desc : check the SIM_PU_PUK property of LockReason * @tc.desc : check the SIM_PU_PUK property of LockReason
*/ */
it('Telephony_observer_LockReason_SIM_PU_PUK_0100', 0, function (done) { it('Telephony_observer_LockReason_SIM_PU_PUK_0100', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("************* Telephony_observer_LockReason_SIM_PU_PUK_0100 Test start *************"); console.log("************* Telephony_observer_LockReason_SIM_PU_PUK_0100 Test start *************");
expect(6).assertEqual(observer.LockReason.SIM_PU_PUK); expect(6).assertEqual(observer.LockReason.SIM_PU_PUK);
done(); done();
...@@ -564,11 +528,6 @@ export default function ObserverJsunit() { ...@@ -564,11 +528,6 @@ export default function ObserverJsunit() {
* @tc.desc : check the SIM_PP_PIN property of LockReason * @tc.desc : check the SIM_PP_PIN property of LockReason
*/ */
it('Telephony_observer_LockReason_SIM_PP_PIN_0100', 0, function (done) { it('Telephony_observer_LockReason_SIM_PP_PIN_0100', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("************* Telephony_observer_LockReason_SIM_PP_PIN_0100 Test start *************"); console.log("************* Telephony_observer_LockReason_SIM_PP_PIN_0100 Test start *************");
expect(7).assertEqual(observer.LockReason.SIM_PP_PIN); expect(7).assertEqual(observer.LockReason.SIM_PP_PIN);
done(); done();
...@@ -581,11 +540,6 @@ export default function ObserverJsunit() { ...@@ -581,11 +540,6 @@ export default function ObserverJsunit() {
* @tc.desc : check the SIM_PP_PUK property of LockReason * @tc.desc : check the SIM_PP_PUK property of LockReason
*/ */
it('Telephony_observer_LockReason_SIM_PP_PUK_0100', 0, function (done) { it('Telephony_observer_LockReason_SIM_PP_PUK_0100', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("************* Telephony_observer_LockReason_SIM_PP_PUK_0100 Test start *************"); console.log("************* Telephony_observer_LockReason_SIM_PP_PUK_0100 Test start *************");
expect(8).assertEqual(observer.LockReason.SIM_PP_PUK); expect(8).assertEqual(observer.LockReason.SIM_PP_PUK);
done(); done();
...@@ -598,11 +552,6 @@ export default function ObserverJsunit() { ...@@ -598,11 +552,6 @@ export default function ObserverJsunit() {
* @tc.desc : check the SIM_PC_PIN property of LockReason * @tc.desc : check the SIM_PC_PIN property of LockReason
*/ */
it('Telephony_observer_LockReason_SIM_PC_PIN_0100', 0, function (done) { it('Telephony_observer_LockReason_SIM_PC_PIN_0100', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("************* Telephony_observer_LockReason_SIM_PC_PIN_0100 Test start *************"); console.log("************* Telephony_observer_LockReason_SIM_PC_PIN_0100 Test start *************");
expect(9).assertEqual(observer.LockReason.SIM_PC_PIN); expect(9).assertEqual(observer.LockReason.SIM_PC_PIN);
done(); done();
...@@ -615,11 +564,6 @@ export default function ObserverJsunit() { ...@@ -615,11 +564,6 @@ export default function ObserverJsunit() {
* @tc.desc : check the SIM_PC_PUK property of LockReason * @tc.desc : check the SIM_PC_PUK property of LockReason
*/ */
it('Telephony_observer_LockReason_SIM_PC_PUK_0100', 0, function (done) { it('Telephony_observer_LockReason_SIM_PC_PUK_0100', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("************* Telephony_observer_LockReason_SIM_PC_PUK_0100 Test start *************"); console.log("************* Telephony_observer_LockReason_SIM_PC_PUK_0100 Test start *************");
expect(10).assertEqual(observer.LockReason.SIM_PC_PUK); expect(10).assertEqual(observer.LockReason.SIM_PC_PUK);
done(); done();
...@@ -632,11 +576,6 @@ export default function ObserverJsunit() { ...@@ -632,11 +576,6 @@ export default function ObserverJsunit() {
* @tc.desc : check the SIM_SIM_PIN property of LockReason * @tc.desc : check the SIM_SIM_PIN property of LockReason
*/ */
it('Telephony_observer_LockReason_SIM_SIM_PIN_0100', 0, function (done) { it('Telephony_observer_LockReason_SIM_SIM_PIN_0100', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("************* Telephony_observer_LockReason_SIM_SIM_PIN_0100 Test start *************"); console.log("************* Telephony_observer_LockReason_SIM_SIM_PIN_0100 Test start *************");
expect(11).assertEqual(observer.LockReason.SIM_SIM_PIN); expect(11).assertEqual(observer.LockReason.SIM_SIM_PIN);
done(); done();
...@@ -649,11 +588,6 @@ export default function ObserverJsunit() { ...@@ -649,11 +588,6 @@ export default function ObserverJsunit() {
* @tc.desc : check the SIM_SIM_PUK property of LockReason * @tc.desc : check the SIM_SIM_PUK property of LockReason
*/ */
it('Telephony_observer_LockReason_SIM_SIM_PUK_0100', 0, function (done) { it('Telephony_observer_LockReason_SIM_SIM_PUK_0100', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("************* Telephony_observer_LockReason_SIM_SIM_PUK_0100 Test start *************"); console.log("************* Telephony_observer_LockReason_SIM_SIM_PUK_0100 Test start *************");
expect(12).assertEqual(observer.LockReason.SIM_SIM_PUK); expect(12).assertEqual(observer.LockReason.SIM_SIM_PUK);
done(); done();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册