提交 67bf6971 编写于 作者: 雪洛's avatar 雪洛

test: 增加picker-view示例页面重新进入页面测试

上级 4eab3d32
......@@ -5,9 +5,11 @@ function getData(key = '') {
})
}
const PAGE_PATH = '/pages/component/picker-view/picker-view'
let page
beforeAll(async () => {
page = await program.reLaunch('/pages/component/picker-view/picker-view')
page = await program.reLaunch(PAGE_PATH)
await page.waitFor('view')
})
......@@ -61,4 +63,19 @@ describe('PickerView.uvue', () => {
})
expect(await el.attribute('mask-bottom-style')).toBe('background: #ffffff;')
})
it('reopen-picker-view-page', async () => {
await program.navigateBack()
page = await program.navigateTo(PAGE_PATH)
await page.waitFor(500)
const date = new Date()
const {
year,
month,
day
} = await page.data()
expect(year).toEqual(date.getFullYear())
expect(month).toEqual(date.getMonth() + 1)
expect(day).toEqual(date.getDate())
})
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册