From a94f4e49154df18cbfe54a958bc738041c89d385 Mon Sep 17 00:00:00 2001 From: wang-xupeng2 Date: Thu, 6 Apr 2023 20:37:54 +0800 Subject: [PATCH] modify textPicker testcases Signed-off-by: wang-xupeng2 --- .../entry/src/main/ets/MainAbility/pages/TextPickerPage.ets | 2 +- .../entry/src/main/ets/test/TextPickerJsunit.test.ets | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/TextPickerPage.ets b/arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/TextPickerPage.ets index 40c4363a4..13b393309 100644 --- a/arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/TextPickerPage.ets +++ b/arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/TextPickerPage.ets @@ -60,7 +60,7 @@ struct TextPickerPage { this.getValue = value this.getIndex = index }) - Text(this.getValue + ': ' + this.getIndex.toString()).fontSize(20).key('text') + Text(this.getValue + ': ' + this.getIndex.toString()).fontSize(20).key('textContent1') } } } \ No newline at end of file diff --git a/arkui/ace_ets_component_ui/entry/src/main/ets/test/TextPickerJsunit.test.ets b/arkui/ace_ets_component_ui/entry/src/main/ets/test/TextPickerJsunit.test.ets index 01e026326..1412b1dbc 100644 --- a/arkui/ace_ets_component_ui/entry/src/main/ets/test/TextPickerJsunit.test.ets +++ b/arkui/ace_ets_component_ui/entry/src/main/ets/test/TextPickerJsunit.test.ets @@ -61,7 +61,7 @@ export default function TextPickerJsunit() { // Get the content of Initial value let driver = await UiDriver.create() - let strJson1 = getInspectorByKey('text'); + let strJson1 = getInspectorByKey('textContent1'); let obj1 = JSON.parse(strJson1); console.info("[TextPickerJsunit_0100] obj1: " + JSON.stringify(obj1)); expect(obj1.$attrs.content).assertEqual('value: 0'); @@ -110,7 +110,7 @@ export default function TextPickerJsunit() { await CommonFunc.sleep(1000); let driver = await UiDriver.create() await driver.swipe(Math.round(right / 2), Math.round(bottom * 2 / 3), Math.round(right / 2), Math.round(bottom / 3)); - let strJson = getInspectorByKey('text'); + let strJson = getInspectorByKey('textContent1'); let obj = JSON.parse(strJson); console.info("[TextPickerJsunit_0300] obj: " + JSON.stringify(obj)); expect(obj.$attrs.content == 'value: 0').assertFalse(); -- GitLab