Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix navigating to the turbo-root does not use Turbo Drive #1341

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

leofeyer
Copy link

@leofeyer leofeyer commented Nov 21, 2024

Fixes #912

This is just a copy of #913 with the merge conflicts resolved, so credits should go to @tobyzerner.

Copy link
Collaborator

@brunoprietog brunoprietog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @leofeyer, thanks. I did a quick first pass and left minor styling suggestions.

@@ -25,7 +25,7 @@ export function getExtension(url) {
}

export function isPrefixedBy(baseURL, url) {
const prefix = getPrefix(url)
const prefix = getPrefix(url) || '/'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const prefix = getPrefix(url) || '/'
const prefix = getPrefix(url) || "/"

import { assert } from "chai"
import { nextBody, pathname, visitAction } from "../helpers/page"

test("test visiting a location inside the root", async ({ page }) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
test("test visiting a location inside the root", async ({ page }) => {
test("visiting a location inside the root", async ({ page }) => {

assert.notEqual(await visitAction(page), "load")
})

test("test visiting the root itself", async ({ page }) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
test("test visiting the root itself", async ({ page }) => {
test("visiting the root itself", async ({ page }) => {

assert.notEqual(await visitAction(page), "load")
})

test("test visiting a location outside the root", async ({ page }) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
test("test visiting a location outside the root", async ({ page }) => {
test("visiting a location outside the root", async ({ page }) => {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Navigating to the turbo-root doesn't use Turbo Drive
3 participants