提交 ab93fe52 编写于 作者: A Anne_LXM

update test

上级 f2ceee41
let pageIndex = 0
const pages = [
'/pages/ucenter/settings/settings',
'/pages/ucenter/ucenter',
'/uni_modules/uni-id-pages/pages/login/login-withoutpwd'
]
let page;
describe('page screenshot test', () => {
beforeAll(async () => {
console.log("page screenshot test start");
});
beforeEach(async () => {
page = await program.reLaunch(pages[pageIndex]);
await page.waitFor(1000);
});
afterEach(() => {
pageIndex++;
});
afterAll(() => {
console.log("page screenshot test finish");
});
test.each(pages)('%s', async () => {
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
await page.waitFor(500);
})
})
\ No newline at end of file
......@@ -24,6 +24,7 @@ module.exports = {
let action = res.data.length ? 'refresh' : 'create'
//执行并返回结果
let option = {
text:'1234',//自动化测试专用
scene, //来源客户端传递,表示:使用场景值,用于防止不同功能的验证码混用
uniPlatform: platform
}
......
......@@ -29,4 +29,4 @@
"eslint-plugin-n": "^15.2.3",
"eslint-plugin-promise": "^6.0.0"
}
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册