提交 30069e6c 编写于 作者: DCloud-yinjiacheng's avatar DCloud-yinjiacheng

更新页面截图自动化测试用例

上级 53efd058
// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe('css-font-family', () => {
let page;
beforeAll(async () => {
page = await program.reLaunch('/pages/CSS/text/font-family');
await page.waitFor(3000);
});
it('screenshot', async () => {
const image = await program.screenshot({
fullPage: true
})
expect(image).toMatchImageSnapshot()
});
});
......@@ -84,7 +84,7 @@ const pages = [
'/pages/CSS/padding/padding-top',
'/pages/CSS/padding/padding',
'/pages/CSS/text/color',
'/pages/CSS/text/font-family',
// '/pages/CSS/text/font-family', // 网络资源加载
'/pages/CSS/text/font-size',
'/pages/CSS/text/font-style',
'/pages/CSS/text/font-weight',
......@@ -110,8 +110,7 @@ const pages = [
'/pages/template/custom-tab-bar/custom-tab-bar',
// '/pages/template/drop-card/drop-card',
'/pages/template/half-screen/half-screen',
'/pages/template/list-news/list-news',
'/pages/template/list-news/detail/detail',
// '/pages/template/list-news/list-news', // 网络资源加载
// '/pages/template/long-list/long-list', // 动态内容
'/pages/template/navbar-lite/navbar-lite',
'/pages/template/pull-zoom-image/pull-zoom-image',
......@@ -125,12 +124,6 @@ const pages = [
'/pages/API/element-draw/element-draw',
]
const needDelayPages = [
"/pages/CSS/text/font-family", // load network font
"/pages/template/list-news/list-news", // load network image
"/pages/component/list-view/list-view", // delay wait scroll to disappear
];
let page;
describe("page screenshot test", () => {
beforeAll(async () => {
......@@ -138,9 +131,6 @@ describe("page screenshot test", () => {
});
beforeEach(async () => {
page = await program.reLaunch(pages[pageIndex]);
if (needDelayPages.includes(pages[pageIndex])) {
await page.waitFor(2000);
}
await page.waitFor(1000);
});
afterEach(() => {
......
// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe('template-list-news', () => {
let page;
beforeAll(async () => {
page = await program.reLaunch('/pages/template/list-news/list-news');
await page.waitFor(3000);
});
it('screenshot', async () => {
const image = await program.screenshot({
fullPage: true
})
expect(image).toMatchImageSnapshot()
});
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册