提交 cb353038 编写于 作者: H hekun

submit the testcase

Signed-off-by: Nhekun <hekun18@huawei.com>
上级 470b9f53
...@@ -169,7 +169,7 @@ export default function stepperJsunit() { ...@@ -169,7 +169,7 @@ export default function stepperJsunit() {
let strJsonNew = getInspectorByKey('stepper'); let strJsonNew = getInspectorByKey('stepper');
let objNew = JSON.parse(strJsonNew); let objNew = JSON.parse(strJsonNew);
console.info("stepperTest_0300 component objNew is: " + JSON.stringify(objNew)); console.info("stepperTest_0300 component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.index).assertEqual('11111111'); expect(objNew.$attrs.index).assertEqual('0');
console.info('stepperTest_0300 END'); console.info('stepperTest_0300 END');
done(); done();
}); });
......
...@@ -75,7 +75,7 @@ struct StepperExample { ...@@ -75,7 +75,7 @@ struct StepperExample {
StepperItem() { StepperItem() {
Column() { Column() {
Text('Page One') Text('Page One')
.itemTextStyle() .itemTextStyle().key('pageOne')
Button('change status:' + this.firstState) Button('change status:' + this.firstState)
.backgroundColor('#007dFF') .backgroundColor('#007dFF')
.onClick(() => { .onClick(() => {
......
...@@ -171,10 +171,10 @@ export default function stepperJsunit() { ...@@ -171,10 +171,10 @@ export default function stepperJsunit() {
await button4.click(); await button4.click();
console.info('stepperJsunit_0700 button4 click succ'); console.info('stepperJsunit_0700 button4 click succ');
await CommonFunc.sleep(2000); await CommonFunc.sleep(2000);
let strJson = getInspectorByKey('pageFour'); let strJson = getInspectorByKey('pageOne');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info('stepperJsunit_0700 component obj is: ' + obj.$attrs.content); console.info('stepperJsunit_0700 component obj is: ' + obj.$attrs.content);
expect(obj.$attrs.content).assertEqual('Page Four'); expect(obj.$attrs.content).assertEqual('Page One');
done(); done();
}); });
...@@ -183,13 +183,13 @@ export default function stepperJsunit() { ...@@ -183,13 +183,13 @@ 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.text('返回')); let button = await driver.findComponent(BY.text('Next'));
await button.click(); await button.click();
await CommonFunc.sleep(2000); await CommonFunc.sleep(2000);
let strJson = getInspectorByKey('pageThree'); let strJson = getInspectorByKey('pageTwo');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info('stepperJsunit_0800 component obj is: ' + obj.$attrs.content); console.info('stepperJsunit_0800 component obj is: ' + obj.$attrs.content);
expect(obj.$attrs.content).assertEqual('Page Three'); expect(obj.$attrs.content).assertEqual('Page Two');
done(); done();
}); });
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册