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

!8938 【代码上库】【xts_acts】【powermgr】【OpenHarmony-3.2-Release】 power test code optimization

Merge pull request !8938 from kangqiao/OpenHarmony-3.2-Release
......@@ -39,7 +39,7 @@ function completeFunc(tag) {
}
export default function SystemBatteryTest() {
describe('SystemBatteryTest', function () {
describe('SystemBatteryTest', function () {
console.log("*************System Battery Unit Test Begin*************");
/**
......@@ -47,8 +47,7 @@ describe('SystemBatteryTest', function () {
* @tc.name get_status_success_test
* @tc.desc Battery acquisition kit
*/
const successTest = "get_status_success_test";
it(successTest, 0, function () {
it('get_status_success_test', 0, function () {
battery.getStatus({
success: (data) => {
successFunc(data, successTest);
......@@ -67,8 +66,7 @@ describe('SystemBatteryTest', function () {
* @tc.name get_status_success_null_test
* @tc.desc Battery acquisition kit
*/
const successNullTest = "get_status_success_null_test";
it(successNullTest, 0, function () {
it('get_status_success_null_test', 0, function () {
battery.getStatus({
success: null,
fail: (data, code) => {
......@@ -85,8 +83,7 @@ describe('SystemBatteryTest', function () {
* @tc.name get_status_success_empty_test
* @tc.desc Battery acquisition kit
*/
const successEmptyTest = "get_status_success_null_test";
it(successEmptyTest, 0, function () {
it('get_status_success_empty_test', 0, function () {
battery.getStatus({
fail: (data, code) => {
failFunc(data, code, successEmptyTest);
......@@ -102,8 +99,7 @@ describe('SystemBatteryTest', function () {
* @tc.name get_status_fail_null_test
* @tc.desc Battery acquisition kit
*/
let failNullTest = "get_status_fail_null_test";
it(failNullTest, 0, function () {
it('get_status_fail_null_test', 0, function () {
battery.getStatus({
success: (data) => {
successFunc(data, failNullTest);
......@@ -120,8 +116,7 @@ describe('SystemBatteryTest', function () {
* @tc.name get_status_fail_empty_test
* @tc.desc Battery acquisition kit
*/
let failEmptyTest = "get_status_fail_empty_test";
it(failEmptyTest, 0, function () {
it('get_status_fail_empty_test', 0, function () {
battery.getStatus({
success: () => {
successFunc(data, failEmptyTest);
......@@ -137,8 +132,7 @@ describe('SystemBatteryTest', function () {
* @tc.name get_status_complete_null_test
* @tc.desc Battery acquisition kit
*/
let completeNullTest = "get_status_complete_null_test";
it(completeNullTest, 0, function () {
it('get_status_complete_null_test', 0, function () {
battery.getStatus({
success: (data) => {
successFunc(data, completeNullTest);
......@@ -155,8 +149,7 @@ describe('SystemBatteryTest', function () {
* @tc.name get_status_complete_empty_test
* @tc.desc Battery acquisition kit
*/
let completeEmptyTest = "get_status_complete_empty_test";
it(completeEmptyTest, 0, function () {
it('get_status_complete_empty_test', 0, function () {
battery.getStatus({
success: (data) => {
successFunc(data, completeEmptyTest);
......@@ -192,5 +185,5 @@ describe('SystemBatteryTest', function () {
battery.getStatus();
expect(!allNull).assertTrue();
});
})
})
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册