From b3b07a4739d12ddd388e829c3367c07399501028 Mon Sep 17 00:00:00 2001 From: jianghuanhuan Date: Wed, 8 Feb 2023 20:23:33 +0800 Subject: [PATCH] barrfreecommit Signed-off-by: jianghuanhuan --- .../js/test/AccessibleAbilityList.test.js | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/barrierfree/accessibleabilitylist/entry/src/main/js/test/AccessibleAbilityList.test.js b/barrierfree/accessibleabilitylist/entry/src/main/js/test/AccessibleAbilityList.test.js index 10afb2a4a..e5813f33a 100644 --- a/barrierfree/accessibleabilitylist/entry/src/main/js/test/AccessibleAbilityList.test.js +++ b/barrierfree/accessibleabilitylist/entry/src/main/js/test/AccessibleAbilityList.test.js @@ -59,35 +59,27 @@ describe('AccessibleAbilityList', function () { for (let item of data) { console.info(item.id); expect(item.id != undefined).assertEqual(true); - done(); console.info(item.name); - expect(item.name != undefined).assertEqual(true); - done(); + expect(item.name !== undefined).assertEqual(true); console.info(item.description); expect(item.description != undefined).assertEqual(true); - done(); console.info(item.abilityTypes); expect(item.abilityTypes != undefined).assertEqual(true); - done(); console.info(item.eventTypes); expect(item.eventTypes != undefined).assertEqual(true); - done(); console.info(item.capabilities); - if (item.capabilities == retrieve || - item.capabilities == touchGuide || - item.capabilities == keyEventObserver || - item.capabilities == zoom || - item.capabilities == gesture || - item.capabilities == undefined) { + if (item.capabilities[0] == 'retrieve' || + item.capabilities[0] == 'touchGuide' || + item.capabilities[0] == 'keyEventObserver' || + item.capabilities[0] == 'zoom' || + item.capabilities[0] == 'gesture') { expect(true).assertTrue(); - done(); }else{ expect(null).assertFail(); done(); } console.info(item.bundleName); expect(item.bundleName != undefined).assertEqual(true); - done(); } expect(Array.isArray(data)).assertEqual(true); done(); -- GitLab