提交 1a03fa54 编写于 作者: H hdx

picker-view.test: 调整自动化测试写法

上级 79251caf
...@@ -15,15 +15,19 @@ describe('PickerView.uvue', () => { ...@@ -15,15 +15,19 @@ describe('PickerView.uvue', () => {
it('value', async () => { it('value', async () => {
const el = await page.$('.picker-view') const el = await page.$('.picker-view')
await page.callMethod('setValue') await page.callMethod('setValue')
await page.waitFor(1000) await page.waitFor(1000)
expect(await el.property('value')).toEqual([0, 0, 0]) const newValue1 = await el.property('value')
// TODO
expect(newValue1.toString()).toEqual('0,0,0')
if (process.env.UNI_PLATFORM === 'app-android') { if (process.env.UNI_PLATFORM === 'app-android') {
expect(await getData('result')).toEqual([0, 0, 0]) expect(await getData('result')).toEqual([0, 0, 0])
} }
await page.callMethod('setValue1') await page.callMethod('setValue1')
await page.waitFor(1000) await page.waitFor(1000)
expect(await el.property('value')).toEqual([10, 10, 10]) const newValue2 = await el.property('value')
// TODO
expect(newValue2.toString()).toEqual('10,10,10')
if (process.env.UNI_PLATFORM === 'app-android') { if (process.env.UNI_PLATFORM === 'app-android') {
expect(await getData('result')).toEqual([10, 10, 10]) expect(await getData('result')).toEqual([10, 10, 10])
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册