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

refactor: 调整 checkGetAndroidView 返回结果

上级 14cdd518
const HOME_PAGE_PATH = '/pages/tabBar/component'
const PAGE_PATH = '/pages/API/get-current-pages/get-current-pages?test=123'
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isAndroid = platformInfo.startsWith('android')
describe('getCurrentPages', () => {
let page
......@@ -92,6 +94,6 @@ describe('getCurrentPages', () => {
})
it('getAndroidView', async () => {
const res = await page.callMethod('checkGetAndroidView')
expect(res).toBe(true)
expect(res).toBe(isAndroid)
})
})
......@@ -208,12 +208,7 @@
checkGetAndroidView() : boolean {
const page = this.getCurrentPage()
const androidView = page.getAndroidView()
// #ifdef APP-ANDROID
const res = androidView != null
// #endif
// #ifndef APP-ANDROID
const res = androidView == null
// #endif
console.log('check getAndroidView', res)
uni.showToast(res ? { title: 'check success' } : { title: 'check fail', icon: 'error' })
return res
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册