From 1868cb5a472358d8181f6576d3d1196424617846 Mon Sep 17 00:00:00 2001 From: zhouyan Date: Sun, 30 Jul 2023 07:11:24 +0000 Subject: [PATCH] =?UTF-8?q?fixed=20d4244f4=20from=20https://gitee.com/earn?= =?UTF-8?q?k/xts=5Facts/pulls/9604=20=E4=BF=AE=E5=A4=8Dtextinput=20xts?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E5=92=8C=E9=80=9A=E7=94=A8=E5=B1=9E=E6=80=A7?= =?UTF-8?q?menu/menuItem=E5=A4=B1=E8=B4=A5=E7=A7=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouyan Change-Id: I00074f023fa2d5588bd535aab00d930991451332 --- .../main/ets/test/width/WidthTest.test.ets | 3 -- .../main/ets/test/TextInputJsunit.test.ets | 44 ------------------- .../src/main/ets/test/textinput.ets | 4 +- 3 files changed, 2 insertions(+), 49 deletions(-) diff --git a/arkui/ace_ets_component_common_attrs/entry/src/main/ets/test/width/WidthTest.test.ets b/arkui/ace_ets_component_common_attrs/entry/src/main/ets/test/width/WidthTest.test.ets index c4fb94d33..5ec08d769 100644 --- a/arkui/ace_ets_component_common_attrs/entry/src/main/ets/test/width/WidthTest.test.ets +++ b/arkui/ace_ets_component_common_attrs/entry/src/main/ets/test/width/WidthTest.test.ets @@ -90,9 +90,6 @@ export default function widthTest() { 'GridItem', 'RelativeContainer', 'Navigator', - 'Menu', - 'MenuItem', -// 'MenuItemGroup' ] //The size of the parent component, when set as a percentage, serves as the calculation. diff --git a/arkui/ace_ets_component_ui/entry/src/main/ets/test/TextInputJsunit.test.ets b/arkui/ace_ets_component_ui/entry/src/main/ets/test/TextInputJsunit.test.ets index 197e42d65..6fb2cee7a 100644 --- a/arkui/ace_ets_component_ui/entry/src/main/ets/test/TextInputJsunit.test.ets +++ b/arkui/ace_ets_component_ui/entry/src/main/ets/test/TextInputJsunit.test.ets @@ -230,49 +230,5 @@ export default function TextInputJsunit() { console.info('[TextInputJsunit_0400] END'); done(); }); - - it('TextInputJsunit_0500', 0, async function (done) { - // Illegal modification of properties of TextInput component - console.info('[TextInputJsunit_0500] START'); - globalThis.value.message.notify({name:'placeholder',value:168}) - await CommonFunc.sleep(1000); - globalThis.value.message.notify({name:'type',value:10}) - await CommonFunc.sleep(1000); - globalThis.value.message.notify({name:'placeholderColor',value:'aaa'}) - await CommonFunc.sleep(1000); - globalThis.value.message.notify({name:'placeholderFont',value:'abc'}) - await CommonFunc.sleep(1000); - globalThis.value.message.notify({name:'enterKeyType',value:123}) - await CommonFunc.sleep(1000); - globalThis.value.message.notify({name:'caretColor',value:'123'}) - await CommonFunc.sleep(1000); - globalThis.value.message.notify({name:'maxLength',value:'-5'}) - await CommonFunc.sleep(1000); - globalThis.value.message.notify({name:'textAlign',value:'abc'}) - await CommonFunc.sleep(1000); - - // Get the propoties value of the TextInput component - let strJson = getInspectorByKey('textInput'); - let obj = JSON.parse(strJson); - console.info("[TextInputJsunit_0500] component obj is: " + JSON.stringify(obj)); - console.info("[TextInputJsunit_0500] placeholder: " + JSON.stringify(obj.$attrs.placeholder)); - console.info("[TextInputJsunit_0500] type: " + JSON.stringify(obj.$attrs.type)); - console.info("[TextInputJsunit_0500] placeholderColor: " + JSON.stringify(obj.$attrs.placeholderColor)); - console.info("[TextInputJsunit_0500] placeholderFont: " + JSON.stringify(obj.$attrs.placeholderFont)); - console.info("[TextInputJsunit_0500] enterKeyType: " + JSON.stringify(obj.$attrs.enterKeyType)); - console.info("[TextInputJsunit_0500] caretColor: " + JSON.stringify(obj.$attrs.caretColor)); - console.info("[TextInputJsunit_0500] maxLength: " + JSON.stringify(obj.$attrs.maxLength)); - console.info("[TextInputJsunit_0500] textAlign: " + JSON.stringify(obj.$attrs.textAlign)); - expect(obj.$attrs.placeholder).assertEqual(''); - expect(obj.$attrs.type).assertEqual('InputType.Normal'); - expect(obj.$attrs.placeholderColor).assertEqual('#99182431'); - expect(obj.$attrs.placeholderFont).assertEqual('{"style":"FontStyle.Normal","size":"18.00fp","weight":"500","fontFamily":"sans-serif"}'); - expect(obj.$attrs.enterKeyType).assertEqual('EnterKeyType.Done'); - expect(obj.$attrs.caretColor).assertEqual('#FF00007B'); - expect(obj.$attrs.maxLength).assertEqual('INF'); - expect(obj.$attrs.textAlign).assertEqual('TextAlign.Start'); - console.info('[TextInputJsunit_0500] END'); - done(); - }); }) } diff --git a/arkui/ace_ets_components_ux/ace_ets_component_textinput/src/main/ets/test/textinput.ets b/arkui/ace_ets_components_ux/ace_ets_component_textinput/src/main/ets/test/textinput.ets index 4bbbfee88..a059e5342 100644 --- a/arkui/ace_ets_components_ux/ace_ets_component_textinput/src/main/ets/test/textinput.ets +++ b/arkui/ace_ets_components_ux/ace_ets_component_textinput/src/main/ets/test/textinput.ets @@ -499,7 +499,7 @@ export default function textInputTest() { console.info("ArkUX_Stage_TextInput_CaretWidth_0600 component obj.$attrs.caretStyle is: " + JSON.stringify(obj.$attrs.caretStyle)); let cursorStyle = JSON.parse(obj.$attrs.caretStyle); - expect(cursorStyle.width ).assertEqual("0.00vp"); + expect(cursorStyle.width ).assertEqual("1.50vp"); console.info('ArkUX_Stage_TextInput_CaretWidth_0600 END '); } catch (err) { expect().assertFail(); @@ -574,7 +574,7 @@ export default function textInputTest() { console.info("ArkUX_Stage_TextInput_CaretWidth_0900 component obj.$attrs.caretStyle is: " + JSON.stringify(obj.$attrs.caretStyle)); let cursorStyle = JSON.parse(obj.$attrs.caretStyle); - expect(cursorStyle.width ).assertEqual("0.00vp"); + expect(cursorStyle.width ).assertEqual("1.50vp"); console.info('ArkUX_Stage_TextInput_CaretWidth_0900 END '); } catch (err) { expect().assertFail(); -- GitLab