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

!3067 杂散xts用例整改

Merge pull request !3067 from 高曦/master
......@@ -166,538 +166,4 @@ export default function screenLockJsunit() {
}
done();
});
/*
* @tc.number : MiscServices_ScreenLock_on_beginWakeUp_0100
* @tc.name : on
* @tc.desc : Receives beginWakeUp called.
*/
it('MiscServices_ScreenLock_on_beginWakeUp_0100', 0, async function (done) {
let caseName = "MiscServices_ScreenLock_on_beginWakeUp_0100";
try {
screenLock.on('beginWakeUp', (data) => {
console.info(caseName + 'Operation successful. Data: ' + JSON.stringify(data));
expect(true).assertTrue();
done();
})
} catch (err) {
console.info(caseName + 'catch error: ' + err);
expect(true).assertTrue();
done();
}
done();
});
/*
* @tc.number : MiscServices_ScreenLock_on_endWakeUp_0100
* @tc.name : on
* @tc.desc : Receives endWakeUp called.
*/
it('MiscServices_ScreenLock_on_endWakeUp_0100', 0, async function (done) {
let caseName = "MiscServices_ScreenLock_on_endWakeUp_0100";
try {
screenLock.on('endWakeUp', (data) => {
console.info(caseName + 'Operation successful. Data: ' + JSON.stringify(data));
expect(true).assertTrue();
done();
})
} catch (err) {
console.info(caseName + 'catch error: ' + err);
expect(true).assertTrue();
done();
}
done();
});
/*
* @tc.number : MiscServices_ScreenLock_on_beginScreenOn_0100
* @tc.name : on
* @tc.desc : Receives beginScreenOn called.
*/
it('MiscServices_ScreenLock_on_beginScreenOn_0100', 0, async function (done) {
let caseName = "MiscServices_ScreenLock_on_beginScreenOn_0100";
try {
screenLock.on('beginScreenOn', (data) => {
console.info(caseName + 'Operation successful. Data: ' + JSON.stringify(data));
expect(true).assertTrue();
done();
})
} catch (err) {
console.info(caseName + 'catch error: ' + err);
expect(true).assertTrue();
done();
}
done();
});
/*
* @tc.number : MiscServices_ScreenLock_on_endScreenOn_0100
* @tc.name : on
* @tc.desc : Receives endScreenOn called.
*/
it('MiscServices_ScreenLock_on_endScreenOn_0100', 0, async function (done) {
let caseName = "MiscServices_ScreenLock_on_endScreenOn_0100";
try {
screenLock.on('endScreenOn', (data) => {
console.info(caseName + 'Operation successful. Data: ' + JSON.stringify(data));
expect(true).assertTrue();
done();
})
} catch (err) {
console.info(caseName + 'catch error: ' + err);
expect(true).assertTrue();
done();
}
done();
});
/*
* @tc.number : MiscServices_ScreenLock_on_beginScreenOff_0100
* @tc.name : on
* @tc.desc : Receives beginScreenOff called.
*/
it('MiscServices_ScreenLock_on_beginScreenOff_0100', 0, async function (done) {
let caseName = "MiscServices_ScreenLock_on_beginScreenOff_0100";
try {
screenLock.on('beginScreenOff', (data) => {
console.info(caseName + 'Operation successful. Data: ' + JSON.stringify(data));
expect(true).assertTrue();
done();
})
} catch (err) {
console.info(caseName + 'catch error: ' + err);
expect(true).assertTrue();
done();
}
done();
});
/*
* @tc.number : MiscServices_ScreenLock_on_endScreenOff_0100
* @tc.name : on
* @tc.desc : Receives endScreenOff called.
*/
it('MiscServices_ScreenLock_on_endScreenOff_0100', 0, async function (done) {
let caseName = "MiscServices_ScreenLock_on_endScreenOff_0100";
try {
screenLock.on('endScreenOff', (data) => {
console.info(caseName + 'Operation successful. Data: ' + JSON.stringify(data));
expect(true).assertTrue();
done();
})
} catch (err) {
console.info(caseName + 'catch error: ' + err);
expect(true).assertTrue();
done();
}
done();
});
/*
* @tc.number : MiscServices_ScreenLock_on_unlockScreen_0100
* @tc.name : on
* @tc.desc : Receives unlockScreen called.
*/
it('MiscServices_ScreenLock_on_unlockScreen_0100', 0, async function (done) {
let caseName = "MiscServices_ScreenLock_on_unlockScreen_0100";
try {
screenLock.on('unlockScreen', (data) => {
console.info(caseName + 'Operation successful. Data: ' + JSON.stringify(data));
expect(true).assertTrue();
done();
})
} catch (err) {
console.info(caseName + 'catch error: ' + err);
expect(true).assertTrue();
done();
}
done()
});
/*
* @tc.number : MiscServices_ScreenLock_on_beginExitAnimation_0100
* @tc.name : on
* @tc.desc : Receives beginExitAnimation called.
*/
it('MiscServices_ScreenLock_on_beginExitAnimation_0100', 0, async function (done) {
let caseName = "MiscServices_ScreenLock_on_beginExitAnimation_0100";
try {
screenLock.on('beginExitAnimation', (data) => {
console.info(caseName + 'Operation successful. Data: ' + JSON.stringify(data));
expect(true).assertTrue();
done();
})
} catch (err) {
console.info(caseName + 'catch error: ' + err);
expect(true).assertTrue();
done();
}
done();
});
/*
* @tc.number : MiscServices_ScreenLock_on_beginSleep_0100
* @tc.name : on
* @tc.desc : Receives beginSleep called.
*/
it('MiscServices_ScreenLock_on_beginSleep_0100', 0, async function (done) {
let caseName = "MiscServices_ScreenLock_on_beginSleep_0100";
try {
screenLock.on('beginSleep', (number) => {
console.info(caseName + 'Operation successful. Data: ' + JSON.stringify(number));
expect(true).assertTrue();
done();
})
} catch (err) {
console.info(caseName + 'catch error: ' + err);
expect(true).assertTrue();
done();
}
done();
});
/*
* @tc.number : MiscServices_ScreenLock_on_endSleep_0100
* @tc.name : on
* @tc.desc : Receives endSleep called.
*/
it('MiscServices_ScreenLock_on_endSleep_0100', 0, async function (done) {
let caseName = "MiscServices_ScreenLock_on_endSleep_0100";
try {
screenLock.on('endSleep', (number) => {
console.info(caseName + 'Operation successful. Data: ' + JSON.stringify(number));
expect(true).assertTrue();
done();
})
} catch (err) {
console.info(caseName + 'catch error: ' + err);
expect(true).assertTrue();
done();
}
done()
});
/*
* @tc.number : MiscServices_ScreenLock_on_changeUser_0100
* @tc.name : on
* @tc.desc : Receives changeUser called.
*/
it('MiscServices_ScreenLock_on_changeUser_0100', 0, async function (done) {
let caseName = "MiscServices_ScreenLock_on_changeUser_0100";
try {
screenLock.on('changeUser', (number) => {
console.info(caseName + 'Operation successful. Data: ' + JSON.stringify(number));
expect(true).assertTrue();
done();
})
} catch (err) {
console.info(caseName + 'catch error: ' + err);
expect(true).assertTrue();
done();
}
done();
});
/**
* @tc.number Miscservices_ScreenLock_ScreenLock_screenlockEnabled_0100
* @tc.name on_screenlockEnabled
* @tc.desc Receives screenlockEnabled change. This callback is invoked when screenlockEnabled is called by runtime
*/
it('Miscservices_ScreenLock_ScreenLock_on_screenlockEnabled_0100', 0, async function (done) {
console.log("************* Miscservices_ScreenLock_ScreenLock_on_screenlockEnabled_0100 start*************");
try {
screenLock.on('screenlockEnabled', (error, enable) => {
if (error) {
expect().assertFail();
} else {
expect(true).assertTrue();
}
})
} catch (error) {
console.log("Miscservices_ScreenLock_ScreenLock_on_screenlockEnabled_0100 error " + JSON.stringify(error));
expect(true).assertTrue();
}
done();
console.log("************* Miscservices_ScreenLock_ScreenLock_on_screenlockEnabled_0100 end*************");
});
/**
* @tc.number Miscservices_ScreenLock_ScreenLock_beginWakeUp_0100
* @tc.name off_beginWakeUp
* @tc.desc Remove the receives of beginWakeUp
*/
it('Miscservices_ScreenLock_ScreenLock_beginWakeUp_0100', 0, async function (done) {
console.log("************* Miscservices_ScreenLock_ScreenLock_beginWakeUp_0100 start*************");
try {
screenLock.off('beginWakeUp', (error) => {
if (error) {
expect().assertFail();
} else {
expect(true).assertTrue();
}
})
} catch (error) {
console.log("Miscservices_ScreenLock_ScreenLock_beginWakeUp_0100 error " + JSON.stringify(error));
expect(true).assertTrue();
}
done();
console.log("************* Miscservices_ScreenLock_ScreenLock_on_screenlockEnabled_0100 end*************");
});
/**
* @tc.number Miscservices_ScreenLock_ScreenLock_endWakeUp_0100
* @tc.name off_endWakeUp
* @tc.desc Remove the receives of endWakeUp
*/
it('Miscservices_ScreenLock_ScreenLock_endWakeUp_0100', 0, async function (done) {
console.log("************* Miscservices_ScreenLock_ScreenLock_endWakeUp_0100 start*************");
try {
screenLock.off('endWakeUp', (error) => {
if (error) {
expect().assertFail();
} else {
expect(true).assertTrue();
}
})
} catch (error) {
console.log("Miscservices_ScreenLock_ScreenLock_endWakeUp_0100 error " + JSON.stringify(error));
expect(true).assertTrue();
}
done();
console.log("************* Miscservices_ScreenLock_ScreenLock_on_screenlockEnabled_0100 end*************");
});
/**
* @tc.number Miscservices_ScreenLock_ScreenLock_beginScreenOn_0100
* @tc.name off_beginScreenOn
* @tc.desc Remove the receives of beginScreenOn
*/
it('Miscservices_ScreenLock_ScreenLock_beginScreenOn_0100', 0, async function (done) {
console.log("************* Miscservices_ScreenLock_ScreenLock_beginScreenOn_0100 start*************");
try {
screenLock.off('beginScreenOn', (error) => {
if (error) {
expect().assertFail();
} else {
expect(true).assertTrue();
}
})
} catch (error) {
console.log("Miscservices_ScreenLock_ScreenLock_beginScreenOn_0100 error " + JSON.stringify(error));
expect(true).assertTrue();
}
done();
console.log("************* Miscservices_ScreenLock_ScreenLock_beginScreenOn_0100 end*************");
});
/**
* @tc.number Miscservices_ScreenLock_ScreenLock_endScreenOn_0100
* @tc.name off_endScreenOn
* @tc.desc Remove the receives of endScreenOn
*/
it('Miscservices_ScreenLock_ScreenLock_endScreenOn_0100', 0, async function (done) {
console.log("************* Miscservices_ScreenLock_ScreenLock_endScreenOn_0100 start*************");
try {
screenLock.off('endScreenOn', (error) => {
if (error) {
expect().assertFail();
} else {
expect(true).assertTrue();
}
})
} catch (error) {
console.log("Miscservices_ScreenLock_ScreenLock_endScreenOn_0100 error " + JSON.stringify(error));
expect(true).assertTrue();
}
done();
console.log("************* Miscservices_ScreenLock_ScreenLock_endScreenOn_0100 end*************");
});
/**
* @tc.number Miscservices_ScreenLock_ScreenLock_beginScreenOff_0100
* @tc.name off_beginScreenOff
* @tc.desc Remove the receives of beginScreenOff
*/
it('Miscservices_ScreenLock_ScreenLock_beginScreenOff_0100', 0, async function (done) {
console.log("************* Miscservices_ScreenLock_ScreenLock_beginScreenOff_0100 start*************");
try {
screenLock.off('beginScreenOff', (error) => {
if (error) {
expect().assertFail();
} else {
expect(true).assertTrue();
}
})
} catch (error) {
console.log("Miscservices_ScreenLock_ScreenLock_beginScreenOff_0100 error " + JSON.stringify(error));
expect(true).assertTrue();
}
done();
console.log("************* Miscservices_ScreenLock_ScreenLock_beginScreenOff_0100 end*************");
});
/**
* @tc.number Miscservices_ScreenLock_ScreenLock_unlockScreen_0100
* @tc.name off_unlockScreen
* @tc.desc Remove the receives of unlockScreen
*/
it('Miscservices_ScreenLock_ScreenLock_unlockScreen_0100', 0, async function (done) {
console.log("************* Miscservices_ScreenLock_ScreenLock_unlockScreen_0100 start*************");
try {
screenLock.off('unlockScreen', (error) => {
if (error) {
expect().assertFail();
} else {
expect(true).assertTrue();
}
})
} catch (error) {
console.log("Miscservices_ScreenLock_ScreenLock_unlockScreen_0100 error " + JSON.stringify(error));
expect(true).assertTrue();
}
done();
console.log("************* Miscservices_ScreenLock_ScreenLock_unlockScreen_0100 end*************");
});
/**
* @tc.number Miscservices_ScreenLock_ScreenLock_beginExitAnimation_0100
* @tc.name off_beginExitAnimation
* @tc.desc Remove the receives of beginExitAnimation
*/
it('Miscservices_ScreenLock_ScreenLock_beginExitAnimation_0100', 0, async function (done) {
console.log("************* Miscservices_ScreenLock_ScreenLock_beginExitAnimation_0100 start*************");
try {
screenLock.off('beginExitAnimation', (error) => {
if (error) {
expect().assertFail();
} else {
expect(true).assertTrue();
}
})
} catch (error) {
console.log("Miscservices_ScreenLock_ScreenLock_beginExitAnimation_0100 error " + JSON.stringify(error));
expect(true).assertTrue();
}
done();
console.log("************* Miscservices_ScreenLock_ScreenLock_beginExitAnimation_0100 end*************");
});
/**
* @tc.number Miscservices_ScreenLock_ScreenLock_screenlockEnabled_0100
* @tc.name off_screenlockEnabled
* @tc.desc Remove the receives of screenlockEnabled
*/
it('Miscservices_ScreenLock_ScreenLock_screenlockEnabled_0100', 0, async function (done) {
console.log("************* Miscservices_ScreenLock_ScreenLock_screenlockEnabled_0100 start*************");
try {
screenLock.off('screenlockEnabled', (error) => {
if (error) {
expect().assertFail();
} else {
expect(true).assertTrue();
}
})
} catch (error) {
console.log("Miscservices_ScreenLock_ScreenLock_screenlockEnabled_0100 error " + JSON.stringify(error));
expect(true).assertTrue();
}
done();
console.log("************* Miscservices_ScreenLock_ScreenLock_screenlockEnabled_0100 end*************");
});
/**
* @tc.number Miscservices_ScreenLock_ScreenLock_beginSleep_0100
* @tc.name off_beginSleep
* @tc.desc Remove the receives of beginSleep
*/
it('Miscservices_ScreenLock_ScreenLock_beginSleep_0100', 0, async function (done) {
console.log("************* Miscservices_ScreenLock_ScreenLock_beginSleep_0100 start*************");
try {
screenLock.off('beginSleep', (error) => {
if (error) {
expect().assertFail();
} else {
expect(true).assertTrue();
}
})
} catch (error) {
console.log("Miscservices_ScreenLock_ScreenLock_beginSleep_0100 error " + JSON.stringify(error));
expect(true).assertTrue();
}
done();
console.log("************* Miscservices_ScreenLock_ScreenLock_beginSleep_0100 end*************");
});
/**
* @tc.number Miscservices_ScreenLock_ScreenLock_endSleep_0100
* @tc.name off_endSleep
* @tc.desc Remove the receives of endSleep
*/
it('Miscservices_ScreenLock_ScreenLock_endSleep_0100', 0, async function (done) {
console.log("************* Miscservices_ScreenLock_ScreenLock_endSleep_0100 start*************");
try {
screenLock.off('endSleep', (error) => {
if (error) {
expect().assertFail();
} else {
expect(true).assertTrue();
}
})
} catch (error) {
console.log("Miscservices_ScreenLock_ScreenLock_endSleep_0100 error " + JSON.stringify(error));
expect(true).assertTrue();
}
done();
console.log("************* Miscservices_ScreenLock_ScreenLock_endSleep_0100 end*************");
});
/**
* @tc.number Miscservices_ScreenLock_ScreenLock_changeUser_0100
* @tc.name off_changeUser
* @tc.desc Remove the receives of changeUser
*/
it('Miscservices_ScreenLock_ScreenLock_changeUser_0100', 0, async function (done) {
console.log("************* Miscservices_ScreenLock_ScreenLock_changeUser_0100 start*************");
try {
screenLock.off('changeUser', (error) => {
if (error) {
expect().assertFail();
} else {
expect(true).assertTrue();
}
})
} catch (error) {
console.log("Miscservices_ScreenLock_ScreenLock_changeUser_0100 error " + JSON.stringify(error));
expect(true).assertTrue();
}
done();
console.log("************* Miscservices_ScreenLock_ScreenLock_changeUser_0100 end*************");
});
/**
* @tc.number Miscservices_ScreenLock_ScreenLock_sendScreenLockEvent_0100
* @tc.name sendScreenLockEvent
* @tc.desc screenlockAPP send event to sendScreenLockEvent
*/
it('Miscservices_ScreenLock_ScreenLock_sendScreenLockEvent_0100', 0, async function (done) {
console.log("************* Miscservices_ScreenLock_ScreenLock_sendScreenLockEvent_0100 start*************");
try {
screenLock.sendScreenLockEvent('clock', 1000, (error, result) => {
if (error) {
expect().assertFail();
} else {
console.log("Miscservices_ScreenLock_ScreenLock_sendScreenLockEvent_0100 success " + JSON.stringify(result));
expect(true).assertTrue();
}
})
} catch (error) {
console.log("Miscservices_ScreenLock_ScreenLock_sendScreenLockEvent_0100 error " + JSON.stringify(error));
expect(true).assertTrue();
}
done();
console.log("************* Miscservices_ScreenLock_ScreenLock_sendScreenLockEvent_0100 end*************");
});
console.log("************* screenLock Test end*************");
})
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册