提交 f20ab44c 编写于 作者: W wangjinxin613

test: 测试例兼容 app-webview 模式

上级 b8deac71
...@@ -2,7 +2,7 @@ const PAGE_PATH = ...@@ -2,7 +2,7 @@ const PAGE_PATH =
"/pages/API/request-payment/request-payment"; "/pages/API/request-payment/request-payment";
describe("payment", () => { describe("payment", () => {
if (process.env.uniTestPlatformInfo.indexOf('web') > -1) { if (process.env.uniTestPlatformInfo.indexOf('web') > -1 || process.env.UNI_AUTOMATOR_APP_WEBVIEW === 'true') {
it('web', () => { it('web', () => {
expect(1).toBe(1) expect(1).toBe(1)
}) })
......
...@@ -22,6 +22,7 @@ describe('list-view-children-in-slot', () => { ...@@ -22,6 +22,7 @@ describe('list-view-children-in-slot', () => {
const addBtn = await page.$('#add-btn') const addBtn = await page.$('#add-btn')
await addBtn.tap() await addBtn.tap()
await page.waitFor(500)
listItems = await page.$$('list-item') listItems = await page.$$('list-item')
expect(listItems.length).toBe(11) expect(listItems.length).toBe(11)
...@@ -33,12 +34,12 @@ describe('list-view-children-in-slot', () => { ...@@ -33,12 +34,12 @@ describe('list-view-children-in-slot', () => {
const emptyBtn = await page.$('#empty-btn') const emptyBtn = await page.$('#empty-btn')
await emptyBtn.tap() await emptyBtn.tap()
await page.waitFor(500)
listItems = await page.$$('list-item') listItems = await page.$$('list-item')
expect(listItems.length).toBe(3) expect(listItems.length).toBe(3)
await addBtn.tap() await addBtn.tap()
await page.waitFor(500)
listItems = await page.$$('list-item') listItems = await page.$$('list-item')
expect(listItems.length).toBe(5) expect(listItems.length).toBe(5)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册