提交 4f603ff3 编写于 作者: 雪洛's avatar 雪洛

Revert "test: uni.getSystemInfo增加测试例"

This reverts commit 280ad5d7.
上级 de036deb
......@@ -63,10 +63,4 @@ describe('ExtApi-GetSystemInfo', () => {
expect(`${key} not null: ${res[key] != null}`).toBe(`${key} not null: true`)
}
})
it('Check screenHeight at different stages', async ()=> {
await page.callMethod('jest_getScreenHeight_at_different_stages')
res = await page.data('jest_result');
expect(res).toBe(true)
})
});
......@@ -37,23 +37,15 @@
type Item = {
label : string,
value : string,
}
const globalScreenHeight = uni.getSystemInfoSync().screenHeight
}
export default {
data() {
return {
title: 'getSystemInfo',
items: [] as Item[],
screenHeightAtReady: 0,
jest_result: false,
items: [] as Item[],
}
},
onUnload: function () {
},
onReady() {
this.screenHeightAtReady = uni.getSystemInfoSync().screenHeight
console.log(`全局获取屏幕高度: ${globalScreenHeight} onReady内获取屏幕高度: ${this.screenHeightAtReady}`);
},
methods: {
getSystemInfo: function () {
......@@ -104,10 +96,7 @@
//自动化测试例专用
jest_getSystemInfo() : GetSystemInfoResult {
return uni.getSystemInfoSync();
},
jest_getScreenHeight_at_different_stages(){
this.jest_result = (globalScreenHeight == this.screenHeightAtReady)
}
},
}
}
</script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册