From 195d074146bf8580d089b88e205178a82226f3d5 Mon Sep 17 00:00:00 2001 From: hekun Date: Mon, 31 Oct 2022 20:11:07 +0800 Subject: [PATCH] fix the error Signed-off-by: hekun --- .../entry/src/main/ets/test/gauge.test.ets | 2 +- .../entry/src/main/ets/test/line.test.ets | 2 +- .../entry/src/main/ets/test/list_item.test.ets | 6 +++--- .../entry/src/main/ets/test/swiper.test.ets | 2 +- .../entry/src/main/ets/MainAbility/pages/textArea.ets | 2 +- .../entry/src/main/ets/test/TextAreaJsunit.test.ets | 3 ++- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/gauge.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/gauge.test.ets index 0d536a37a..ae819ae0b 100644 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/gauge.test.ets +++ b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/gauge.test.ets @@ -142,7 +142,7 @@ export default function gaugeColorsJsunit() { console.info("[testgaugeColors0006] component colors strJson:" + strJson); let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Gauge'); - expect(obj.$attrs.colors).assertEqual('["#FF317AF7","#FF5BA854","#FFE08C3A","#FF9C554B","#FFD94838"]'); + expect(obj.$attrs.colors).assertEqual('[["#FF317AF7",1],["#FF5BA854",1],["#FFE08C3A",1],["#FF9C554B",1],["#FFD94838",1]]'); console.info("[testgaugeColors0006] colors value :" + obj.$attrs.colors); done(); }); diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/line.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/line.test.ets index 38bb38ead..20958552a 100644 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/line.test.ets +++ b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/line.test.ets @@ -108,7 +108,7 @@ export default function lineNeJsunit() { console.info("[testlineNe0006] component height strJson:" + strJson); let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Shape'); - expect(obj.$attrs.height).assertEqual("200.00"); + expect(obj.$attrs.height).assertEqual("200.00vp"); console.info("[testlineNe0006] height value :" + obj.$attrs.height); done(); }); diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/list_item.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/list_item.test.ets index 21ae0c0d0..4520c9cbd 100644 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/list_item.test.ets +++ b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/list_item.test.ets @@ -21,7 +21,7 @@ import Utils from './Utils.ets' export default function list_itemOnSelectJsunit() { describe('list_itemOnSelectTest', function () { beforeAll(async function (done) { - console.info("flex beforeEach start");testlist_itemOnSelect0002 + console.info("flex beforeEach start"); let options = { uri: 'pages/list_item', } @@ -75,7 +75,7 @@ export default function list_itemOnSelectJsunit() { console.info("[testlist_itemOnSelect0002] component border strJson:" + strJson); let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('ListItem'); - expect(obj.$attrs.selectable).assertEqual(false); + expect(obj.$attrs.selectable).assertEqual("false"); console.info("[testlist_itemOnSelect0002] selectable value :" + obj.$attrs.selectable); done(); }); @@ -106,7 +106,7 @@ export default function list_itemOnSelectJsunit() { console.info('selectOnSelect testlist_itemSwipeAction0004 START'); await Utils.sleep(2000); let obj = JSON.stringify(sendEventByKey('Del', 10, "")) - expect(obj).assertEqual('false'); + expect(obj).assertEqual('true'); done(); }); }) diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/swiper.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/swiper.test.ets index 280de445a..d1ab4f572 100644 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/swiper.test.ets +++ b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/swiper.test.ets @@ -28,7 +28,7 @@ export default function swiperCurveJsunit() { router.clear(); let pages = router.getState(); console.info("get swiper state success " + JSON.stringify(pages)); - if (!("swiper" == pages.name)) + if (!("swiper" == pages.name)) { console.info("get swiper state success " + JSON.stringify(pages.name)); let result = await router.push(options); await Utils.sleep(2000); diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/textArea.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/textArea.ets index 69e0c2d2d..00c7a0f99 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/textArea.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/textArea.ets @@ -19,7 +19,7 @@ import events_emitter from '@ohos.events.emitter'; @Component struct TextAreaExample2 { @State text: string = 'TextArea' - @State fontColor: string = "Color.Red"; + @State fontColor: string = "#FF182432"; @State fontSize: number = 30; @State textAlign: TextAlign = TextAlign.Center; @State text: String = 'test text'; diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/test/TextAreaJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/test/TextAreaJsunit.test.ets index bbe66aa74..bb4b52af2 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/test/TextAreaJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/test/TextAreaJsunit.test.ets @@ -90,7 +90,8 @@ export default function textAreaJsunit() { let strJson = getInspectorByKey('textArea'); let obj = JSON.parse(strJson); console.info("[textAreaTest03] obj is: " + JSON.stringify(obj)); - expect(obj.$attrs.fontColor).assertEqual('#FF000000'); + // 适配开发侧非法入参修改 + expect(obj.$attrs.fontColor).assertEqual('#FF182432'); console.info('textAreaTest03 END'); done(); }); -- GitLab