diff --git a/arkui/ace_ets_component/entry/src/main/ets/test/SwiperJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/test/SwiperJsunit.test.ets index 2cd211802f4cca8a0870317ce43db9acd95f104e..c49927d7fa3cd355926495bdb6b41d08f623cab4 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/test/SwiperJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/test/SwiperJsunit.test.ets @@ -347,7 +347,7 @@ export default function swiperJsunit() { try { let eventData = { data: { - "duration": "500" + "duration": 500 } } let indexEvent = { @@ -451,7 +451,7 @@ export default function swiperJsunit() { try { let eventData = { data: { - "duration": "0" + "duration": 0 } } let indexEvent = { @@ -471,5 +471,31 @@ export default function swiperJsunit() { console.info('swiperTest_1900 END'); done(); }); + + it('swiperTest_2000', 0, async function (done) { + console.info('swiperTest_2000 START'); + try { + let eventData = { + data: { + "duration": "abc" + } + } + let indexEvent = { + eventId: 210, + priority: events_emitter.EventPriority.LOW + } + console.info("swiperTest_2000 start to publish emit"); + events_emitter.emit(indexEvent, eventData); + } catch (err) { + console.log("swiperTest_2000 change component data error: " + err.message); + } + await Utils.sleep(4000); + let strJsonNew = getInspectorByKey('swiper'); + let objNew = JSON.parse(strJsonNew); + console.info("swiperTest_2000 component objNew is: " + JSON.stringify(objNew)); + expect(objNew.$attrs.duration).assertEqual('400.000000'); + console.info('swiperTest_2000 END'); + done(); + }); }) } \ No newline at end of file