Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
29e27f1e
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
接近 2 年 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
29e27f1e
编写于
6月 27, 2022
作者:
O
openharmony_ci
提交者:
Gitee
6月 27, 2022
浏览文件
操作
浏览文件
下载
差异文件
!3822 【multimodalinput&powermgr】【monthly】电源&多模用例适配---同步
Merge pull request !3822 from logic42/monthly_20220614
上级
5875135f
74312fc1
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
195 addition
and
13 deletion
+195
-13
multimodalinput/input_js_standard/src/main/js/default/test/InputDevice.test.js
..._js_standard/src/main/js/default/test/InputDevice.test.js
+64
-0
multimodalinput/input_js_standard/src/main/js/default/test/ListMultimodalinput.test.js
...dard/src/main/js/default/test/ListMultimodalinput.test.js
+1
-1
powermgr/battery_manager/src/main/js/default/test/battery_unit.test.js
...ery_manager/src/main/js/default/test/battery_unit.test.js
+125
-7
powermgr/battery_manager/src/main/js/default/test/batterymanager_performance.test.js
...c/main/js/default/test/batterymanager_performance.test.js
+1
-1
powermgr/power_manager/src/main/js/default/test/power_manager_running_lock.test.js
...c/main/js/default/test/power_manager_running_lock.test.js
+2
-2
powermgr/power_manager/src/main/js/default/test/power_performance_test.js
...anager/src/main/js/default/test/power_performance_test.js
+2
-2
未找到文件。
multimodalinput/input_js_standard/src/main/js/default/test/InputDevice.test.js
浏览文件 @
29e27f1e
...
@@ -189,4 +189,68 @@ describe('MultimodalInput_test', function () {
...
@@ -189,4 +189,68 @@ describe('MultimodalInput_test', function () {
console
.
log
(
`inputDevice::getKeyboardType_test-03 exit`
);
console
.
log
(
`inputDevice::getKeyboardType_test-03 exit`
);
});
});
})
})
/**
* @tc.number MultimodalInputDevice_js_0010
* @tc.name remainingChargeTime_test
* @tc.desc Battry Present Interface Test
*/
it
(
'
MultimodalInputDevice_KeyboardType_NONE_test
'
,
0
,
function
()
{
console
.
info
(
'
MultimodalInputDevice_KeyboardType_NONE_test =
'
+
inputDevice
.
KeyboardType
.
NONE
);
expect
(
inputDevice
.
KeyboardType
.
NONE
==
0
).
assertTrue
();
})
/**
* @tc.number MultimodalInputDevice_js_0020
* @tc.name remainingChargeTime_test
* @tc.desc Battry Present Interface Test
*/
it
(
'
MultimodalInputDevice_KeyboardType_UNKNOWN_test
'
,
0
,
function
()
{
console
.
info
(
'
MultimodalInputDevice_KeyboardType_UNKNOWN_test =
'
+
inputDevice
.
KeyboardType
.
UNKNOWN
);
expect
(
inputDevice
.
KeyboardType
.
UNKNOWN
==
1
).
assertTrue
();
})
/**
* @tc.number MultimodalInputDevice_js_0030
* @tc.name remainingChargeTime_test
* @tc.desc Battry Present Interface Test
*/
it
(
'
MultimodalInputDevice_KeyboardType_ALPHABETIC_KEYBOARD_test
'
,
0
,
function
()
{
console
.
info
(
'
MultimodalInputDevice_KeyboardType_ALPHABETIC_KEYBOARD_test =
'
+
inputDevice
.
KeyboardType
.
ALPHABETIC_KEYBOARD
);
expect
(
inputDevice
.
KeyboardType
.
ALPHABETIC_KEYBOARD
==
2
).
assertTrue
();
})
/**
* @tc.number MultimodalInputDevice_js_0040
* @tc.name remainingChargeTime_test
* @tc.desc Battry Present Interface Test
*/
it
(
'
MultimodalInputDevice_KeyboardType_ALPHABETIC_DIGITAL_KEYBOARD_test
'
,
0
,
function
()
{
console
.
info
(
'
MultimodalInputDevice_KeyboardType_ALPHABETIC_DIGITAL_KEYBOARD_test =
'
+
inputDevice
.
KeyboardType
.
DIGITAL_KEYBOARD
);
expect
(
inputDevice
.
KeyboardType
.
DIGITAL_KEYBOARD
==
3
).
assertTrue
();
})
/**
* @tc.number MultimodalInputDevice_js_0040
* @tc.name remainingChargeTime_test
* @tc.desc Battry Present Interface Test
*/
it
(
'
MultimodalInputDevice_KeyboardType_ALPHABETIC_HANDWRITING_PEN_test
'
,
0
,
function
()
{
console
.
info
(
'
MultimodalInputDevice_KeyboardType_ALPHABETIC_HANDWRITING_PEN_test =
'
+
inputDevice
.
KeyboardType
.
HANDWRITING_PEN
);
expect
(
inputDevice
.
KeyboardType
.
HANDWRITING_PEN
==
4
).
assertTrue
();
})
/**
* @tc.number MultimodalInputDevice_js_0040
* @tc.name remainingChargeTime_test
* @tc.desc Battry Present Interface Test
*/
it
(
'
MultimodalInputDevice_KeyboardType_ALPHABETIC_REMOTE_CONTROL_test
'
,
0
,
function
()
{
console
.
info
(
'
MultimodalInputDevice_KeyboardType_ALPHABETIC_REMOTE_CONTROL_test =
'
+
inputDevice
.
KeyboardType
.
REMOTE_CONTROL
);
expect
(
inputDevice
.
KeyboardType
.
REMOTE_CONTROL
==
5
).
assertTrue
();
})
})
})
multimodalinput/input_js_standard/src/main/js/default/test/ListMultimodalinput.test.js
浏览文件 @
29e27f1e
...
@@ -15,4 +15,4 @@
...
@@ -15,4 +15,4 @@
require
(
'
./InputDevice.test.js
'
)
require
(
'
./InputDevice.test.js
'
)
require
(
'
./MultimodalinputKey_Code.test.js
'
)
powermgr/battery_manager/src/main/js/default/test/battery_unit.test.js
浏览文件 @
29e27f1e
...
@@ -14,8 +14,7 @@
...
@@ -14,8 +14,7 @@
*/
*/
import
app
from
'
@system.app
'
import
app
from
'
@system.app
'
import
Context
from
'
@ohos.napi_context
'
import
batteryInfo
from
'
@ohos.batteryinfo
'
;
import
batteryInfo
from
'
@ohos.batteryInfo
'
;
import
brightness
from
'
@ohos.brightness
'
;
import
brightness
from
'
@ohos.brightness
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
...
@@ -322,7 +321,7 @@ describe('appInfoTest', function () {
...
@@ -322,7 +321,7 @@ describe('appInfoTest', function () {
let
batteryLevel
=
batteryInfo
.
batteryCapacityLevel
;
let
batteryLevel
=
batteryInfo
.
batteryCapacityLevel
;
console
.
info
(
'
batteryLevel =
'
+
batteryLevel
);
console
.
info
(
'
batteryLevel =
'
+
batteryLevel
);
expect
(
batteryLevel
>=
batteryInfo
.
BatteryCapacityLevel
.
LEVEL_NONE
&&
expect
(
batteryLevel
>=
batteryInfo
.
BatteryCapacityLevel
.
LEVEL_NONE
&&
batteryLevel
<=
batteryInfo
.
BatteryCapacityLevel
.
LEVEL_CRITICAL
).
assertTrue
();
batteryLevel
<=
batteryInfo
.
BatteryCapacityLevel
.
LEVEL_CRITICAL
).
assertTrue
();
})
})
/**
/**
...
@@ -393,14 +392,133 @@ describe('appInfoTest', function () {
...
@@ -393,14 +392,133 @@ describe('appInfoTest', function () {
/**
/**
* @tc.number battery_manager_js_3400
* @tc.number battery_manager_js_3400
* @tc.name
remainingChargeTime_test
* @tc.name
battery_manager_js_3400
* @tc.desc Battry Present Interface Test
* @tc.desc Battry Present Interface Test
*/
*/
it
(
'
remainingChargeTime_test
'
,
0
,
function
()
{
it
(
'
remainingChargeTime_test
'
,
0
,
function
()
{
let
remainingChargeTime
=
batteryInfo
.
estimatedRemainingChargeTime
;
let
remainingChargeTime
=
batteryInfo
.
estimatedRemainingChargeTime
;
console
.
info
(
'
remainingChargeTime =
'
+
remainingChargeTime
);
console
.
info
(
'
remainingChargeTime =
'
+
remainingChargeTime
);
expect
(
remainingChargeTime
>=
0
).
assertTrue
();
expect
(
remainingChargeTime
>=
0
).
assertTrue
();
})
})
/**
* @tc.number battery_manager_js_3500
* @tc.name battery_manager_js_3500
* @tc.desc Battry Present Interface Test
*/
it
(
'
CommonEventBatteryChangedCode_EXTRA_SOC_test
'
,
0
,
function
()
{
console
.
info
(
'
CommonEventBatteryChangedCode_EXTRA_SOC =
'
+
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_SOC
);
expect
(
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_SOC
==
0
).
assertTrue
();
})
/**
* @tc.number battery_manager_js_3600
* @tc.name battery_manager_js_3600
* @tc.desc Battry Present Interface Test
*/
it
(
'
CommonEventBatteryChangedCode_EXTRA_VOLTAGE_test
'
,
0
,
function
()
{
console
.
info
(
'
CommonEventBatteryChangedCode_EXTRA_VOLTAGE =
'
+
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_VOLTAGE
);
expect
(
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_VOLTAGE
==
1
).
assertTrue
();
})
/**
* @tc.number battery_manager_js_3700
* @tc.name battery_manager_js_3700
* @tc.desc Battry Present Interface Test
*/
it
(
'
CommonEventBatteryChangedCode_EXTRA_TEMPERATURE_test
'
,
0
,
function
()
{
console
.
info
(
'
CommonEventBatteryChangedCode_EXTRA_TEMPERATURE =
'
+
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_TEMPERATURE
);
expect
(
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_TEMPERATURE
==
2
).
assertTrue
();
})
/**
* @tc.number battery_manager_js_3800
* @tc.name battery_manager_js_3800
* @tc.desc Battry Present Interface Test
*/
it
(
'
CommonEventBatteryChangedCode_EXTRA_HEALTH_STATE_test
'
,
0
,
function
()
{
console
.
info
(
'
CommonEventBatteryChangedCode_EXTRA_HEALTH_STATE =
'
+
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_HEALTH_STATE
);
expect
(
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_HEALTH_STATE
==
3
).
assertTrue
();
})
/**
* @tc.number battery_manager_js_3900
* @tc.name battery_manager_js_3900
* @tc.desc Battry Present Interface Test
*/
it
(
'
CommonEventBatteryChangedCode_EXTRA_PLUGGED_TYPE_test
'
,
0
,
function
()
{
console
.
info
(
'
CommonEventBatteryChangedCode_EXTRA_PLUGGED_TYPE =
'
+
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_PLUGGED_TYPE
);
expect
(
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_PLUGGED_TYPE
==
4
).
assertTrue
();
})
/**
* @tc.number battery_manager_js_4000
* @tc.name battery_manager_js_4000
* @tc.desc Battry Present Interface Test
*/
it
(
'
CommonEventBatteryChangedCode_EXTRA_MAX_CURRENT_test
'
,
0
,
function
()
{
console
.
info
(
'
CommonEventBatteryChangedCode_EXTRA_MAX_CURRENT =
'
+
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_MAX_CURRENT
);
expect
(
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_MAX_CURRENT
==
5
).
assertTrue
();
})
/**
* @tc.number battery_manager_js_4100
* @tc.name battery_manager_js_4100
* @tc.desc Battry Present Interface Test
*/
it
(
'
CommonEventBatteryChangedCode_EXTRA_MAX_VOLTAGE_test
'
,
0
,
function
()
{
console
.
info
(
'
CommonEventBatteryChangedCode_EXTRA_MAX_VOLTAGE =
'
+
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_MAX_VOLTAGE
);
expect
(
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_MAX_VOLTAGE
==
6
).
assertTrue
();
})
/**
* @tc.number battery_manager_js_4200
* @tc.name battery_manager_js_4200
* @tc.desc Battry Present Interface Test
*/
it
(
'
CommonEventBatteryChangedCode_EXTRA_CHARGE_STATE_test
'
,
0
,
function
()
{
console
.
info
(
'
CommonEventBatteryChangedCode_EXTRA_CHARGE_STATE =
'
+
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_CHARGE_STATE
);
expect
(
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_CHARGE_STATE
==
7
).
assertTrue
();
})
/**
* @tc.number battery_manager_js_4300
* @tc.name battery_manager_js_4300
* @tc.desc Battry Present Interface Test
*/
it
(
'
CommonEventBatteryChangedCode_EXTRA_CHARGE_COUNTER_test
'
,
0
,
function
()
{
console
.
info
(
'
CommonEventBatteryChangedCode_EXTRA_CHARGE_COUNTER =
'
+
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_CHARGE_COUNTER
);
expect
(
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_CHARGE_COUNTER
==
8
).
assertTrue
();
})
/**
* @tc.number battery_manager_js_4400
* @tc.name battery_manager_js_4400
* @tc.desc Battry Present Interface Test
*/
it
(
'
CommonEventBatteryChangedCode_EXTRA_PRESENT_test
'
,
0
,
function
()
{
console
.
info
(
'
CommonEventBatteryChangedCode_EXTRA_PRESENT =
'
+
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_PRESENT
);
expect
(
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_PRESENT
==
9
).
assertTrue
();
})
/**
* @tc.number battery_manager_js_4500
* @tc.name battery_manager_js_4500
* @tc.desc Battry Present Interface Test
*/
it
(
'
CommonEventBatteryChangedCode_EXTRA_TECHNOLOGY_test
'
,
0
,
function
()
{
console
.
info
(
'
CommonEventBatteryChangedCode_EXTRA_TECHNOLOGY =
'
+
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_TECHNOLOGY
);
expect
(
batteryInfo
.
CommonEventBatteryChangedCode
.
EXTRA_TECHNOLOGY
==
10
).
assertTrue
();
})
})
})
powermgr/battery_manager/src/main/js/default/test/batterymanager_performance.test.js
浏览文件 @
29e27f1e
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
batteryInfo
from
'
@ohos.battery
I
nfo
'
;
import
batteryInfo
from
'
@ohos.battery
i
nfo
'
;
import
{
describe
,
it
,
expect
}
from
'
deccjsunit/index
'
;
import
{
describe
,
it
,
expect
}
from
'
deccjsunit/index
'
;
describe
(
'
appInfoTest
'
,
function
()
{
describe
(
'
appInfoTest
'
,
function
()
{
...
...
powermgr/power_manager/src/main/js/default/test/power_manager_running_lock.test.js
浏览文件 @
29e27f1e
...
@@ -13,12 +13,12 @@
...
@@ -13,12 +13,12 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
runningLock
from
'
@ohos.running
L
ock
'
;
import
runningLock
from
'
@ohos.running
l
ock
'
;
import
'
@ohos.permission.RUNNING_LOCK
'
import
'
@ohos.permission.RUNNING_LOCK
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
describe
(
'
appInfoTest
'
,
function
()
{
describe
(
'
appInfoTest
_power_2
'
,
function
()
{
console
.
log
(
"
*************RunningLock Unit Test Begin*************
"
);
console
.
log
(
"
*************RunningLock Unit Test Begin*************
"
);
/**
/**
...
...
powermgr/power_manager/src/main/js/default/test/power_performance_test.js
浏览文件 @
29e27f1e
...
@@ -13,12 +13,12 @@
...
@@ -13,12 +13,12 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
runningLock
from
'
@ohos.running
L
ock
'
;
import
runningLock
from
'
@ohos.running
l
ock
'
;
import
power
from
'
@ohos.power
'
;
import
power
from
'
@ohos.power
'
;
import
brightness
from
'
@ohos.brightness
'
;
import
brightness
from
'
@ohos.brightness
'
;
import
{
describe
,
it
,
expect
}
from
'
deccjsunit/index
'
;
import
{
describe
,
it
,
expect
}
from
'
deccjsunit/index
'
;
describe
(
'
appInfoTest
'
,
function
()
{
describe
(
'
appInfoTest
_power_3
'
,
function
()
{
console
.
log
(
"
*************Power Performance Test Begin*************
"
);
console
.
log
(
"
*************Power Performance Test Begin*************
"
);
const
MAXNUM
=
1000
;
const
MAXNUM
=
1000
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录