From f6dcdbd5bd5833c7f6f8be53746fba1f1f98230c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=AC=A2=E6=AC=A2?= Date: Tue, 22 Aug 2023 12:14:52 +0000 Subject: [PATCH] t/AccessibleRegisterState.test.js. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 姜欢欢 --- .../js/test/AccessibleRegisterState.test.js | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/barrierfree/accessibleregisterstate/entry/src/ohosTest/js/test/AccessibleRegisterState.test.js b/barrierfree/accessibleregisterstate/entry/src/ohosTest/js/test/AccessibleRegisterState.test.js index bb2eef2d0..2c3d13c6b 100644 --- a/barrierfree/accessibleregisterstate/entry/src/ohosTest/js/test/AccessibleRegisterState.test.js +++ b/barrierfree/accessibleregisterstate/entry/src/ohosTest/js/test/AccessibleRegisterState.test.js @@ -38,37 +38,35 @@ describe('AccessibleRegisterState', function () { /* * @tc.number RegisterStateOnOff_0330 * @tc.name RegisterStateOnOff_0330 - * @tc.desc The parameter input is 'accessibilityStateChange', test the accessibility.on() function, - * and return void. + * @tc.desc on(accessibilityStateChange) * @tc.size SmallTest * @tc.type User */ it('RegisterStateOnOff_0330', 0, async function (done) { - console.info('RegisterStateOnOff_0330'); - let stateEventType = 'accessibilityStateChange'; - let callbackdata = (data) => {} - accessibility.on(stateEventType, callbackdata); - accessibility.off(stateEventType, callbackdata); - expect(true).assertTrue(); - done(); + console.info('RegisterStateOnOff_0330'); + let callbackdata = (data) => { + } + accessibility.on('accessibilityStateChange', callbackdata); + accessibility.off('accessibilityStateChange', callbackdata); + expect(true).assertTrue(); + done(); }) /* * @tc.number RegisterStateOnOff_0340 * @tc.name RegisterStateOnOff_0340 - * @tc.desc The parameter input is 'touchGuideStateChange', test the accessibility.on() function, - * and return void. + * @tc.desc on(touchGuideStateChange) * @tc.size SmallTest * @tc.type User */ it('RegisterStateOnOff_0340', 0, async function (done) { - console.info('RegisterStateOnOff_0340'); - let stateEventType = 'touchGuideStateChange'; - let callbackdata = (data) => {} - accessibility.on(stateEventType, callbackdata); - accessibility.off(stateEventType, callbackdata); - expect(true).assertTrue(); - done(); + console.info('RegisterStateOnOff_0340'); + let callbackdata = (data) => { + } + accessibility.on('touchGuideStateChange', callbackdata); + accessibility.off('touchGuideStateChange', callbackdata); + expect(true).assertTrue(); + done(); }) }) } -- GitLab