diff --git a/packages/e2e/cypress.config.ts b/packages/e2e/cypress.config.ts index d17c5485..89f2f4de 100644 --- a/packages/e2e/cypress.config.ts +++ b/packages/e2e/cypress.config.ts @@ -24,7 +24,8 @@ export default defineConfig({ env: { basePath, windowHistorySupport, - supportsShallowRouting: supportsShallowRouting(nextJsVersion) + supportsShallowRouting: supportsShallowRouting(nextJsVersion), + nextJsVersion } } }) diff --git a/packages/e2e/cypress/e2e/repro-359.cy.js b/packages/e2e/cypress/e2e/repro-359.cy.js index 4600f912..7a1671be 100644 --- a/packages/e2e/cypress/e2e/repro-359.cy.js +++ b/packages/e2e/cypress/e2e/repro-359.cy.js @@ -1,6 +1,6 @@ /// -it.only('repro-359', () => { +it('repro-359', () => { cy.visit('/app/repro-359') cy.contains('#hydration-marker', 'hydrated').should('be.hidden') diff --git a/packages/e2e/cypress/e2e/repro-498.cy.js b/packages/e2e/cypress/e2e/repro-498.cy.js new file mode 100644 index 00000000..a4be3be8 --- /dev/null +++ b/packages/e2e/cypress/e2e/repro-498.cy.js @@ -0,0 +1,17 @@ +/// + +if ( + Cypress.env('windowHistorySupport') !== 'true' && + Cypress.env('nextJsVersion') !== '14.1.0' // See issue #498 +) { + it('Reproduction for issue #498', () => { + cy.config('retries', 0) + cy.visit('/app/repro-498') + cy.contains('#hydration-marker', 'hydrated').should('be.hidden') + cy.get('#start').click() + cy.location('hash').should('eq', '#section') + cy.get('button').click() + cy.location('search').should('eq', '?q=test') + cy.location('hash').should('eq', '#section') + }) +} diff --git a/packages/e2e/src/app/app/repro-498/page.tsx b/packages/e2e/src/app/app/repro-498/page.tsx new file mode 100644 index 00000000..5818cebd --- /dev/null +++ b/packages/e2e/src/app/app/repro-498/page.tsx @@ -0,0 +1,22 @@ +'use client' + +import { useQueryState } from 'nuqs' +import { Suspense } from 'react' + +export default function Page() { + return ( +
+ + Apply fragment + + + + +
+ ) +} + +function Client() { + const [, set] = useQueryState('q') + return +}