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

test: 需要加载网络资源的页面,截图前多 wait 2s

上级 0a10f062
...@@ -125,6 +125,11 @@ const pages = [ ...@@ -125,6 +125,11 @@ const pages = [
'/pages/API/element-draw/element-draw', '/pages/API/element-draw/element-draw',
] ]
const needLoadingNetworkResourcesPages = [
"/pages/CSS/text/font-family",
"/pages/template/list-news/list-news",
];
let page; let page;
describe('page screenshot test', () => { describe('page screenshot test', () => {
beforeAll(async () => { beforeAll(async () => {
...@@ -132,6 +137,9 @@ describe('page screenshot test', () => { ...@@ -132,6 +137,9 @@ describe('page screenshot test', () => {
}); });
beforeEach(async () => { beforeEach(async () => {
page = await program.reLaunch(pages[pageIndex]); page = await program.reLaunch(pages[pageIndex]);
if (needLoadingNetworkResourcesPages.includes(pages[pageIndex])) {
await page.waitFor(2000);
}
await page.waitFor(1000); await page.waitFor(1000);
}); });
afterEach(() => { afterEach(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册