Skip to content

Commit

Permalink
Try to fix progress bar persisting when following a redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
Intrepidd committed Feb 7, 2024
1 parent aef1abd commit 3ad4134
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/drive/visit.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ export class Visit {
complete() {
if (this.state == VisitState.started) {
this.recordTimingMetric(TimingMetric.visitEnd)
this.adapter.visitCompleted(this)
this.state = VisitState.completed
this.followRedirect()

if (!this.followedRedirect) {
this.adapter.visitCompleted(this)
this.delegate.visitCompleted(this)
}
}
Expand Down
1 change: 1 addition & 0 deletions src/tests/functional/navigation_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ test("following a redirection", async ({ page }) => {
await nextBody(page)
assert.equal(pathname(page.url()), "/src/tests/fixtures/one.html")
assert.equal(await visitAction(page), "replace")
await waitUntilNoSelector(page, ".turbo-progress-bar")
})

test("clicking the back button after redirection", async ({ page }) => {
Expand Down

0 comments on commit 3ad4134

Please sign in to comment.