Skip to content

Commit

Permalink
Fix flaky Firefox tests
Browse files Browse the repository at this point in the history
Some tests that visit the `navigation.html` fixture exercise scroll
behavior by visiting links and other content that is below the fold. The
`style="height: 200vh"` value declared on the page's `<section>` element
is arbitrary, but double the screen size to force content below the
fold.

Unluckily, it cuts off _right_ at the beginning of the new `<iframe>`
elements in Firefox browsers, which obscures the `<a>` element and
prevents link clicks.

To resolve that issue, this commit removes the `[style]` attribute,
since the content is long enough to be scrollable.
  • Loading branch information
seanpdoyle committed Dec 31, 2022
1 parent 9defbe0 commit cea1621
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/tests/fixtures/navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<a href="#ignored-link" id="ignored-link">Skipped Content</a>

<section id="main" style="height: 200vh">
<section id="main">
<h1>Navigation</h1>
<p><a id="same-origin-unannotated-link" href="/src/tests/fixtures/one.html">Same-origin unannotated link</a></p>
<p><a id="same-origin-unannotated-link-search-params" href="/src/tests/fixtures/one.html?key=value">Same-origin unannotated link ?key=value</a></p>
Expand Down
1 change: 1 addition & 0 deletions src/tests/functional/rendering_tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ test("test reloads when tracked elements change due to failed form submission",
})

await page.click("#tracked-asset-change-form button")
await nextBeat()

const reason = await page.evaluate(() => localStorage.getItem("reason"))
const unloaded = await page.evaluate(() => localStorage.getItem("unloaded"))
Expand Down

0 comments on commit cea1621

Please sign in to comment.