Skip to content

Commit

Permalink
[Tests]: Await next body with form link submissions
Browse files Browse the repository at this point in the history
Resolve timing-related flaky tests by pausing for 500ms.
  • Loading branch information
seanpdoyle committed Jul 18, 2022
1 parent 5fdfce1 commit 5385c8c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tests/functional/form_submission_tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,7 @@ test("test following a link with [data-turbo-method] and [data-turbo=true] set w
await link.evaluate((link) => link.setAttribute("data-turbo", "true"))

await link.click()
await nextBody(page)

assert.equal(await page.textContent("h1"), "Form", "does not navigate the full page")
assert.equal(await page.textContent("#hello h2"), "Hello from a frame", "drives the turbo-frame")
Expand All @@ -930,6 +931,7 @@ test("test following a link with [data-turbo-method] and [data-turbo=true] set w
await link.evaluate((link) => link.setAttribute("data-turbo", "true"))

await link.click()
await nextBody(page)

assert.equal(await page.textContent("h1"), "Form", "does not navigate the full page")
assert.equal(await page.textContent("#hello h2"), "Hello from a frame", "drives the turbo-frame")
Expand Down

0 comments on commit 5385c8c

Please sign in to comment.