提交 2a9f445d 编写于 作者: B bayanxing

add test cases

Signed-off-by: Nbayanxing <bayanxing@kaihongdigi.com>
上级 0576088e
...@@ -27,26 +27,26 @@ describe('stepperItemPropsJsTest', function () { ...@@ -27,26 +27,26 @@ describe('stepperItemPropsJsTest', function () {
}).then(() => { }).then(() => {
console.info(`sleep ${time} over...`) console.info(`sleep ${time} over...`)
}) })
}; }
async function backToIndex() { async function backToIndex() {
let backToIndexPromise = new Promise((resolve, reject) => { let backToIndexPromise = new Promise((resolve, reject) => {
setTimeout(() => { setTimeout(() => {
router.back({ router.back({
uri: 'pages/index/index' uri: 'pages/index/index'
}); })
resolve(); resolve()
}, 500); }, 500)
}); })
let clearPromise = new Promise((resolve, reject) => { let clearPromise = new Promise((resolve, reject) => {
setTimeout(() => { setTimeout(() => {
router.clear(); router.clear()
resolve(); resolve()
}, 500); }, 500)
}); })
await backToIndexPromise.then(() => { await backToIndexPromise.then(() => {
return clearPromise; return clearPromise;
}); })
} }
/** /**
...@@ -67,7 +67,7 @@ describe('stepperItemPropsJsTest', function () { ...@@ -67,7 +67,7 @@ describe('stepperItemPropsJsTest', function () {
} }
await sleep(4000) await sleep(4000)
done() done()
}); })
/** /**
* run after testcase * run after testcase
...@@ -76,7 +76,7 @@ describe('stepperItemPropsJsTest', function () { ...@@ -76,7 +76,7 @@ describe('stepperItemPropsJsTest', function () {
console.info('[stepperItemPropsJsTest] after each called') console.info('[stepperItemPropsJsTest] after each called')
await backToIndex() await backToIndex()
await sleep(1000) await sleep(1000)
}); })
/** /**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
......
...@@ -27,7 +27,7 @@ describe('stepperPropsJsTest', function () { ...@@ -27,7 +27,7 @@ describe('stepperPropsJsTest', function () {
}).then(() => { }).then(() => {
console.info(`sleep ${time} over...`) console.info(`sleep ${time} over...`)
}) })
}; }
async function backToIndex() { async function backToIndex() {
let backToIndexPromise = new Promise((resolve, reject) => { let backToIndexPromise = new Promise((resolve, reject) => {
...@@ -35,18 +35,18 @@ describe('stepperPropsJsTest', function () { ...@@ -35,18 +35,18 @@ describe('stepperPropsJsTest', function () {
router.back({ router.back({
uri: 'pages/index/index' uri: 'pages/index/index'
}); });
resolve(); resolve()
}, 500); }, 500)
}); })
let clearPromise = new Promise((resolve, reject) => { let clearPromise = new Promise((resolve, reject) => {
setTimeout(() => { setTimeout(() => {
router.clear(); router.clear()
resolve(); resolve()
}, 500); }, 500)
}); })
await backToIndexPromise.then(() => { await backToIndexPromise.then(() => {
return clearPromise; return clearPromise;
}); })
} }
/** /**
...@@ -67,7 +67,7 @@ describe('stepperPropsJsTest', function () { ...@@ -67,7 +67,7 @@ describe('stepperPropsJsTest', function () {
} }
await sleep(4000) await sleep(4000)
done() done()
}); })
/** /**
* run after testcase * run after testcase
...@@ -76,7 +76,7 @@ describe('stepperPropsJsTest', function () { ...@@ -76,7 +76,7 @@ describe('stepperPropsJsTest', function () {
console.info('[stepperPropsJsTest] after each called') console.info('[stepperPropsJsTest] after each called')
await backToIndex() await backToIndex()
await sleep(1000) await sleep(1000)
}); })
/** /**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册