diff --git a/pages/API/get-system-info/get-system-info.test.js b/pages/API/get-system-info/get-system-info.test.js index b5a9994307bfb48b3530372a7b712eba7b74b402..5b211de1a0865d47e922e438f1f09f5e3f15c64a 100644 --- a/pages/API/get-system-info/get-system-info.test.js +++ b/pages/API/get-system-info/get-system-info.test.js @@ -56,6 +56,13 @@ describe('ExtApi-GetSystemInfo', () => { expect(['light', 'dark', 'auto']).toContain(value); } } + if (process.env.uniTestPlatformInfo.startsWith('android')) { + if (res.safeAreaInsets.bottom > 0) { + expect(res.safeAreaInsets.top + 44 + res.windowHeight).toBe(res.screenHeight); + } else { + expect(res.safeAreaInsets.top + 44 + res.windowHeight).toBe(res.safeArea.bottom); + } + } }); it('Check GetSystemInfoSync required properties', async () => { for (let i = 0; i < requiredProperties.length; i++) { diff --git a/pages/API/get-window-info/get-window-info.test.js b/pages/API/get-window-info/get-window-info.test.js index a6a636178c22548973017942059bbf4a719584df..c6e223e8346c3e43d85204ce6b6bbe500f68277c 100644 --- a/pages/API/get-window-info/get-window-info.test.js +++ b/pages/API/get-window-info/get-window-info.test.js @@ -23,6 +23,13 @@ describe('ExtApi-GetWindowInfo', () => { if (numberProperties.indexOf(key) != -1) { expect(value).toBeGreaterThanOrEqual(0); } + } + if (process.env.uniTestPlatformInfo.startsWith('android')) { + if (res.safeAreaInsets.bottom > 0) { + expect(res.safeAreaInsets.top + 44 + res.windowHeight).toBe(res.screenHeight); + } else { + expect(res.safeAreaInsets.top + 44 + res.windowHeight).toBe(res.safeArea.bottom); + } } }); });