提交 8ace07a2 编写于 作者: H hekun

fix the error

Signed-off-by: Nhekun <hekun18@huawei.com>
上级 ecdb7aaa
...@@ -397,7 +397,7 @@ export default function textStyleJsunit() { ...@@ -397,7 +397,7 @@ export default function textStyleJsunit() {
console.info("[testTextStyle016] component strJson:" + strJson); console.info("[testTextStyle016] component strJson:" + strJson);
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[testTextStyle016] fontWeight: " + obj.$attrs.fontWeight); console.info("[testTextStyle016] fontWeight: " + obj.$attrs.fontWeight);
expect(obj.$attrs.fontWeight).assertEqual('FontWeight.700'); expect(obj.$attrs.fontWeight).assertEqual('700');
done(); done();
}); });
...@@ -423,7 +423,7 @@ export default function textStyleJsunit() { ...@@ -423,7 +423,7 @@ export default function textStyleJsunit() {
console.info("[testTextStyle017] component strJson:" + strJson); console.info("[testTextStyle017] component strJson:" + strJson);
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[testTextStyle017] fontWeight: " + obj.$attrs.fontWeight); console.info("[testTextStyle017] fontWeight: " + obj.$attrs.fontWeight);
expect(obj.$attrs.fontWeight).assertEqual('FontWeight.400'); expect(obj.$attrs.fontWeight).assertEqual('400');
done(); done();
}); });
......
...@@ -187,7 +187,7 @@ export default function GridJsunit() { ...@@ -187,7 +187,7 @@ export default function GridJsunit() {
console.info("[GridJsunit_0500] supportAnimation: " + JSON.stringify(obj.$attrs.supportAnimation)); console.info("[GridJsunit_0500] supportAnimation: " + JSON.stringify(obj.$attrs.supportAnimation));
expect(obj.$attrs.columnsGap).assertEqual('0.00vp'); expect(obj.$attrs.columnsGap).assertEqual('0.00vp');
expect(obj.$attrs.rowsGap).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.cachedCount).assertEqual(1);
expect(obj.$attrs.supportAnimation).assertEqual('false'); expect(obj.$attrs.supportAnimation).assertEqual('false');
console.info('[GridJsunit_0500] END'); console.info('[GridJsunit_0500] END');
......
...@@ -120,13 +120,19 @@ export default function stepperJsunit() { ...@@ -120,13 +120,19 @@ export default function stepperJsunit() {
it('stepperJsunit_0600', 0, async function (done) { it('stepperJsunit_0600', 0, async function (done) {
console.info('stepperJsunit_0600 START'); 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 // test the stepper onChange onNext onPrevious event
await CommonFunc.sleep(1000); await CommonFunc.sleep(1000);
let driver = UiDriver.create(); let driver = UiDriver.create();
let button = await driver.findComponent(BY.text('Next')); let button = await driver.findComponent(BY.text('Next'));
await button.click(); await button.click();
await CommonFunc.sleep(1000); await CommonFunc.sleep(1000);
let button2 = await driver.findComponent(BY.text('Next')); let button2 = await driver.findComponent(BY.text('下一步'));
await button2.click(); await button2.click();
await CommonFunc.sleep(1000); await CommonFunc.sleep(1000);
let textThree = await driver.findComponent(BY.text('Page Three')); let textThree = await driver.findComponent(BY.text('Page Three'));
...@@ -148,19 +154,20 @@ export default function stepperJsunit() { ...@@ -148,19 +154,20 @@ export default function stepperJsunit() {
// test the stepper onFinish event // test the stepper onFinish event
await CommonFunc.sleep(1000); await CommonFunc.sleep(1000);
let driver = UiDriver.create(); let driver = UiDriver.create();
let button = await driver.findComponent(BY.text('Next'));
await button.click();
await CommonFunc.sleep(2000); await CommonFunc.sleep(2000);
let button2 = await driver.findComponent(BY.text('下一步')); let button2 = await driver.findComponent(BY.text('下一步'));
await button2.click(); await button2.click();
await CommonFunc.sleep(2000); await CommonFunc.sleep(2000);
let button3 = await driver.findComponent(BY.text('开始')); let button3 = await driver.findComponent(BY.text('下一步'));
await button3.click(); await button3.click();
await CommonFunc.sleep(2000); 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(); let txtT = await textTwo.getText();
console.info('stepperJsunit_0700 component obj is: ' + txtT); console.info('stepperJsunit_0700 component obj is: ' + txtT);
expect(txtT).assertEqual('Page One'); expect(txtT).assertEqual('Page Four');
done(); done();
}); });
...@@ -169,12 +176,9 @@ export default function stepperJsunit() { ...@@ -169,12 +176,9 @@ export default function stepperJsunit() {
// test the stepper onSkip event // test the stepper onSkip event
await CommonFunc.sleep(1000); await CommonFunc.sleep(1000);
let driver = UiDriver.create(); let driver = UiDriver.create();
let button = await driver.findComponent(BY.key('btStp')); let button = await driver.findComponent(BY.text('返回'));
await button.click(); await button.click();
await CommonFunc.sleep(2000); 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 textTwo = await driver.findComponent(BY.text('Page Three'));
let txtT = await textTwo.getText(); let txtT = await textTwo.getText();
console.info('stepperJsunit_0800 component obj is: ' + txtT); console.info('stepperJsunit_0800 component obj is: ' + txtT);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册