提交 77d05cf3 编写于 作者: O openharmony_ci 提交者: Gitee

!1084 增加电池在位判断接口测试

Merge pull request !1084 from 梁启航/master
......@@ -264,4 +264,19 @@ describe('appInfoTest', function () {
brightness.setValue(255);
expect(0 == 0).assertTrue();
})
})
/**
* @tc.number battery_manager_js_2300
* @tc.name is_battery_present_test
* @tc.desc Battry Present Interface Test
*/
it('is_battery_present_test', 0, function () {
var isBatteryPresent = batteryInfo.isBatteryPresent;
console.info('isBatteryPresent = ' + isBatteryPresent);
if (isBatteryPresent) {
expect(isBatteryPresent).assertTrue();
}else{
expect(isBatteryPresent).assertFalse();
}
})
})
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册