提交 4a159e16 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

test: 优化测试例

上级 4b26b2ac
...@@ -7,7 +7,7 @@ describe('API-loading', () => { ...@@ -7,7 +7,7 @@ describe('API-loading', () => {
beforeAll(async () => { beforeAll(async () => {
page = await program.reLaunch('/pages/API/modal/modal') page = await program.reLaunch('/pages/API/modal/modal')
await page.waitFor(200); await page.waitFor('view');
}); });
......
...@@ -9,7 +9,7 @@ describe('api-resize-observer', () => { ...@@ -9,7 +9,7 @@ describe('api-resize-observer', () => {
it('check_resize-observer', async () => { it('check_resize-observer', async () => {
await page.waitFor(600) await page.waitFor(600)
const image = await program.screenshot(); const image = await program.screenshot({fullPage: true});
expect(image).toSaveImageSnapshot(); expect(image).toSaveImageSnapshot();
}) })
......
...@@ -2,6 +2,12 @@ const CURRENT_PAGE_PATH = ...@@ -2,6 +2,12 @@ const CURRENT_PAGE_PATH =
'/pages/API/set-navigation-bar-color/set-navigation-bar-color' '/pages/API/set-navigation-bar-color/set-navigation-bar-color'
describe('setNavigationBarColor', () => { describe('setNavigationBarColor', () => {
if (process.env.UNI_AUTOMATOR_APP_WEBVIEW == 'true') {
it('dummyTest', () => {
expect(1).toBe(1)
})
return
}
let page let page
let originLifeCycleNum let originLifeCycleNum
beforeAll(async () => { beforeAll(async () => {
......
...@@ -2,6 +2,12 @@ const CURRENT_PAGE_PATH = ...@@ -2,6 +2,12 @@ const CURRENT_PAGE_PATH =
"/pages/API/set-navigation-bar-title/set-navigation-bar-title"; "/pages/API/set-navigation-bar-title/set-navigation-bar-title";
describe("setNavigationBarColor", () => { describe("setNavigationBarColor", () => {
if (process.env.UNI_AUTOMATOR_APP_WEBVIEW == 'true') {
it('dummyTest', () => {
expect(1).toBe(1)
})
return
}
let page; let page;
let originLifeCycleNum; let originLifeCycleNum;
beforeAll(async () => { beforeAll(async () => {
......
...@@ -8,7 +8,7 @@ describe('PagesJson-backgroundColorContent', () => { ...@@ -8,7 +8,7 @@ describe('PagesJson-backgroundColorContent', () => {
it('background color content size', async () => { it('background color content size', async () => {
await program.pageScrollTo(1000) await program.pageScrollTo(1000)
const image = await program.screenshot(); const image = await program.screenshot({fullPage: true});
expect(image).toSaveImageSnapshot() expect(image).toSaveImageSnapshot()
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册