diff --git a/powermgr/display_manager/src/main/js/test/system_display.test.js b/powermgr/display_manager/src/main/js/test/system_display.test.js index c387d48b04f948b4c164504a2ce9e3d4d05537dc..52d0d72caf931b60a4d2599dd0559210b9a3d7f2 100644 --- a/powermgr/display_manager/src/main/js/test/system_display.test.js +++ b/powermgr/display_manager/src/main/js/test/system_display.test.js @@ -142,6 +142,31 @@ export default async function SystemDisplayTest() { }); }); + /** + * @tc.number system_display_js_0203 + * @tc.name set_value_success_value + * @tc.desc Check undefined as input of setValue + */ + it('set_value_success_value', 0, async function (done) { + brightness.setKeepScreenOn({ + keepScreenOn: true, + success: function () { + console.log('undefined: original:handling set keep screen on success.'); + let value = brightness.getValue(); + brightness.setValue(undefined); + expect(value == brightness.getValue()).assertTrue(); + done(); + }, + fail: function (data, code) { + console.error('undefined: original:handling set keep screen on fail, code:' + code + ', data: ' + data); + done(); + }, + complete: function () { + console.error('undefined: original:handling set keep screen on complete.'); + } + }); + }); + /** * @tc.number system_display_js_0300 * @tc.name get_mode_success