Skip to content

Commit

Permalink
Flip failing test to reflect product decision
Browse files Browse the repository at this point in the history
  • Loading branch information
krschacht committed Aug 31, 2024
1 parent a0bf9a3 commit f45697c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/tests/functional/page_refresh_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ test("frames marked with refresh='morph' are excluded from full page morphing",
await expect(page.locator("#refresh-morph")).toHaveText("Loaded morphed frame")
})

test("navigated frames without refresh attribute are reset after morphing", async ({ page }) => {
test("navigated frames without refresh attribute are not reset after morphing", async ({ page }) => {
await page.goto("/src/tests/fixtures/page_refresh.html")

await page.click("#refresh-after-navigation-link")
Expand All @@ -216,17 +216,20 @@ test("navigated frames without refresh attribute are reset after morphing", asyn
"navigates theframe"
)

//await new Promise(resolve => setTimeout(resolve, 300000))

await page.click("#form-submit")

await nextEventNamed(page, "turbo:render", { renderMethod: "morph" })
await nextBeat()

assert.ok(

assert.notOk(
await hasSelector(page, "#refresh-after-navigation-link"),
"resets the frame"
)

assert.notOk(
assert.ok(
await hasSelector(page, "#refresh-after-navigation-content"),
"does not reload the frame"
)
Expand Down

0 comments on commit f45697c

Please sign in to comment.