提交 bb71231a 编写于 作者: DCloud_iOS_XHY's avatar DCloud_iOS_XHY

修改 rich-text 测试例,加大延迟时间,避免因为时机导致获取值不对

上级 965e56bc
...@@ -13,17 +13,20 @@ describe('rich-text-test', () => { ...@@ -13,17 +13,20 @@ describe('rich-text-test', () => {
let page let page
beforeAll(async () => { beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH) page = await program.reLaunch(PAGE_PATH)
await page.waitFor(1000); await page.waitFor(1500);
}) })
it('richt-text-height', async () => { it('richt-text-height', async () => {
await page.waitFor(1000);
let beforeValue = await page.data('richTextHeight') let beforeValue = await page.data('richTextHeight')
if beforeValue < 10 {
await page.waitFor(1000)
beforeValue = await page.data('richTextHeight')
}
await page.callMethod('changeText') await page.callMethod('changeText')
await page.waitFor(500) await page.waitFor(500)
await page.callMethod('changeText') await page.callMethod('changeText')
await page.waitFor(500) await page.waitFor(1000)
let afterValue = await page.data('richTextHeight') let afterValue = await page.data('richTextHeight')
console.log('beforeValue:', beforeValue) console.log('beforeValue:', beforeValue)
console.log('afterValue:', afterValue) console.log('afterValue:', afterValue)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册