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

add test cases

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