-
Notifications
You must be signed in to change notification settings - Fork 13.4k
feat(vue-router): upgrade to vue-router 5 #31117
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
Changes from all commits
7283821
f32b10f
474100b
573370f
cae877b
c5113e9
e1dd044
3f69ec4
9f89730
9dc915a
f898584
2d0023d
da9ff7e
77fba9e
7146da9
a545727
7b6630f
d96827b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,34 @@ The React test app supports syncing your locally built changes for validation. | |
|
|
||
| From here you can either build the application or start a local dev server. When re-syncing changes, you will need to wipe the build cache in `node_modules/.cache` and restart the dev server/re-build. | ||
|
|
||
| ## Running the Test Suites | ||
|
|
||
| `packages/react-router/scripts/test_runner.sh` orchestrates the React Router test suites end to end: it builds `@ionic/core`, `@ionic/react`, and `@ionic/react-router`, builds the test app, syncs local packages, starts the dev server, and runs Cypress and Playwright in sequence. By default it uses the `reactrouter6-react18` app; pass `--app reactrouter6-react19` to test against the latest supported React version. | ||
|
|
||
| ```shell | ||
| # Full run (build + Cypress + Playwright) | ||
| sh packages/react-router/scripts/test_runner.sh | ||
|
|
||
| # Reuse the existing build/<app> directory and run only Playwright | ||
| sh packages/react-router/scripts/test_runner.sh --skip-build --playwright-only | ||
|
|
||
| # Filter Playwright to a single spec | ||
| sh packages/react-router/scripts/test_runner.sh --playwright-only --spec swipe | ||
|
|
||
| # Build/sync and serve the app for manual testing (no specs run) | ||
| sh packages/react-router/scripts/test_runner.sh --serve | ||
| ``` | ||
|
|
||
| Useful flags: | ||
|
|
||
| | Flag | Effect | | ||
| |------|--------| | ||
| | `--skip-build` | Reuse existing `packages/react-router/test/build/<app>/` instead of rebuilding | | ||
| | `--playwright-only` | Run only the Playwright e2e suite | | ||
| | `--spec <pattern>` | Filter Playwright specs by file path | | ||
| | `--app <name>` | Pick a different app variant from `packages/react-router/test/apps/` (default: `reactrouter6-react18`; use `reactrouter6-react19` for the latest supported React version) | | ||
| | `--serve` | Start the dev server only and open the browser | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's mention that it will run the latest version.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| ## Test App Build Structure | ||
|
|
||
| Unlike other test applications, these test apps are broken up into multiple directories. These directories are then combined to create a single application. This allows us to share common application code, tests, etc so that each app is being tested the same way. Below details the different pieces that help create a single test application. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,37 @@ The Vue test app supports syncing your locally built changes for validation. | |
|
|
||
| From here you can either build the application or start a local dev server. When re-syncing changes, you will need to wipe the build cache in `node_modules/.cache` and restart the dev server/re-build. | ||
|
|
||
| ## Running the Test Suites | ||
|
|
||
| `packages/vue-router/scripts/test_runner.sh` orchestrates the Vue + Vue Router test suites end to end: it builds `@ionic/core`, `@ionic/vue`, and `@ionic/vue-router`, builds the test app, syncs local packages, runs Vitest unit tests in jsdom, then starts the Vite dev server and runs Cypress and Playwright e2e suites against it. By default it uses the `vue3` app, which targets the latest supported Vue version. | ||
|
|
||
| ```shell | ||
| # Full run (build + Vitest + Cypress + Playwright) | ||
| sh packages/vue-router/scripts/test_runner.sh | ||
|
|
||
| # Reuse the existing build/<app> directory and run only Playwright | ||
| sh packages/vue-router/scripts/test_runner.sh --skip-build --playwright-only | ||
|
|
||
| # Filter Cypress to a single spec | ||
| sh packages/vue-router/scripts/test_runner.sh --cypress-only --spec routing | ||
|
|
||
| # Build/sync and serve the app for manual testing (no specs run) | ||
| sh packages/vue-router/scripts/test_runner.sh --serve | ||
| ``` | ||
|
|
||
| Useful flags: | ||
|
|
||
| | Flag | Effect | | ||
| |------|--------| | ||
| | `--skip-build` | Reuse existing `packages/vue/test/build/<app>/` instead of rebuilding | | ||
| | `--vitest-only` | Run only the Vitest unit suite | | ||
| | `--cypress-only` | Run only the Cypress e2e suite | | ||
| | `--playwright-only` | Run only the Playwright e2e suite | | ||
| | `--spec <pattern>` | Filter Cypress specs by file path | | ||
| | `--pw-spec <pattern>` | Filter Playwright specs by file path | | ||
| | `--app <name>` | Pick a different app variant from `packages/vue/test/apps/` (default: `vue3`, the latest supported Vue version) | | ||
| | `--serve` | Start the dev server only and open the browser | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's mention that it will run the latest version.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| ## Test App Build Structure | ||
|
|
||
| > [!NOTE] | ||
|
|
||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.