提交 e9c0ee05 编写于 作者: shutao-dc's avatar shutao-dc

补充image测试例

上级 33e91e15
// uni-app自动化测试教程: uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe('component-native-image', () => {
let page;
beforeAll(async () => {
page = await program.reLaunch('/pages/component/image/image');
await page.waitFor(600);
});
it('check_image_load', async () => {
expect(await page.data('loadError')).toBe(false)
});
});
...@@ -25,11 +25,13 @@ ...@@ -25,11 +25,13 @@
export default { export default {
data() { data() {
return { return {
title: 'image' title: 'image',
loadError: false
} }
}, },
methods: { methods: {
error(event : ImageErrorEvent) { error(event : ImageErrorEvent) {
this.loadError = true
console.log(event.type, event.detail); console.log(event.type, event.detail);
}, },
load(event : ImageLoadEvent) { load(event : ImageLoadEvent) {
...@@ -63,4 +65,4 @@ ...@@ -63,4 +65,4 @@
margin: 40rpx auto; margin: 40rpx auto;
width: 200rpx; width: 200rpx;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册