From 54067b39e91c42f30f45f38cb6b410960032d78b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Best?= Date: Sun, 15 Dec 2024 21:30:21 +0100 Subject: [PATCH] test: Move e2e tests into shared library (#807) --- packages/e2e/next/cypress.config.ts | 22 +- .../next/cypress/e2e/hash-preservation.cy.js | 35 - .../e2e/persist-across-navigation.cy.js | 2 +- .../next/cypress/e2e/shared/basic-io.cy.ts | 25 + .../e2e/shared/hash-preservation.cy.ts | 25 + .../e2e/next/cypress/e2e/shared/linking.cy.ts | 25 + .../e2e/next/cypress/e2e/shared/push.cy.ts | 59 + .../e2e/next/cypress/e2e/shared/routing.cy.ts | 25 + packages/e2e/next/cypress/support/e2e.ts | 4 +- packages/e2e/next/next.config.mjs | 1 + packages/e2e/next/package.json | 3 +- .../(shared)/basic-io/useQueryState/page.tsx | 10 + .../(shared)/basic-io/useQueryStates/page.tsx | 10 + .../dynamic/[route]/page.tsx | 10 + .../app/(shared)/hash-preservation/page.tsx | 10 + .../linking/useQueryState/other/page.tsx | 10 + .../(shared)/linking/useQueryState/page.tsx | 10 + .../linking/useQueryStates/other/page.tsx | 10 + .../(shared)/linking/useQueryStates/page.tsx | 10 + .../useQueryState/dynamic/[route]/page.tsx | 10 + .../app/(shared)/push/useQueryState/page.tsx | 10 + .../useQueryStates/dynamic/[route]/page.tsx | 10 + .../app/(shared)/push/useQueryStates/page.tsx | 10 + .../routing/useQueryState/other/page.tsx | 10 + .../(shared)/routing/useQueryState/page.tsx | 10 + .../routing/useQueryStates/other/page.tsx | 10 + .../(shared)/routing/useQueryStates/page.tsx | 10 + .../next/src/app/app/transitions/client.tsx | 2 - packages/e2e/next/src/app/layout.tsx | 7 +- packages/e2e/next/src/app/providers.tsx | 35 + packages/e2e/next/src/pages/_app.tsx | 30 +- .../pages/pages/basic-io/useQueryState.tsx | 3 + .../pages/pages/basic-io/useQueryStates.tsx | 3 + .../dynamic/[route]/index.tsx | 3 + .../pages/pages/hash-preservation/index.tsx | 3 + .../pages/linking/useQueryState/index.tsx | 5 + .../pages/linking/useQueryState/other.tsx | 5 + .../pages/linking/useQueryStates/index.tsx | 5 + .../pages/linking/useQueryStates/other.tsx | 5 + .../useQueryState/dynamic/[route]/index.tsx | 3 + .../pages/pages/push/useQueryState/index.tsx | 3 + .../useQueryStates/dynamic/[route]/index.tsx | 3 + .../pages/pages/push/useQueryStates/index.tsx | 3 + .../pages/routing/useQueryState/index.tsx | 5 + .../pages/routing/useQueryState/other.tsx | 5 + .../pages/routing/useQueryStates/index.tsx | 5 + .../pages/routing/useQueryStates/other.tsx | 5 + .../src/pages/pages/useQueryState/index.tsx | 2 - .../src/pages/pages/useQueryStates/index.tsx | 2 - packages/e2e/next/tsconfig.json | 5 +- .../e2e/react-router/v6/cypress.config.ts | 5 + .../e2e/react-router/v6/cypress/.gitignore | 4 + .../v6/cypress/e2e/shared/basic-io.cy.ts | 11 + .../e2e/shared/hash-preservation.cy.ts | 5 + .../v6/cypress/e2e/shared/linking.cy.ts | 11 + .../v6/cypress/e2e/shared/push.cy.ts | 11 + .../v6/cypress/e2e/shared/routing.cy.ts | 13 + .../react-router/v6/cypress/support/e2e.ts | 1 + packages/e2e/react-router/v6/package.json | 25 +- packages/e2e/react-router/v6/src/App.tsx | 11 - .../v6/src/components/counter-button.test.tsx | 34 - .../v6/src/components/counter-button.tsx | 9 - .../v6/src/components/search-input.test.tsx | 38 - .../v6/src/components/search-input.tsx | 15 - packages/e2e/react-router/v6/src/layout.tsx | 41 + .../e2e/react-router/v6/src/react-router.tsx | 39 +- .../v6/src/routes/basic-io.useQueryState.tsx | 3 + .../v6/src/routes/basic-io.useQueryStates.tsx | 3 + .../v6/src/routes/hash-preservation.tsx | 3 + .../routes/linking.useQueryState.other.tsx | 5 + .../v6/src/routes/linking.useQueryState.tsx | 5 + .../routes/linking.useQueryStates.other.tsx | 5 + .../v6/src/routes/linking.useQueryStates.tsx | 5 + .../v6/src/routes/push.useQueryState.tsx | 3 + .../v6/src/routes/push.useQueryStates.tsx | 3 + .../routes/routing.useQueryState.other.tsx | 5 + .../v6/src/routes/routing.useQueryState.tsx | 5 + .../routes/routing.useQueryStates.other.tsx | 5 + .../v6/src/routes/routing.useQueryStates.tsx | 5 + .../e2e/react-router/v6/tsconfig.app.json | 2 +- packages/e2e/react-router/v6/tsconfig.json | 15 + .../e2e/react-router/v6/tsconfig.node.json | 2 +- packages/e2e/react-router/v6/vite.config.ts | 12 +- packages/e2e/react-router/v6/vitest.setup.ts | 8 - packages/e2e/react-router/v7/app/layout.tsx | 41 + packages/e2e/react-router/v7/app/routes.ts | 21 +- .../v7/app/routes/basic-io.useQueryState.tsx | 3 + .../v7/app/routes/basic-io.useQueryStates.tsx | 3 + .../v7/app/routes/hash-preservation.tsx | 3 + .../e2e/react-router/v7/app/routes/home.tsx | 12 - .../routes/linking.useQueryState.other.tsx | 5 + .../v7/app/routes/linking.useQueryState.tsx | 5 + .../routes/linking.useQueryStates.other.tsx | 5 + .../v7/app/routes/linking.useQueryStates.tsx | 5 + .../v7/app/routes/push.useQueryState.tsx | 3 + .../v7/app/routes/push.useQueryStates.tsx | 3 + .../routes/routing.useQueryState.other.tsx | 5 + .../v7/app/routes/routing.useQueryState.tsx | 5 + .../routes/routing.useQueryStates.other.tsx | 5 + .../v7/app/routes/routing.useQueryStates.tsx | 5 + .../e2e/react-router/v7/cypress.config.ts | 5 + .../e2e/react-router/v7/cypress/.gitignore | 4 + .../v7/cypress/e2e/shared/basic-io.cy.ts | 11 + .../e2e/shared/hash-preservation.cy.ts | 5 + .../v7/cypress/e2e/shared/linking.cy.ts | 11 + .../v7/cypress/e2e/shared/push.cy.ts | 11 + .../v7/cypress/e2e/shared/routing.cy.ts | 13 + .../react-router/v7/cypress/support/e2e.ts | 1 + packages/e2e/react-router/v7/package.json | 21 +- .../react-router/v7/react-router.config.ts | 6 +- packages/e2e/react-router/v7/server.mjs | 66 + packages/e2e/react/cypress.config.ts | 5 + packages/e2e/react/cypress/.gitignore | 4 + .../react/cypress/e2e/shared/basic-io.cy.ts | 11 + .../e2e/shared/hash-preservation.cy.ts | 5 + .../react/cypress/e2e/shared/linking.cy.ts | 11 + .../e2e/react/cypress/e2e/shared/push.cy.ts | 11 + .../react/cypress/e2e/shared/routing.cy.ts | 13 + packages/e2e/react/cypress/support/e2e.ts | 1 + packages/e2e/react/package.json | 22 +- .../src/components/counter-button.test.tsx | 34 - .../react/src/components/counter-button.tsx | 9 - .../src/components/search-input.test.tsx | 38 - .../e2e/react/src/components/search-input.tsx | 15 - packages/e2e/react/src/layout.tsx | 38 + packages/e2e/react/src/main.tsx | 11 +- packages/e2e/react/src/routes.tsx | 26 + .../src/routes/basic-io.useQueryState.tsx | 3 + .../src/routes/basic-io.useQueryStates.tsx | 3 + .../react/src/routes/hash-preservation.tsx | 3 + .../routes/linking.useQueryState.other.tsx | 5 + .../src/routes/linking.useQueryState.tsx | 5 + .../routes/linking.useQueryStates.other.tsx | 5 + .../src/routes/linking.useQueryStates.tsx | 5 + .../react/src/routes/push.useQueryState.tsx | 3 + .../react/src/routes/push.useQueryStates.tsx | 3 + .../routes/routing.useQueryState.other.tsx | 5 + .../src/routes/routing.useQueryState.tsx | 5 + .../routes/routing.useQueryStates.other.tsx | 5 + .../src/routes/routing.useQueryStates.tsx | 5 + packages/e2e/react/tsconfig.app.json | 2 +- packages/e2e/react/tsconfig.json | 15 + packages/e2e/react/tsconfig.node.json | 2 +- packages/e2e/react/vite.config.ts | 12 +- packages/e2e/react/vitest.setup.ts | 8 - .../remix/app/components/counter-button.tsx | 9 - .../e2e/remix/app/components/search-input.tsx | 14 - packages/e2e/remix/app/layout.tsx | 41 + packages/e2e/remix/app/root.tsx | 26 +- packages/e2e/remix/app/routes/_index.tsx | 38 - .../app/routes/basic-io.useQueryState.tsx | 3 + .../app/routes/basic-io.useQueryStates.tsx | 3 + .../remix/app/routes/hash-preservation.tsx | 3 + .../routes/linking.useQueryState.other.tsx | 5 + .../app/routes/linking.useQueryState.tsx | 5 + .../routes/linking.useQueryStates.other.tsx | 5 + .../app/routes/linking.useQueryStates.tsx | 5 + .../remix/app/routes/push.useQueryState.tsx | 3 + .../remix/app/routes/push.useQueryStates.tsx | 3 + .../routes/routing.useQueryState.other.tsx | 5 + .../app/routes/routing.useQueryState.tsx | 5 + .../routes/routing.useQueryStates.other.tsx | 5 + .../app/routes/routing.useQueryStates.tsx | 5 + packages/e2e/remix/app/tailwind.css | 12 - packages/e2e/remix/cypress.config.ts | 5 + packages/e2e/remix/cypress/.gitignore | 4 + .../remix/cypress/e2e/shared/basic-io.cy.ts | 11 + .../e2e/shared/hash-preservation.cy.ts | 5 + .../remix/cypress/e2e/shared/linking.cy.ts | 11 + .../e2e/remix/cypress/e2e/shared/push.cy.ts | 11 + .../remix/cypress/e2e/shared/routing.cy.ts | 13 + packages/e2e/remix/cypress/support/e2e.ts | 1 + packages/e2e/remix/package.json | 31 +- packages/e2e/remix/postcss.config.js | 6 - packages/e2e/remix/public/logo-dark.png | Bin 80332 -> 0 bytes packages/e2e/remix/public/logo-light.png | Bin 5906 -> 0 bytes packages/e2e/remix/tailwind.config.ts | 22 - .../components/hydration-marker.tsx | 0 packages/e2e/shared/components/link.tsx | 33 + packages/e2e/shared/components/router.tsx | 36 + packages/e2e/shared/create-test.ts | 19 + packages/e2e/shared/cypress.config.ts | 22 + packages/e2e/shared/cypress/support/e2e.ts | 3 + packages/e2e/shared/package.json | 28 + packages/e2e/shared/specs/basic-io.cy.ts | 44 + packages/e2e/shared/specs/basic-io.tsx | 35 + .../e2e/shared/specs/hash-preservation.cy.ts | 15 + .../e2e/shared/specs/hash-preservation.tsx | 17 + packages/e2e/shared/specs/linking.cy.ts | 19 + packages/e2e/shared/specs/linking.tsx | 32 + packages/e2e/shared/specs/push.cy.ts | 17 + packages/e2e/shared/specs/push.tsx | 28 + packages/e2e/shared/specs/routing.cy.ts | 44 + packages/e2e/shared/specs/routing.defs.ts | 20 + packages/e2e/shared/specs/routing.tsx | 57 + packages/e2e/shared/tsconfig.json | 31 + pnpm-lock.yaml | 1972 ++--------------- pnpm-workspace.yaml | 3 + 198 files changed, 2072 insertions(+), 2249 deletions(-) delete mode 100644 packages/e2e/next/cypress/e2e/hash-preservation.cy.js create mode 100644 packages/e2e/next/cypress/e2e/shared/basic-io.cy.ts create mode 100644 packages/e2e/next/cypress/e2e/shared/hash-preservation.cy.ts create mode 100644 packages/e2e/next/cypress/e2e/shared/linking.cy.ts create mode 100644 packages/e2e/next/cypress/e2e/shared/push.cy.ts create mode 100644 packages/e2e/next/cypress/e2e/shared/routing.cy.ts create mode 100644 packages/e2e/next/src/app/app/(shared)/basic-io/useQueryState/page.tsx create mode 100644 packages/e2e/next/src/app/app/(shared)/basic-io/useQueryStates/page.tsx create mode 100644 packages/e2e/next/src/app/app/(shared)/hash-preservation/dynamic/[route]/page.tsx create mode 100644 packages/e2e/next/src/app/app/(shared)/hash-preservation/page.tsx create mode 100644 packages/e2e/next/src/app/app/(shared)/linking/useQueryState/other/page.tsx create mode 100644 packages/e2e/next/src/app/app/(shared)/linking/useQueryState/page.tsx create mode 100644 packages/e2e/next/src/app/app/(shared)/linking/useQueryStates/other/page.tsx create mode 100644 packages/e2e/next/src/app/app/(shared)/linking/useQueryStates/page.tsx create mode 100644 packages/e2e/next/src/app/app/(shared)/push/useQueryState/dynamic/[route]/page.tsx create mode 100644 packages/e2e/next/src/app/app/(shared)/push/useQueryState/page.tsx create mode 100644 packages/e2e/next/src/app/app/(shared)/push/useQueryStates/dynamic/[route]/page.tsx create mode 100644 packages/e2e/next/src/app/app/(shared)/push/useQueryStates/page.tsx create mode 100644 packages/e2e/next/src/app/app/(shared)/routing/useQueryState/other/page.tsx create mode 100644 packages/e2e/next/src/app/app/(shared)/routing/useQueryState/page.tsx create mode 100644 packages/e2e/next/src/app/app/(shared)/routing/useQueryStates/other/page.tsx create mode 100644 packages/e2e/next/src/app/app/(shared)/routing/useQueryStates/page.tsx create mode 100644 packages/e2e/next/src/app/providers.tsx create mode 100644 packages/e2e/next/src/pages/pages/basic-io/useQueryState.tsx create mode 100644 packages/e2e/next/src/pages/pages/basic-io/useQueryStates.tsx create mode 100644 packages/e2e/next/src/pages/pages/hash-preservation/dynamic/[route]/index.tsx create mode 100644 packages/e2e/next/src/pages/pages/hash-preservation/index.tsx create mode 100644 packages/e2e/next/src/pages/pages/linking/useQueryState/index.tsx create mode 100644 packages/e2e/next/src/pages/pages/linking/useQueryState/other.tsx create mode 100644 packages/e2e/next/src/pages/pages/linking/useQueryStates/index.tsx create mode 100644 packages/e2e/next/src/pages/pages/linking/useQueryStates/other.tsx create mode 100644 packages/e2e/next/src/pages/pages/push/useQueryState/dynamic/[route]/index.tsx create mode 100644 packages/e2e/next/src/pages/pages/push/useQueryState/index.tsx create mode 100644 packages/e2e/next/src/pages/pages/push/useQueryStates/dynamic/[route]/index.tsx create mode 100644 packages/e2e/next/src/pages/pages/push/useQueryStates/index.tsx create mode 100644 packages/e2e/next/src/pages/pages/routing/useQueryState/index.tsx create mode 100644 packages/e2e/next/src/pages/pages/routing/useQueryState/other.tsx create mode 100644 packages/e2e/next/src/pages/pages/routing/useQueryStates/index.tsx create mode 100644 packages/e2e/next/src/pages/pages/routing/useQueryStates/other.tsx create mode 100644 packages/e2e/react-router/v6/cypress.config.ts create mode 100644 packages/e2e/react-router/v6/cypress/.gitignore create mode 100644 packages/e2e/react-router/v6/cypress/e2e/shared/basic-io.cy.ts create mode 100644 packages/e2e/react-router/v6/cypress/e2e/shared/hash-preservation.cy.ts create mode 100644 packages/e2e/react-router/v6/cypress/e2e/shared/linking.cy.ts create mode 100644 packages/e2e/react-router/v6/cypress/e2e/shared/push.cy.ts create mode 100644 packages/e2e/react-router/v6/cypress/e2e/shared/routing.cy.ts create mode 100644 packages/e2e/react-router/v6/cypress/support/e2e.ts delete mode 100644 packages/e2e/react-router/v6/src/App.tsx delete mode 100644 packages/e2e/react-router/v6/src/components/counter-button.test.tsx delete mode 100644 packages/e2e/react-router/v6/src/components/counter-button.tsx delete mode 100644 packages/e2e/react-router/v6/src/components/search-input.test.tsx delete mode 100644 packages/e2e/react-router/v6/src/components/search-input.tsx create mode 100644 packages/e2e/react-router/v6/src/layout.tsx create mode 100644 packages/e2e/react-router/v6/src/routes/basic-io.useQueryState.tsx create mode 100644 packages/e2e/react-router/v6/src/routes/basic-io.useQueryStates.tsx create mode 100644 packages/e2e/react-router/v6/src/routes/hash-preservation.tsx create mode 100644 packages/e2e/react-router/v6/src/routes/linking.useQueryState.other.tsx create mode 100644 packages/e2e/react-router/v6/src/routes/linking.useQueryState.tsx create mode 100644 packages/e2e/react-router/v6/src/routes/linking.useQueryStates.other.tsx create mode 100644 packages/e2e/react-router/v6/src/routes/linking.useQueryStates.tsx create mode 100644 packages/e2e/react-router/v6/src/routes/push.useQueryState.tsx create mode 100644 packages/e2e/react-router/v6/src/routes/push.useQueryStates.tsx create mode 100644 packages/e2e/react-router/v6/src/routes/routing.useQueryState.other.tsx create mode 100644 packages/e2e/react-router/v6/src/routes/routing.useQueryState.tsx create mode 100644 packages/e2e/react-router/v6/src/routes/routing.useQueryStates.other.tsx create mode 100644 packages/e2e/react-router/v6/src/routes/routing.useQueryStates.tsx delete mode 100644 packages/e2e/react-router/v6/vitest.setup.ts create mode 100644 packages/e2e/react-router/v7/app/layout.tsx create mode 100644 packages/e2e/react-router/v7/app/routes/basic-io.useQueryState.tsx create mode 100644 packages/e2e/react-router/v7/app/routes/basic-io.useQueryStates.tsx create mode 100644 packages/e2e/react-router/v7/app/routes/hash-preservation.tsx delete mode 100644 packages/e2e/react-router/v7/app/routes/home.tsx create mode 100644 packages/e2e/react-router/v7/app/routes/linking.useQueryState.other.tsx create mode 100644 packages/e2e/react-router/v7/app/routes/linking.useQueryState.tsx create mode 100644 packages/e2e/react-router/v7/app/routes/linking.useQueryStates.other.tsx create mode 100644 packages/e2e/react-router/v7/app/routes/linking.useQueryStates.tsx create mode 100644 packages/e2e/react-router/v7/app/routes/push.useQueryState.tsx create mode 100644 packages/e2e/react-router/v7/app/routes/push.useQueryStates.tsx create mode 100644 packages/e2e/react-router/v7/app/routes/routing.useQueryState.other.tsx create mode 100644 packages/e2e/react-router/v7/app/routes/routing.useQueryState.tsx create mode 100644 packages/e2e/react-router/v7/app/routes/routing.useQueryStates.other.tsx create mode 100644 packages/e2e/react-router/v7/app/routes/routing.useQueryStates.tsx create mode 100644 packages/e2e/react-router/v7/cypress.config.ts create mode 100644 packages/e2e/react-router/v7/cypress/.gitignore create mode 100644 packages/e2e/react-router/v7/cypress/e2e/shared/basic-io.cy.ts create mode 100644 packages/e2e/react-router/v7/cypress/e2e/shared/hash-preservation.cy.ts create mode 100644 packages/e2e/react-router/v7/cypress/e2e/shared/linking.cy.ts create mode 100644 packages/e2e/react-router/v7/cypress/e2e/shared/push.cy.ts create mode 100644 packages/e2e/react-router/v7/cypress/e2e/shared/routing.cy.ts create mode 100644 packages/e2e/react-router/v7/cypress/support/e2e.ts create mode 100755 packages/e2e/react-router/v7/server.mjs create mode 100644 packages/e2e/react/cypress.config.ts create mode 100644 packages/e2e/react/cypress/.gitignore create mode 100644 packages/e2e/react/cypress/e2e/shared/basic-io.cy.ts create mode 100644 packages/e2e/react/cypress/e2e/shared/hash-preservation.cy.ts create mode 100644 packages/e2e/react/cypress/e2e/shared/linking.cy.ts create mode 100644 packages/e2e/react/cypress/e2e/shared/push.cy.ts create mode 100644 packages/e2e/react/cypress/e2e/shared/routing.cy.ts create mode 100644 packages/e2e/react/cypress/support/e2e.ts delete mode 100644 packages/e2e/react/src/components/counter-button.test.tsx delete mode 100644 packages/e2e/react/src/components/counter-button.tsx delete mode 100644 packages/e2e/react/src/components/search-input.test.tsx delete mode 100644 packages/e2e/react/src/components/search-input.tsx create mode 100644 packages/e2e/react/src/layout.tsx create mode 100644 packages/e2e/react/src/routes.tsx create mode 100644 packages/e2e/react/src/routes/basic-io.useQueryState.tsx create mode 100644 packages/e2e/react/src/routes/basic-io.useQueryStates.tsx create mode 100644 packages/e2e/react/src/routes/hash-preservation.tsx create mode 100644 packages/e2e/react/src/routes/linking.useQueryState.other.tsx create mode 100644 packages/e2e/react/src/routes/linking.useQueryState.tsx create mode 100644 packages/e2e/react/src/routes/linking.useQueryStates.other.tsx create mode 100644 packages/e2e/react/src/routes/linking.useQueryStates.tsx create mode 100644 packages/e2e/react/src/routes/push.useQueryState.tsx create mode 100644 packages/e2e/react/src/routes/push.useQueryStates.tsx create mode 100644 packages/e2e/react/src/routes/routing.useQueryState.other.tsx create mode 100644 packages/e2e/react/src/routes/routing.useQueryState.tsx create mode 100644 packages/e2e/react/src/routes/routing.useQueryStates.other.tsx create mode 100644 packages/e2e/react/src/routes/routing.useQueryStates.tsx delete mode 100644 packages/e2e/react/vitest.setup.ts delete mode 100644 packages/e2e/remix/app/components/counter-button.tsx delete mode 100644 packages/e2e/remix/app/components/search-input.tsx create mode 100644 packages/e2e/remix/app/layout.tsx delete mode 100644 packages/e2e/remix/app/routes/_index.tsx create mode 100644 packages/e2e/remix/app/routes/basic-io.useQueryState.tsx create mode 100644 packages/e2e/remix/app/routes/basic-io.useQueryStates.tsx create mode 100644 packages/e2e/remix/app/routes/hash-preservation.tsx create mode 100644 packages/e2e/remix/app/routes/linking.useQueryState.other.tsx create mode 100644 packages/e2e/remix/app/routes/linking.useQueryState.tsx create mode 100644 packages/e2e/remix/app/routes/linking.useQueryStates.other.tsx create mode 100644 packages/e2e/remix/app/routes/linking.useQueryStates.tsx create mode 100644 packages/e2e/remix/app/routes/push.useQueryState.tsx create mode 100644 packages/e2e/remix/app/routes/push.useQueryStates.tsx create mode 100644 packages/e2e/remix/app/routes/routing.useQueryState.other.tsx create mode 100644 packages/e2e/remix/app/routes/routing.useQueryState.tsx create mode 100644 packages/e2e/remix/app/routes/routing.useQueryStates.other.tsx create mode 100644 packages/e2e/remix/app/routes/routing.useQueryStates.tsx delete mode 100644 packages/e2e/remix/app/tailwind.css create mode 100644 packages/e2e/remix/cypress.config.ts create mode 100644 packages/e2e/remix/cypress/.gitignore create mode 100644 packages/e2e/remix/cypress/e2e/shared/basic-io.cy.ts create mode 100644 packages/e2e/remix/cypress/e2e/shared/hash-preservation.cy.ts create mode 100644 packages/e2e/remix/cypress/e2e/shared/linking.cy.ts create mode 100644 packages/e2e/remix/cypress/e2e/shared/push.cy.ts create mode 100644 packages/e2e/remix/cypress/e2e/shared/routing.cy.ts create mode 100644 packages/e2e/remix/cypress/support/e2e.ts delete mode 100644 packages/e2e/remix/postcss.config.js delete mode 100644 packages/e2e/remix/public/logo-dark.png delete mode 100644 packages/e2e/remix/public/logo-light.png delete mode 100644 packages/e2e/remix/tailwind.config.ts rename packages/e2e/{next/src => shared}/components/hydration-marker.tsx (100%) create mode 100644 packages/e2e/shared/components/link.tsx create mode 100644 packages/e2e/shared/components/router.tsx create mode 100644 packages/e2e/shared/create-test.ts create mode 100644 packages/e2e/shared/cypress.config.ts create mode 100644 packages/e2e/shared/cypress/support/e2e.ts create mode 100644 packages/e2e/shared/package.json create mode 100644 packages/e2e/shared/specs/basic-io.cy.ts create mode 100644 packages/e2e/shared/specs/basic-io.tsx create mode 100644 packages/e2e/shared/specs/hash-preservation.cy.ts create mode 100644 packages/e2e/shared/specs/hash-preservation.tsx create mode 100644 packages/e2e/shared/specs/linking.cy.ts create mode 100644 packages/e2e/shared/specs/linking.tsx create mode 100644 packages/e2e/shared/specs/push.cy.ts create mode 100644 packages/e2e/shared/specs/push.tsx create mode 100644 packages/e2e/shared/specs/routing.cy.ts create mode 100644 packages/e2e/shared/specs/routing.defs.ts create mode 100644 packages/e2e/shared/specs/routing.tsx create mode 100644 packages/e2e/shared/tsconfig.json diff --git a/packages/e2e/next/cypress.config.ts b/packages/e2e/next/cypress.config.ts index aa3d5724..1ebb2275 100644 --- a/packages/e2e/next/cypress.config.ts +++ b/packages/e2e/next/cypress.config.ts @@ -1,5 +1,4 @@ -import { defineConfig } from 'cypress' -import cypressTerminalReport from 'cypress-terminal-report/src/installLogsPrinter' +import { defineConfig } from 'e2e-shared/cypress.config' import fs from 'node:fs' import semver from 'semver' @@ -9,20 +8,11 @@ const basePath = const nextJsVersion = readNextJsVersion() export default defineConfig({ - e2e: { - baseUrl: `http://localhost:3001${basePath}`, - video: false, - fixturesFolder: false, - testIsolation: true, - setupNodeEvents(on) { - cypressTerminalReport(on) - }, - retries: 2, - env: { - basePath, - supportsShallowRouting: supportsShallowRouting(nextJsVersion), - nextJsVersion - } + baseUrl: `http://localhost:3001${basePath}`, + env: { + basePath, + supportsShallowRouting: supportsShallowRouting(nextJsVersion), + nextJsVersion } }) diff --git a/packages/e2e/next/cypress/e2e/hash-preservation.cy.js b/packages/e2e/next/cypress/e2e/hash-preservation.cy.js deleted file mode 100644 index 83ad4e0b..00000000 --- a/packages/e2e/next/cypress/e2e/hash-preservation.cy.js +++ /dev/null @@ -1,35 +0,0 @@ -/// - -function runTest() { - cy.contains('#hydration-marker', 'hydrated').should('be.hidden') - cy.get('#string_set_a').click() - cy.location('hash').should('eq', '#hash') - cy.get('#string_set_b').click() - cy.location('hash').should('eq', '#hash') - cy.get('#string_clear').click() - cy.location('hash').should('eq', '#hash') -} - -describe('hash preservation (app router)', () => { - it('works in standard routes', () => { - cy.visit('/app/useQueryState#hash') - runTest() - }) - - it('works in dynamic routes', () => { - cy.visit('/app/useQueryState/dynamic/route#hash') - runTest() - }) -}) - -describe('hash preservation (pages router)', () => { - it('works in standard routes', () => { - cy.visit('/pages/useQueryState#hash') - runTest() - }) - - it('works in dynamic routes', () => { - cy.visit('/pages/useQueryState/dynamic/route#hash') - runTest() - }) -}) diff --git a/packages/e2e/next/cypress/e2e/persist-across-navigation.cy.js b/packages/e2e/next/cypress/e2e/persist-across-navigation.cy.js index 57358ff7..978a8584 100644 --- a/packages/e2e/next/cypress/e2e/persist-across-navigation.cy.js +++ b/packages/e2e/next/cypress/e2e/persist-across-navigation.cy.js @@ -3,7 +3,7 @@ it('Persists search params across navigation using a generated Link href', () => { cy.visit('/app/persist-across-navigation/a') cy.contains('#hydration-marker', 'hydrated').should('be.hidden') - cy.get('input[type=text]').type('foo') + cy.get('input[type=text]').type('foo', { delay: 0 }) cy.get('input[type=checkbox]').check() cy.get('a').click() cy.location('pathname').should( diff --git a/packages/e2e/next/cypress/e2e/shared/basic-io.cy.ts b/packages/e2e/next/cypress/e2e/shared/basic-io.cy.ts new file mode 100644 index 00000000..b5d6de66 --- /dev/null +++ b/packages/e2e/next/cypress/e2e/shared/basic-io.cy.ts @@ -0,0 +1,25 @@ +import { testBasicIO } from 'e2e-shared/specs/basic-io.cy' + +testBasicIO({ + hook: 'useQueryState', + path: '/app/basic-io/useQueryState', + nextJsRouter: 'app' +}) + +testBasicIO({ + hook: 'useQueryStates', + path: '/app/basic-io/useQueryStates', + nextJsRouter: 'app' +}) + +testBasicIO({ + hook: 'useQueryState', + path: '/pages/basic-io/useQueryState', + nextJsRouter: 'pages' +}) + +testBasicIO({ + hook: 'useQueryStates', + path: '/pages/basic-io/useQueryStates', + nextJsRouter: 'pages' +}) diff --git a/packages/e2e/next/cypress/e2e/shared/hash-preservation.cy.ts b/packages/e2e/next/cypress/e2e/shared/hash-preservation.cy.ts new file mode 100644 index 00000000..e41a150d --- /dev/null +++ b/packages/e2e/next/cypress/e2e/shared/hash-preservation.cy.ts @@ -0,0 +1,25 @@ +import { testHashPreservation } from 'e2e-shared/specs/hash-preservation.cy' + +testHashPreservation({ + path: '/app/hash-preservation', + nextJsRouter: 'app', + description: 'standard route' +}) + +testHashPreservation({ + path: '/app/hash-preservation/dynamic/route', + nextJsRouter: 'app', + description: 'dynamic route' +}) + +testHashPreservation({ + path: '/pages/hash-preservation', + nextJsRouter: 'pages', + description: 'standard route' +}) + +testHashPreservation({ + path: '/pages/hash-preservation/dynamic/route', + nextJsRouter: 'pages', + description: 'dynamic route' +}) diff --git a/packages/e2e/next/cypress/e2e/shared/linking.cy.ts b/packages/e2e/next/cypress/e2e/shared/linking.cy.ts new file mode 100644 index 00000000..371769df --- /dev/null +++ b/packages/e2e/next/cypress/e2e/shared/linking.cy.ts @@ -0,0 +1,25 @@ +import { testLinking } from 'e2e-shared/specs/linking.cy' + +testLinking({ + hook: 'useQueryState', + path: '/app/linking/useQueryState', + nextJsRouter: 'app' +}) + +testLinking({ + hook: 'useQueryStates', + path: '/app/linking/useQueryStates', + nextJsRouter: 'app' +}) + +testLinking({ + hook: 'useQueryState', + path: '/pages/linking/useQueryState', + nextJsRouter: 'pages' +}) + +testLinking({ + hook: 'useQueryStates', + path: '/pages/linking/useQueryStates', + nextJsRouter: 'pages' +}) diff --git a/packages/e2e/next/cypress/e2e/shared/push.cy.ts b/packages/e2e/next/cypress/e2e/shared/push.cy.ts new file mode 100644 index 00000000..24d64ff3 --- /dev/null +++ b/packages/e2e/next/cypress/e2e/shared/push.cy.ts @@ -0,0 +1,59 @@ +import { testPush } from 'e2e-shared/specs/push.cy' + +testPush({ + path: '/app/push/useQueryState', + hook: 'useQueryState', + nextJsRouter: 'app', + description: 'standard route' +}) + +testPush({ + path: '/app/push/useQueryStates', + hook: 'useQueryStates', + nextJsRouter: 'app', + description: 'standard route' +}) + +testPush({ + path: '/pages/push/useQueryState', + hook: 'useQueryState', + nextJsRouter: 'pages', + description: 'standard route' +}) + +testPush({ + path: '/pages/push/useQueryStates', + hook: 'useQueryStates', + nextJsRouter: 'pages', + description: 'standard route' +}) + +// -- + +testPush({ + path: '/app/push/useQueryState/dynamic/route', + hook: 'useQueryState', + nextJsRouter: 'app', + description: 'dynamic route' +}) + +testPush({ + path: '/app/push/useQueryStates/dynamic/route', + hook: 'useQueryStates', + nextJsRouter: 'app', + description: 'dynamic route' +}) + +testPush({ + path: '/pages/push/useQueryState/dynamic/route', + hook: 'useQueryState', + nextJsRouter: 'pages', + description: 'dynamic route' +}) + +testPush({ + path: '/pages/push/useQueryStates/dynamic/route', + hook: 'useQueryStates', + nextJsRouter: 'pages', + description: 'dynamic route' +}) diff --git a/packages/e2e/next/cypress/e2e/shared/routing.cy.ts b/packages/e2e/next/cypress/e2e/shared/routing.cy.ts new file mode 100644 index 00000000..56f172ee --- /dev/null +++ b/packages/e2e/next/cypress/e2e/shared/routing.cy.ts @@ -0,0 +1,25 @@ +import { testRouting } from 'e2e-shared/specs/routing.cy' + +testRouting({ + path: '/app/routing/useQueryState', + hook: 'useQueryState', + nextJsRouter: 'app' +}) + +testRouting({ + path: '/app/routing/useQueryStates', + hook: 'useQueryStates', + nextJsRouter: 'app' +}) + +testRouting({ + path: '/pages/routing/useQueryState', + hook: 'useQueryState', + nextJsRouter: 'pages' +}) + +testRouting({ + path: '/pages/routing/useQueryStates', + hook: 'useQueryStates', + nextJsRouter: 'pages' +}) diff --git a/packages/e2e/next/cypress/support/e2e.ts b/packages/e2e/next/cypress/support/e2e.ts index aacfac29..d2091875 100644 --- a/packages/e2e/next/cypress/support/e2e.ts +++ b/packages/e2e/next/cypress/support/e2e.ts @@ -1,3 +1 @@ -import setup from 'cypress-terminal-report/src/installLogsCollector' - -setup() +import 'e2e-shared/cypress/support/e2e' diff --git a/packages/e2e/next/next.config.mjs b/packages/e2e/next/next.config.mjs index fb55ff9b..12c1674c 100644 --- a/packages/e2e/next/next.config.mjs +++ b/packages/e2e/next/next.config.mjs @@ -10,6 +10,7 @@ const config = { ...(process.env.REACT_COMPILER === 'true' ? { reactCompiler: true } : {}), serverSourceMaps: true }, + transpilePackages: ['e2e-shared'], rewrites: async () => [ { source: '/app/rewrites/source', diff --git a/packages/e2e/next/package.json b/packages/e2e/next/package.json index 7eec20f5..95d77a63 100644 --- a/packages/e2e/next/package.json +++ b/packages/e2e/next/package.json @@ -34,8 +34,9 @@ "babel-plugin-react-compiler": "19.0.0-beta-a7bf2bd-20241110", "cypress": "^13.15.2", "cypress-terminal-report": "^7.0.4", - "semver": "^7.6.3", + "e2e-shared": "workspace:*", "start-server-and-test": "^2.0.8", + "semver": "^7.6.3", "typescript": "^5.6.3" } } diff --git a/packages/e2e/next/src/app/app/(shared)/basic-io/useQueryState/page.tsx b/packages/e2e/next/src/app/app/(shared)/basic-io/useQueryState/page.tsx new file mode 100644 index 00000000..b0e7003c --- /dev/null +++ b/packages/e2e/next/src/app/app/(shared)/basic-io/useQueryState/page.tsx @@ -0,0 +1,10 @@ +import { UseQueryStateBasicIO } from 'e2e-shared/specs/basic-io' +import { Suspense } from 'react' + +export default function Page() { + return ( + + + + ) +} diff --git a/packages/e2e/next/src/app/app/(shared)/basic-io/useQueryStates/page.tsx b/packages/e2e/next/src/app/app/(shared)/basic-io/useQueryStates/page.tsx new file mode 100644 index 00000000..f82eedfd --- /dev/null +++ b/packages/e2e/next/src/app/app/(shared)/basic-io/useQueryStates/page.tsx @@ -0,0 +1,10 @@ +import { UseQueryStatesBasicIO } from 'e2e-shared/specs/basic-io' +import { Suspense } from 'react' + +export default function Page() { + return ( + + + + ) +} diff --git a/packages/e2e/next/src/app/app/(shared)/hash-preservation/dynamic/[route]/page.tsx b/packages/e2e/next/src/app/app/(shared)/hash-preservation/dynamic/[route]/page.tsx new file mode 100644 index 00000000..c8c93fa3 --- /dev/null +++ b/packages/e2e/next/src/app/app/(shared)/hash-preservation/dynamic/[route]/page.tsx @@ -0,0 +1,10 @@ +import { HashPreservation } from 'e2e-shared/specs/hash-preservation' +import { Suspense } from 'react' + +export default function Page() { + return ( + + + + ) +} diff --git a/packages/e2e/next/src/app/app/(shared)/hash-preservation/page.tsx b/packages/e2e/next/src/app/app/(shared)/hash-preservation/page.tsx new file mode 100644 index 00000000..c8c93fa3 --- /dev/null +++ b/packages/e2e/next/src/app/app/(shared)/hash-preservation/page.tsx @@ -0,0 +1,10 @@ +import { HashPreservation } from 'e2e-shared/specs/hash-preservation' +import { Suspense } from 'react' + +export default function Page() { + return ( + + + + ) +} diff --git a/packages/e2e/next/src/app/app/(shared)/linking/useQueryState/other/page.tsx b/packages/e2e/next/src/app/app/(shared)/linking/useQueryState/other/page.tsx new file mode 100644 index 00000000..c8651b15 --- /dev/null +++ b/packages/e2e/next/src/app/app/(shared)/linking/useQueryState/other/page.tsx @@ -0,0 +1,10 @@ +import { LinkingUseQueryState } from 'e2e-shared/specs/linking' +import { Suspense } from 'react' + +export default function Page() { + return ( + + + + ) +} diff --git a/packages/e2e/next/src/app/app/(shared)/linking/useQueryState/page.tsx b/packages/e2e/next/src/app/app/(shared)/linking/useQueryState/page.tsx new file mode 100644 index 00000000..c8651b15 --- /dev/null +++ b/packages/e2e/next/src/app/app/(shared)/linking/useQueryState/page.tsx @@ -0,0 +1,10 @@ +import { LinkingUseQueryState } from 'e2e-shared/specs/linking' +import { Suspense } from 'react' + +export default function Page() { + return ( + + + + ) +} diff --git a/packages/e2e/next/src/app/app/(shared)/linking/useQueryStates/other/page.tsx b/packages/e2e/next/src/app/app/(shared)/linking/useQueryStates/other/page.tsx new file mode 100644 index 00000000..1fbae359 --- /dev/null +++ b/packages/e2e/next/src/app/app/(shared)/linking/useQueryStates/other/page.tsx @@ -0,0 +1,10 @@ +import { LinkingUseQueryStates } from 'e2e-shared/specs/linking' +import { Suspense } from 'react' + +export default function Page() { + return ( + + + + ) +} diff --git a/packages/e2e/next/src/app/app/(shared)/linking/useQueryStates/page.tsx b/packages/e2e/next/src/app/app/(shared)/linking/useQueryStates/page.tsx new file mode 100644 index 00000000..1fbae359 --- /dev/null +++ b/packages/e2e/next/src/app/app/(shared)/linking/useQueryStates/page.tsx @@ -0,0 +1,10 @@ +import { LinkingUseQueryStates } from 'e2e-shared/specs/linking' +import { Suspense } from 'react' + +export default function Page() { + return ( + + + + ) +} diff --git a/packages/e2e/next/src/app/app/(shared)/push/useQueryState/dynamic/[route]/page.tsx b/packages/e2e/next/src/app/app/(shared)/push/useQueryState/dynamic/[route]/page.tsx new file mode 100644 index 00000000..2cc0db3f --- /dev/null +++ b/packages/e2e/next/src/app/app/(shared)/push/useQueryState/dynamic/[route]/page.tsx @@ -0,0 +1,10 @@ +import { PushUseQueryState } from 'e2e-shared/specs/push' +import { Suspense } from 'react' + +export default function Page() { + return ( + + + + ) +} diff --git a/packages/e2e/next/src/app/app/(shared)/push/useQueryState/page.tsx b/packages/e2e/next/src/app/app/(shared)/push/useQueryState/page.tsx new file mode 100644 index 00000000..2cc0db3f --- /dev/null +++ b/packages/e2e/next/src/app/app/(shared)/push/useQueryState/page.tsx @@ -0,0 +1,10 @@ +import { PushUseQueryState } from 'e2e-shared/specs/push' +import { Suspense } from 'react' + +export default function Page() { + return ( + + + + ) +} diff --git a/packages/e2e/next/src/app/app/(shared)/push/useQueryStates/dynamic/[route]/page.tsx b/packages/e2e/next/src/app/app/(shared)/push/useQueryStates/dynamic/[route]/page.tsx new file mode 100644 index 00000000..52fcf3e0 --- /dev/null +++ b/packages/e2e/next/src/app/app/(shared)/push/useQueryStates/dynamic/[route]/page.tsx @@ -0,0 +1,10 @@ +import { PushUseQueryStates } from 'e2e-shared/specs/push' +import { Suspense } from 'react' + +export default function Page() { + return ( + + + + ) +} diff --git a/packages/e2e/next/src/app/app/(shared)/push/useQueryStates/page.tsx b/packages/e2e/next/src/app/app/(shared)/push/useQueryStates/page.tsx new file mode 100644 index 00000000..52fcf3e0 --- /dev/null +++ b/packages/e2e/next/src/app/app/(shared)/push/useQueryStates/page.tsx @@ -0,0 +1,10 @@ +import { PushUseQueryStates } from 'e2e-shared/specs/push' +import { Suspense } from 'react' + +export default function Page() { + return ( + + + + ) +} diff --git a/packages/e2e/next/src/app/app/(shared)/routing/useQueryState/other/page.tsx b/packages/e2e/next/src/app/app/(shared)/routing/useQueryState/other/page.tsx new file mode 100644 index 00000000..ad227737 --- /dev/null +++ b/packages/e2e/next/src/app/app/(shared)/routing/useQueryState/other/page.tsx @@ -0,0 +1,10 @@ +import { RoutingUseQueryState } from 'e2e-shared/specs/routing' +import { Suspense } from 'react' + +export default function Page() { + return ( + + + + ) +} diff --git a/packages/e2e/next/src/app/app/(shared)/routing/useQueryState/page.tsx b/packages/e2e/next/src/app/app/(shared)/routing/useQueryState/page.tsx new file mode 100644 index 00000000..ad227737 --- /dev/null +++ b/packages/e2e/next/src/app/app/(shared)/routing/useQueryState/page.tsx @@ -0,0 +1,10 @@ +import { RoutingUseQueryState } from 'e2e-shared/specs/routing' +import { Suspense } from 'react' + +export default function Page() { + return ( + + + + ) +} diff --git a/packages/e2e/next/src/app/app/(shared)/routing/useQueryStates/other/page.tsx b/packages/e2e/next/src/app/app/(shared)/routing/useQueryStates/other/page.tsx new file mode 100644 index 00000000..37366c60 --- /dev/null +++ b/packages/e2e/next/src/app/app/(shared)/routing/useQueryStates/other/page.tsx @@ -0,0 +1,10 @@ +import { RoutingUseQueryStates } from 'e2e-shared/specs/routing' +import { Suspense } from 'react' + +export default function Page() { + return ( + + + + ) +} diff --git a/packages/e2e/next/src/app/app/(shared)/routing/useQueryStates/page.tsx b/packages/e2e/next/src/app/app/(shared)/routing/useQueryStates/page.tsx new file mode 100644 index 00000000..37366c60 --- /dev/null +++ b/packages/e2e/next/src/app/app/(shared)/routing/useQueryStates/page.tsx @@ -0,0 +1,10 @@ +import { RoutingUseQueryStates } from 'e2e-shared/specs/routing' +import { Suspense } from 'react' + +export default function Page() { + return ( + + + + ) +} diff --git a/packages/e2e/next/src/app/app/transitions/client.tsx b/packages/e2e/next/src/app/app/transitions/client.tsx index 817bc136..e1523bf4 100644 --- a/packages/e2e/next/src/app/app/transitions/client.tsx +++ b/packages/e2e/next/src/app/app/transitions/client.tsx @@ -2,7 +2,6 @@ import { parseAsInteger, useQueryState } from 'nuqs' import { useTransition } from 'react' -import { HydrationMarker } from '../../../components/hydration-marker' export function Client() { const [isLoading, startTransition] = useTransition() @@ -15,7 +14,6 @@ export function Client() { ) return ( <> -

{isLoading ? 'loading' : 'idle'}

diff --git a/packages/e2e/next/src/app/layout.tsx b/packages/e2e/next/src/app/layout.tsx index 28b8c9ce..07def6bb 100644 --- a/packages/e2e/next/src/app/layout.tsx +++ b/packages/e2e/next/src/app/layout.tsx @@ -1,6 +1,7 @@ +import { HydrationMarker } from 'e2e-shared/components/hydration-marker' import { NuqsAdapter } from 'nuqs/adapters/next/app' import React, { Suspense } from 'react' -import { HydrationMarker } from '../components/hydration-marker' +import { Providers } from './providers' export const metadata = { title: 'nuqs e2e test bench' @@ -17,7 +18,9 @@ export default function RootLayout({ - {children} + + {children} + ) diff --git a/packages/e2e/next/src/app/providers.tsx b/packages/e2e/next/src/app/providers.tsx new file mode 100644 index 00000000..2300ea54 --- /dev/null +++ b/packages/e2e/next/src/app/providers.tsx @@ -0,0 +1,35 @@ +'use client' + +import { LinkProvider } from 'e2e-shared/components/link' +import { type Router, RouterProvider } from 'e2e-shared/components/router' +import Link from 'next/link' +import { useRouter as useNextRouter } from 'next/navigation' +import { type ReactNode } from 'react' + +export function Providers({ children }: { children: ReactNode }) { + return ( + + {children} + + ) +} + +function useRouter(): Router { + const router = useNextRouter() + return { + replace(url, { shallow }) { + if (shallow) { + history.replaceState(null, '', url) + } else { + router.replace(url) + } + }, + push(url, { shallow }) { + if (shallow) { + history.pushState(null, '', url) + } else { + router.push(url) + } + } + } +} diff --git a/packages/e2e/next/src/pages/_app.tsx b/packages/e2e/next/src/pages/_app.tsx index aede82f0..8fedd5bc 100644 --- a/packages/e2e/next/src/pages/_app.tsx +++ b/packages/e2e/next/src/pages/_app.tsx @@ -1,10 +1,34 @@ +import { HydrationMarker } from 'e2e-shared/components/hydration-marker' +import { LinkProvider } from 'e2e-shared/components/link' +import { type Router, RouterProvider } from 'e2e-shared/components/router' import type { AppProps } from 'next/app' +import Link from 'next/link' +import { useRouter as useNextRouter } from 'next/router' import { NuqsAdapter } from 'nuqs/adapters/next/pages' export default function MyApp({ Component, pageProps }: AppProps) { return ( - - - + <> + + + + + + + + + ) } + +function useRouter(): Router { + const router = useNextRouter() + return { + replace(url, options) { + router.replace(url, url, { shallow: options.shallow }) + }, + push(url, options) { + router.push(url, url, { shallow: options.shallow }) + } + } +} diff --git a/packages/e2e/next/src/pages/pages/basic-io/useQueryState.tsx b/packages/e2e/next/src/pages/pages/basic-io/useQueryState.tsx new file mode 100644 index 00000000..91450e8e --- /dev/null +++ b/packages/e2e/next/src/pages/pages/basic-io/useQueryState.tsx @@ -0,0 +1,3 @@ +import { UseQueryStateBasicIO } from 'e2e-shared/specs/basic-io' + +export default UseQueryStateBasicIO diff --git a/packages/e2e/next/src/pages/pages/basic-io/useQueryStates.tsx b/packages/e2e/next/src/pages/pages/basic-io/useQueryStates.tsx new file mode 100644 index 00000000..9972fbd5 --- /dev/null +++ b/packages/e2e/next/src/pages/pages/basic-io/useQueryStates.tsx @@ -0,0 +1,3 @@ +import { UseQueryStatesBasicIO } from 'e2e-shared/specs/basic-io' + +export default UseQueryStatesBasicIO diff --git a/packages/e2e/next/src/pages/pages/hash-preservation/dynamic/[route]/index.tsx b/packages/e2e/next/src/pages/pages/hash-preservation/dynamic/[route]/index.tsx new file mode 100644 index 00000000..326682f3 --- /dev/null +++ b/packages/e2e/next/src/pages/pages/hash-preservation/dynamic/[route]/index.tsx @@ -0,0 +1,3 @@ +import { HashPreservation } from 'e2e-shared/specs/hash-preservation' + +export default HashPreservation diff --git a/packages/e2e/next/src/pages/pages/hash-preservation/index.tsx b/packages/e2e/next/src/pages/pages/hash-preservation/index.tsx new file mode 100644 index 00000000..326682f3 --- /dev/null +++ b/packages/e2e/next/src/pages/pages/hash-preservation/index.tsx @@ -0,0 +1,3 @@ +import { HashPreservation } from 'e2e-shared/specs/hash-preservation' + +export default HashPreservation diff --git a/packages/e2e/next/src/pages/pages/linking/useQueryState/index.tsx b/packages/e2e/next/src/pages/pages/linking/useQueryState/index.tsx new file mode 100644 index 00000000..1c63de5f --- /dev/null +++ b/packages/e2e/next/src/pages/pages/linking/useQueryState/index.tsx @@ -0,0 +1,5 @@ +import { LinkingUseQueryState } from 'e2e-shared/specs/linking' + +export default function Page() { + return +} diff --git a/packages/e2e/next/src/pages/pages/linking/useQueryState/other.tsx b/packages/e2e/next/src/pages/pages/linking/useQueryState/other.tsx new file mode 100644 index 00000000..1c63de5f --- /dev/null +++ b/packages/e2e/next/src/pages/pages/linking/useQueryState/other.tsx @@ -0,0 +1,5 @@ +import { LinkingUseQueryState } from 'e2e-shared/specs/linking' + +export default function Page() { + return +} diff --git a/packages/e2e/next/src/pages/pages/linking/useQueryStates/index.tsx b/packages/e2e/next/src/pages/pages/linking/useQueryStates/index.tsx new file mode 100644 index 00000000..5acbdd8a --- /dev/null +++ b/packages/e2e/next/src/pages/pages/linking/useQueryStates/index.tsx @@ -0,0 +1,5 @@ +import { LinkingUseQueryStates } from 'e2e-shared/specs/linking' + +export default function Page() { + return +} diff --git a/packages/e2e/next/src/pages/pages/linking/useQueryStates/other.tsx b/packages/e2e/next/src/pages/pages/linking/useQueryStates/other.tsx new file mode 100644 index 00000000..5acbdd8a --- /dev/null +++ b/packages/e2e/next/src/pages/pages/linking/useQueryStates/other.tsx @@ -0,0 +1,5 @@ +import { LinkingUseQueryStates } from 'e2e-shared/specs/linking' + +export default function Page() { + return +} diff --git a/packages/e2e/next/src/pages/pages/push/useQueryState/dynamic/[route]/index.tsx b/packages/e2e/next/src/pages/pages/push/useQueryState/dynamic/[route]/index.tsx new file mode 100644 index 00000000..35f47ce6 --- /dev/null +++ b/packages/e2e/next/src/pages/pages/push/useQueryState/dynamic/[route]/index.tsx @@ -0,0 +1,3 @@ +import { PushUseQueryState } from 'e2e-shared/specs/push' + +export default PushUseQueryState diff --git a/packages/e2e/next/src/pages/pages/push/useQueryState/index.tsx b/packages/e2e/next/src/pages/pages/push/useQueryState/index.tsx new file mode 100644 index 00000000..35f47ce6 --- /dev/null +++ b/packages/e2e/next/src/pages/pages/push/useQueryState/index.tsx @@ -0,0 +1,3 @@ +import { PushUseQueryState } from 'e2e-shared/specs/push' + +export default PushUseQueryState diff --git a/packages/e2e/next/src/pages/pages/push/useQueryStates/dynamic/[route]/index.tsx b/packages/e2e/next/src/pages/pages/push/useQueryStates/dynamic/[route]/index.tsx new file mode 100644 index 00000000..1a6ed585 --- /dev/null +++ b/packages/e2e/next/src/pages/pages/push/useQueryStates/dynamic/[route]/index.tsx @@ -0,0 +1,3 @@ +import { PushUseQueryStates } from 'e2e-shared/specs/push' + +export default PushUseQueryStates diff --git a/packages/e2e/next/src/pages/pages/push/useQueryStates/index.tsx b/packages/e2e/next/src/pages/pages/push/useQueryStates/index.tsx new file mode 100644 index 00000000..1a6ed585 --- /dev/null +++ b/packages/e2e/next/src/pages/pages/push/useQueryStates/index.tsx @@ -0,0 +1,3 @@ +import { PushUseQueryStates } from 'e2e-shared/specs/push' + +export default PushUseQueryStates diff --git a/packages/e2e/next/src/pages/pages/routing/useQueryState/index.tsx b/packages/e2e/next/src/pages/pages/routing/useQueryState/index.tsx new file mode 100644 index 00000000..576a32db --- /dev/null +++ b/packages/e2e/next/src/pages/pages/routing/useQueryState/index.tsx @@ -0,0 +1,5 @@ +import { RoutingUseQueryState } from 'e2e-shared/specs/routing' + +export default function Page() { + return +} diff --git a/packages/e2e/next/src/pages/pages/routing/useQueryState/other.tsx b/packages/e2e/next/src/pages/pages/routing/useQueryState/other.tsx new file mode 100644 index 00000000..576a32db --- /dev/null +++ b/packages/e2e/next/src/pages/pages/routing/useQueryState/other.tsx @@ -0,0 +1,5 @@ +import { RoutingUseQueryState } from 'e2e-shared/specs/routing' + +export default function Page() { + return +} diff --git a/packages/e2e/next/src/pages/pages/routing/useQueryStates/index.tsx b/packages/e2e/next/src/pages/pages/routing/useQueryStates/index.tsx new file mode 100644 index 00000000..0a544cce --- /dev/null +++ b/packages/e2e/next/src/pages/pages/routing/useQueryStates/index.tsx @@ -0,0 +1,5 @@ +import { RoutingUseQueryStates } from 'e2e-shared/specs/routing' + +export default function Page() { + return +} diff --git a/packages/e2e/next/src/pages/pages/routing/useQueryStates/other.tsx b/packages/e2e/next/src/pages/pages/routing/useQueryStates/other.tsx new file mode 100644 index 00000000..0a544cce --- /dev/null +++ b/packages/e2e/next/src/pages/pages/routing/useQueryStates/other.tsx @@ -0,0 +1,5 @@ +import { RoutingUseQueryStates } from 'e2e-shared/specs/routing' + +export default function Page() { + return +} diff --git a/packages/e2e/next/src/pages/pages/useQueryState/index.tsx b/packages/e2e/next/src/pages/pages/useQueryState/index.tsx index ecb17f99..a487a7c0 100644 --- a/packages/e2e/next/src/pages/pages/useQueryState/index.tsx +++ b/packages/e2e/next/src/pages/pages/useQueryState/index.tsx @@ -8,7 +8,6 @@ import { parseAsString, useQueryState } from 'nuqs' -import { HydrationMarker } from '../../../components/hydration-marker' export const getServerSideProps = (async ctx => { const string = parseAsString.parseServerSide(ctx.query.string) @@ -34,7 +33,6 @@ const IntegrationPage = () => { const pathname = usePathname() return (
-

useQueryState