Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Commit 0761730

Browse files
committed
Fix the correct test
1 parent a37bc3d commit 0761730

File tree

1 file changed

+10
-10
lines changed
  • packages/e2e-tests/next-app-with-locales/cypress/integration

1 file changed

+10
-10
lines changed

packages/e2e-tests/next-app-with-locales/cypress/integration/pages.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,7 @@ describe("Pages Tests", () => {
209209
].forEach(({ path }) => {
210210
it(`serves page ${path} with fallback at first`, () => {
211211
cy.visit(path);
212-
213-
// Next.js currently behaves inconsistently here,
214-
// dropping the default locale for static pages
215-
if (path === "/en/fallback/d") {
216-
cy.location("pathname").should("eq", "/fallback/d");
217-
} else {
218-
cy.location("pathname").should("eq", path);
219-
}
220-
212+
cy.location("pathname").should("eq", path);
221213
cy.contains("Hello fallback");
222214
});
223215
});
@@ -230,7 +222,15 @@ describe("Pages Tests", () => {
230222
].forEach(({ path }) => {
231223
it(`serves page ${path} with correct content soon`, () => {
232224
cy.visit(path);
233-
cy.location("pathname").should("eq", path);
225+
226+
// Next.js currently behaves inconsistently here,
227+
// dropping the default locale for static pages
228+
if (path === "/en/fallback/d") {
229+
cy.location("pathname").should("eq", "/fallback/d");
230+
} else {
231+
cy.location("pathname").should("eq", path);
232+
}
233+
234234
cy.contains(`Hello ${path.slice(-1)}`);
235235
});
236236
});

0 commit comments

Comments
 (0)