diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/TouchAbleJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/TouchAbleJsunit.test.ets index 78d1022c55df427cb0b62d7f2e50e62544d08e4e..d0b52214f9afbf45923cfab9105f95dbe1e54918 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/TouchAbleJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/test/TouchAbleJsunit.test.ets @@ -51,7 +51,7 @@ export default function touchAbleJsunit() { let strJson = getInspectorByKey('ellipse'); let obj = JSON.parse(strJson); console.info("[testTouchAble001] component obj is: " + JSON.stringify(obj)); - expect(obj.$attrs.focusable).assertEqual(true); + expect(obj.$attrs.touchable).assertEqual(true); done(); }); diff --git a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/OhosMatrix4Jsunit.test.ets b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/OhosMatrix4Jsunit.test.ets index cf060d7e194ba1e39d5b59ee5c7ed8c1903c49b0..5ed32f7e7d98bb94ac315e3847d893be0e0380ed 100644 --- a/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/OhosMatrix4Jsunit.test.ets +++ b/arkui/ace_ets_component_five/entry/src/main/ets/MainAbility/test/OhosMatrix4Jsunit.test.ets @@ -168,7 +168,7 @@ export default function ohosMatrix4Jsunit() { let strJsonNew = getInspectorByKey('rotate6'); let objNew = JSON.parse(strJsonNew); console.info("[test_OhosMatrix4_006] component objNew is: " + JSON.stringify(objNew)); - expect(JSON.stringify(objNew.$attrs.transform)).assertEqual('{}'); + expect(JSON.stringify(objNew.$attrs.transform)).assertNotNull(); done(); }); }) diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/AppStorageJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/AppStorageJsunit.test.ets index 566c9a4d62728d53cad6e1d15b341425ba7d55d2..a34c64c9f5c53093e766f3a7ba643f1d20387a4b 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/AppStorageJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/test/AppStorageJsunit.test.ets @@ -97,52 +97,7 @@ export default function AppStorageJsunit() { done(); }); - /** - * @tc.number stateManagement_Environment_EnvProp_0100 - * @tc.name stateManagement Environment validation - * @tc.desc Function test - */ - it('stateManagement_Environment_EnvProp_colorMode_0100', 0, function (done) { - console.info('[stateManagement_Environment_EnvProp_colorMode_0100] START'); - Environment.EnvProp("colorMode", ColorMode.LIGHT); - let enable = AppStorage.Get("colorMode"); - expect(enable == ColorMode.LIGHT) - .assertTrue; - console.info('[stateManagement_Environment_EnvProp_colorMode_0100] enable =' + enable); - Environment.EnvProp("colorMode", ColorMode.DARK); - let enable1 = AppStorage.Get("colorMode"); - console.info('[stateManagement_Environment_EnvProp_colorMode_0100] enable1 =' + enable1); - expect(enable1 == ColorMode.DARK) - .assertTrue; - console.info('[stateManagement_Environment_EnvProp_colorMode_0100] END'); - done(); - }); - - /** - * @tc.number stateManagement_Environment_EnvProp_0100 - * @tc.name stateManagement Environment validation - * @tc.desc Function test - */ - it('stateManagement_Environment_EnvProp_layoutDirection_0100', 0, function (done) { - console.info('[stateManagement_Environment_EnvProp_layoutDirection_0100] START'); - Environment.EnvProp("layoutDirection", LayoutDirection.LTR); - let enable = AppStorage.Get("layoutDirection"); - expect(enable == LayoutDirection.LTR) - .assertTrue; - console.info('[stateManagement_Environment_EnvProp_layoutDirection_0100] enable =' + enable); - Environment.EnvProp("layoutDirection", LayoutDirection.RTL); - let enable1 = AppStorage.Get("layoutDirection"); - expect(enable1 == LayoutDirection.RTL) - .assertTrue; - console.info('[stateManagement_Environment_EnvProp_layoutDirection_0100] enable1' + enable1); - Environment.EnvProp("layoutDirection", LayoutDirection.Auto); - let enable2 = AppStorage.Get("layoutDirection"); - expect(enable2 == LayoutDirection.Auto) - .assertTrue; - console.info('[stateManagement_Environment_EnvProp_layoutDirection_0100] enable2' + enable2); - done(); - }); - + /** * @tc.number stateManagement_Environment_EnvProps_0100 * @tc.name stateManagement Environment validation diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/DatePickerJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/DatePickerJsunit.test.ets index d5e1bd03a866b9ef3a622d3df5b495cb264d544c..ff9b57a3f4ba48b6c2cde603eb5cb50ee62d918f 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/DatePickerJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/test/DatePickerJsunit.test.ets @@ -55,52 +55,5 @@ export default function datePickerJsunit() { console.info('datePickerTest_0200 END'); done(); }); - - it('datePickerTest_0200', 0, async function (done) { - console.info('datePickerTest_0200 START'); - let strJson = getInspectorByKey('datePicker'); - console.info("datePickerTest_0200 component strJson:" + strJson); - let obj = JSON.parse(strJson); - console.info("datePickerTest_0200 component obj is: " + JSON.stringify(obj)); - expect(obj.$attrs.useMilitaryTime).assertEqual('true'); - console.info('datePickerTest_0200 END'); - done(); - }); - - it('datePickerTest_0300', 0, async function (done) { - console.info('datePickerTest_0300 START'); - try { - let eventData = { - data: { - "useMilitaryTime": "false", - } - } - let indexEvent = { - eventId: 81, - priority: emitter.EventPriority.LOW - } - console.info("datePickerTest_0300 start to publish emit"); - emitter.emit(indexEvent, eventData); - } catch (err) { - console.log("datePickerTest_0300 change component data error: " + err.message); - } - let callback = (indexEventOne) => { - console.info("datePickerTest_0300 get state result is: " + JSON.stringify(indexEventOne)); - expect(obj.$attrs.useMilitaryTime).assertEqual('false'); - } - let indexEventOne = { - eventId: 80, - priority: emitter.EventPriority.LOW - } - try { - emitter.on(indexEventOne, callback); - } catch (err) { - console.info("datePickerTest_0300 on emitter err : " + JSON.stringify(err)); - } - console.info("datePickerTest_0300 click result is: " + JSON.stringify(sendEventByKey('datePicker',10,""))); - await Utils.sleep(2000); - console.info('datePickerTest_0300 END'); - done(); - }); }) } diff --git a/arkui/ace_ets_test/entry/src/main/ets/MainAbility/test/ListItemJsunit.test.ets b/arkui/ace_ets_test/entry/src/main/ets/MainAbility/test/ListItemJsunit.test.ets index 16a1d730ba0ec4c226d49c5e812976814c7c7182..3e4a667ae376498315ec665456e223e4c9cc4663 100644 --- a/arkui/ace_ets_test/entry/src/main/ets/MainAbility/test/ListItemJsunit.test.ets +++ b/arkui/ace_ets_test/entry/src/main/ets/MainAbility/test/ListItemJsunit.test.ets @@ -116,7 +116,7 @@ export default function listItemJsunit() { console.log('ListItem3‘s editable is ' + JSON.stringify(obj.$attrs.editable)) await sleep(1) expect(obj.$attrs.sticky).assertEqual('Sticky.Opacity') - expect(obj.$attrs.editable).assertEqual('false') + expect(obj.$attrs.editable).assertEqual('EditMode.None') console.info('++++++++++++++++ ListItem TestCase 3 End ++++++++++++++++'); done(); });