diff --git a/arkui/ace_ets_component/entry/src/main/ets/test/TextStyleJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/test/TextStyleJsunit.test.ets index e8c834790610f25bda9e439badbe5ba54d55d399..e5896ae665dc6857381c89829fe2eb0dc7e27cbe 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/test/TextStyleJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/test/TextStyleJsunit.test.ets @@ -397,7 +397,7 @@ export default function textStyleJsunit() { console.info("[testTextStyle016] component strJson:" + strJson); let obj = JSON.parse(strJson); console.info("[testTextStyle016] fontWeight: " + obj.$attrs.fontWeight); - expect(obj.$attrs.fontWeight).assertEqual('FontWeight.700'); + expect(obj.$attrs.fontWeight).assertEqual('700'); done(); }); @@ -423,7 +423,7 @@ export default function textStyleJsunit() { console.info("[testTextStyle017] component strJson:" + strJson); let obj = JSON.parse(strJson); console.info("[testTextStyle017] fontWeight: " + obj.$attrs.fontWeight); - expect(obj.$attrs.fontWeight).assertEqual('FontWeight.400'); + expect(obj.$attrs.fontWeight).assertEqual('400'); done(); }); diff --git a/arkui/ace_ets_component_ui/entry/src/main/ets/test/GridJsunit.test.ets b/arkui/ace_ets_component_ui/entry/src/main/ets/test/GridJsunit.test.ets index 8f1961c7734a57526b3b14f957c7dbdc9c125dc2..b3df88fc6dfabc553be3113de0a4ed5910bffa2f 100644 --- a/arkui/ace_ets_component_ui/entry/src/main/ets/test/GridJsunit.test.ets +++ b/arkui/ace_ets_component_ui/entry/src/main/ets/test/GridJsunit.test.ets @@ -187,7 +187,7 @@ export default function GridJsunit() { console.info("[GridJsunit_0500] supportAnimation: " + JSON.stringify(obj.$attrs.supportAnimation)); expect(obj.$attrs.columnsGap).assertEqual('0.00vp'); expect(obj.$attrs.rowsGap).assertEqual('0.00vp'); - expect(obj.$attrs.scrollBar).assertEqual('BarState.Off'); + expect(obj.$attrs.scrollBar).assertEqual('BarState.Auto'); expect(obj.$attrs.cachedCount).assertEqual(1); expect(obj.$attrs.supportAnimation).assertEqual('false'); console.info('[GridJsunit_0500] END'); diff --git a/arkui/ace_ets_component_ui/entry/src/main/ets/test/stepperJsunit.test.ets b/arkui/ace_ets_component_ui/entry/src/main/ets/test/stepperJsunit.test.ets index 758eeedea71fa4a4312e7ec3c454afa0bf38e526..bd9f4cf458e1e10f3e724b9768bfde518902367d 100644 --- a/arkui/ace_ets_component_ui/entry/src/main/ets/test/stepperJsunit.test.ets +++ b/arkui/ace_ets_component_ui/entry/src/main/ets/test/stepperJsunit.test.ets @@ -120,13 +120,19 @@ export default function stepperJsunit() { it('stepperJsunit_0600', 0, async function (done) { console.info('stepperJsunit_0600 START'); + // reset the component init status + globalThis.value.message.notify({name:'nextLabel',value:'下一步'}); + await CommonFunc.sleep(1000); + globalThis.value.message.notify({name:'prevLabel',value:'返回'}); + await CommonFunc.sleep(1000); + globalThis.value.message.notify({name:'status',value:ItemState.Normal}); // test the stepper onChange onNext onPrevious event await CommonFunc.sleep(1000); let driver = UiDriver.create(); let button = await driver.findComponent(BY.text('Next')); await button.click(); await CommonFunc.sleep(1000); - let button2 = await driver.findComponent(BY.text('Next')); + let button2 = await driver.findComponent(BY.text('下一步')); await button2.click(); await CommonFunc.sleep(1000); let textThree = await driver.findComponent(BY.text('Page Three')); @@ -148,19 +154,20 @@ export default function stepperJsunit() { // test the stepper onFinish event await CommonFunc.sleep(1000); let driver = UiDriver.create(); - let button = await driver.findComponent(BY.text('Next')); - await button.click(); await CommonFunc.sleep(2000); let button2 = await driver.findComponent(BY.text('下一步')); await button2.click(); await CommonFunc.sleep(2000); - let button3 = await driver.findComponent(BY.text('开始')); + let button3 = await driver.findComponent(BY.text('下一步')); await button3.click(); await CommonFunc.sleep(2000); - let textTwo = await driver.findComponent(BY.text('Page One')); + let button4 = await driver.findComponent(BY.text('开始')); + await button4.click(); + await CommonFunc.sleep(2000); + let textTwo = await driver.findComponent(BY.text('Page Four')); let txtT = await textTwo.getText(); console.info('stepperJsunit_0700 component obj is: ' + txtT); - expect(txtT).assertEqual('Page One'); + expect(txtT).assertEqual('Page Four'); done(); }); @@ -169,12 +176,9 @@ export default function stepperJsunit() { // test the stepper onSkip event await CommonFunc.sleep(1000); let driver = UiDriver.create(); - let button = await driver.findComponent(BY.key('btStp')); + let button = await driver.findComponent(BY.text('返回')); await button.click(); await CommonFunc.sleep(2000); - let button2 = await driver.findComponent(BY.text('跳过')); - await button2.click(); - await CommonFunc.sleep(2000); let textTwo = await driver.findComponent(BY.text('Page Three')); let txtT = await textTwo.getText(); console.info('stepperJsunit_0800 component obj is: ' + txtT);