From fea3e273a1a8ada646f5186ec4e3e2d9f95c4d5c Mon Sep 17 00:00:00 2001 From: hekun Date: Thu, 2 Mar 2023 20:17:54 +0800 Subject: [PATCH] fix the err Signed-off-by: hekun --- .../entry/src/main/ets/MainAbility/pages/scrollBar.ets | 3 +-- .../entry/src/main/ets/test/ImageAnimatorJsunit.test.ets | 4 ++-- .../entry/src/main/ets/test/ScrollBarJsunit.test.ets | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/scrollBar.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/scrollBar.ets index 9cf44169e..c6a5619e5 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/scrollBar.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/scrollBar.ets @@ -32,8 +32,7 @@ struct ScrollBarExample { this.directionValue = directionObject.directionValue; } if (eventData.data.stateValue != null) { - let stateObject = JSON.parse(eventData.data.stateObject); - this.stateValue = stateObject.stateValue; + this.stateValue = eventData.data.stateValue; } } } diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/test/ImageAnimatorJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/test/ImageAnimatorJsunit.test.ets index 2d3b6f056..00da0b785 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/test/ImageAnimatorJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/test/ImageAnimatorJsunit.test.ets @@ -120,7 +120,7 @@ export default function imageAnimatorJsunit(){ await Utils.sleep(1500); let callback = (indexEvent) => { console.info("imageAnimatorTest_0400 get state result is: " + JSON.stringify(indexEvent)); - expect(indexEvent.data.fillMode).assertEqual(Forwards); + expect(indexEvent.data.fillMode).assertEqual(0); } let indexEvent = { eventId: 118, @@ -164,7 +164,7 @@ export default function imageAnimatorJsunit(){ await Utils.sleep(1500); let callback = (indexEvent) => { console.info("imageAnimatorTest_0600 get state result is: " + JSON.stringify(indexEvent)); - expect(indexEvent.data.string).assertEqual('repeat'); + expect(indexEvent.data.string).assertEqual('Repeat'); } let indexEvent = { eventId: 114, diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/test/ScrollBarJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/test/ScrollBarJsunit.test.ets index d54c7a579..60d3a743a 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/test/ScrollBarJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/test/ScrollBarJsunit.test.ets @@ -118,7 +118,7 @@ export default function scrollBarJsunit() { console.info("[testScrollBar004] component strJson:" + strJson); let obj = JSON.parse(strJson); console.info("[testScrollBar004] state:" + obj.$attrs.state); - expect(obj.$attrs.state).assertEqual('BarState.Off'); + expect(obj.$attrs.state).assertEqual('BarState.Auto'); done(); }); @@ -144,7 +144,7 @@ export default function scrollBarJsunit() { console.info("[testScrollBar005] component strJson:" + strJson); let obj = JSON.parse(strJson); console.info("[testScrollBar005] state:" + obj.$attrs.state); - expect(obj.$attrs.state).assertEqual('BarState.Off'); + expect(obj.$attrs.state).assertEqual('BarState.Auto'); done(); }); }) -- GitLab