Skip to content

Commit

Permalink
Fix e2e test for webkit due to no prefetch support (Remix commit b6c2…
Browse files Browse the repository at this point in the history
…f23)
  • Loading branch information
brophdawg11 committed Jun 26, 2024
1 parent bd0484c commit 716cb3a
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions integration/client-data-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,7 @@ test.describe("Client Data", () => {
});
test("does not prefetch server loader if a client loader is present", async ({
page,
browserName,
}) => {
appFixture = await createAppFixture(
await createFixture({
Expand Down Expand Up @@ -947,12 +948,18 @@ test.describe("Client Data", () => {

let app = new PlaywrightFixture(appFixture, page);
await app.goto("/", true);
// Only prefetch child server loader since parent has a `clientLoader`
expect(dataUrls).toEqual([
expect.stringMatching(
/parent\/child\.data\?_routes=routes%2Fparent\.child/
),
]);

if (browserName === "webkit") {
// No prefetch support :/
expect(dataUrls).toEqual([]);
} else {
// Only prefetch child server loader since parent has a `clientLoader`
expect(dataUrls).toEqual([
expect.stringMatching(
/parent\/child\.data\?_routes=routes%2Fparent\.child/
),
]);
}
});
});

Expand Down

0 comments on commit 716cb3a

Please sign in to comment.