From 784f4d754d5ccfb34c7295cb446d5bc9f23f6976 Mon Sep 17 00:00:00 2001 From: greada Date: Mon, 22 Aug 2022 18:01:32 +0800 Subject: [PATCH] OpenHarmony-3.1-Release match for system api Signed-off-by: greada --- .../src/main/js/default/test/battery_unit.test.js | 1 - .../main/js/default/test/power_manager_running_lock.test.js | 2 -- .../js/default/test/power_manager_running_lock_dev.test.js | 2 -- .../src/main/js/default/test/system_display.test.js | 4 ++-- .../main/js/default/test/power_manager_running_lock.test.js | 1 - 5 files changed, 2 insertions(+), 8 deletions(-) diff --git a/powermgr/powermgrbattery/src/main/js/default/test/battery_unit.test.js b/powermgr/powermgrbattery/src/main/js/default/test/battery_unit.test.js index 60cd2824d..fedcb4781 100755 --- a/powermgr/powermgrbattery/src/main/js/default/test/battery_unit.test.js +++ b/powermgr/powermgrbattery/src/main/js/default/test/battery_unit.test.js @@ -14,7 +14,6 @@ */ import app from '@system.app' -import Context from '@ohos.napi_context' import batteryInfo from '@ohos.batteryInfo'; import brightness from '@ohos.brightness'; import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' diff --git a/powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock.test.js b/powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock.test.js index 0eda6c39f..d91a2fd0a 100644 --- a/powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock.test.js +++ b/powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock.test.js @@ -14,10 +14,8 @@ */ import app from '@system.app' -import Context from '@ohos.napi_context' import runningLock from '@ohos.runningLock'; import power from '@ohos.power'; -import '@ohos.permission.RUNNING_LOCK' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' diff --git a/powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock_dev.test.js b/powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock_dev.test.js index 41a342803..ab9709dca 100755 --- a/powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock_dev.test.js +++ b/powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock_dev.test.js @@ -14,10 +14,8 @@ */ import app from '@system.app' -import Context from '@ohos.napi_context' import runningLock from '@ohos.runningLock'; import power from '@ohos.power'; -import '@ohos.permission.RUNNING_LOCK' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' diff --git a/powermgr/powermgrdisplay/src/main/js/default/test/system_display.test.js b/powermgr/powermgrdisplay/src/main/js/default/test/system_display.test.js index 85d72e546..8fe264272 100644 --- a/powermgr/powermgrdisplay/src/main/js/default/test/system_display.test.js +++ b/powermgr/powermgrdisplay/src/main/js/default/test/system_display.test.js @@ -17,8 +17,8 @@ import brightness from '@system.brightness'; import { describe } from 'deccjsunit/index'; const INPUT_ERROR_CODE_CODE = 202; -const SET_VALUE_MSG = "value is not an available number"; -const SET_MODE_MSG = "value is not an available number"; +const SET_VALUE_MSG = "setMode: value is not an available number"; +const SET_MODE_MSG = "setMode: value is not an available number"; function sleep(time){ return new Promise((resolve) => setTimeout(resolve, time)); diff --git a/powermgr/powermgrpower/src/main/js/default/test/power_manager_running_lock.test.js b/powermgr/powermgrpower/src/main/js/default/test/power_manager_running_lock.test.js index 298a43f7b..fed8b4be6 100755 --- a/powermgr/powermgrpower/src/main/js/default/test/power_manager_running_lock.test.js +++ b/powermgr/powermgrpower/src/main/js/default/test/power_manager_running_lock.test.js @@ -14,7 +14,6 @@ */ import runningLock from '@ohos.runningLock'; -import '@ohos.permission.RUNNING_LOCK' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' -- GitLab