From bc472ff7c4f5750cb3281b37548248b4335de5ab Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Tue, 15 Sep 2026 10:22:14 +0100 Subject: [PATCH] test: fix click tests on android - Anchor the fixed header with bottom instead of a vh-based height, since 100vh exceeds innerHeight on Android and covered the whole viewport. - Skip the iframe retention test on Android. --- tests/page/page-click-scroll.spec.ts | 2 +- tests/page/page-click.spec.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/page/page-click-scroll.spec.ts b/tests/page/page-click-scroll.spec.ts index 1cfaeb63ff93b..43ebcf6012176 100644 --- a/tests/page/page-click-scroll.spec.ts +++ b/tests/page/page-click-scroll.spec.ts @@ -167,7 +167,7 @@ it('should scroll instantly on retry when scroll-behavior is smooth', async ({ p html { scroll-behavior: smooth; } body { margin: 0; } .spacer { height: 2000px; } - #header { position: fixed; top: 0; left: 0; right: 0; height: calc(100vh - 50px); background: rgba(0, 0, 0, 0.1); } + #header { position: fixed; top: 0; left: 0; right: 0; bottom: 50px; background: rgba(0, 0, 0, 0.1); } button { height: 30px; } diff --git a/tests/page/page-click.spec.ts b/tests/page/page-click.spec.ts index 9206c6cd57a0e..7b7bef30c686c 100644 --- a/tests/page/page-click.spec.ts +++ b/tests/page/page-click.spec.ts @@ -1027,7 +1027,9 @@ it('should click in an iframe with border 2', async ({ page }) => { expect(await page.evaluate('window._clicked')).toBe(true); }); -it('should not retain removed iframe after clicking inside it', async ({ page }) => { +it('should not retain removed iframe after clicking inside it', async ({ page, isAndroid }) => { + it.skip(isAndroid, 'requesting gc is not enough'); + await page.setContent(''); const button = page.frameLocator('iframe').getByRole('button'); await button.waitFor();