From 7bd81a9cb715aed4a4d9885b313c94ef95d9089b Mon Sep 17 00:00:00 2001 From: toutes Date: Wed, 1 Jun 2022 01:48:03 -0700 Subject: [PATCH] fix: Solve the problem of XTS display use case failure Signed-off-by: toutes --- .../src/main/js/default/test/system_display.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 8d6a2ec8f..f1b2ef5cd 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 @@ -235,7 +235,7 @@ describe('appInfoTest', function () { brightness.getMode({ success: (data) => { execSucc = true; - expect(data.mode === !modeVal).assertTrue() ; + expect(data.mode === (modeVal ? 0 : 1)).assertTrue(); }, fail: (data, code) => { console.log("get_mode_success, data: " + data + ", code: " + code); @@ -295,7 +295,7 @@ describe('appInfoTest', function () { brightness.getMode({ success: (data) => { console.log("set_mode_success, data: " + data.mode); - expect(data.mode === !modeVal).assertTrue(); + expect(data.mode === (modeVal ? 0 : 1)).assertTrue(); } }); }, -- GitLab