提交 46fa19cc 编写于 作者: 雪洛's avatar 雪洛

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

上级 3ec7dee7
......@@ -4,10 +4,12 @@ function getData(key = '') {
resolve(key ? data[key] : data)
})
}
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')
})
......@@ -60,5 +62,20 @@ describe('PickerView.uvue', () => {
maskBottomStyle: 'background: #ffffff;',
})
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.
先完成此消息的编辑!
想要评论请 注册