Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions packages/e2e-cypress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,21 @@ You can either apply [this workaround](https://github.com/istanbuljs/nyc/issues/

[nyc-config-preset]: https://github.com/quasarframework/quasar-testing/blob/dev/packages/e2e-cypress/nyc-config-preset.json

### Upgrade from Cypress AE v6.2 to v6.3 onwards

> If you're coming from v6.1, follow the migration guide in the next section first.

Here's all the steps you need to take while upgrading from v6.2 to v6.3:

- If you're using `@quasar/app-vite` v2.4 onwards, you need to upgrade Cypress to v15, as described in the following bullet point. Cypress v14 and below aren't compatible with Vite 7, which is used by `@quasar/app-vite` v2.4 onwards.
- (**optional, unless you're using `@quasar/app-vite` v2.4 onwards**) Upgrade Cypress to v15 and check out its [migration guide](https://docs.cypress.io/app/references/migration-guide#Migrating-to-Cypress-150). Notice that **Cypress v15 currently doesn't work out of the box due to [this issue](https://github.com/quasarframework/quasar-testing/issues/403)**. Until Vite, TSX or Cypress maintainers manage to fix the issue, there's a [know workaround](https://github.com/cypress-io/cypress/issues/32362#issuecomment-3248361965) that you can apply in your project.
- (**optional, unless you're using Cypress v15 onwards**) If you upgrade Cypress to v15, you should also upgrade `@quasar/app-vite` to v2. `@quasar/app-vite` v1 uses Vite 3 and Cypress v15 requires at least Vite 5.
- (**optional**) Migrate your project to use ESLint v9 and `eslint-plugin-cypress` v5, as the next major version of Cypress AE won't support ESLint v8 anymore. You'll also need to update your ESLint config, so check the new installation instruction for ESLint v9 at the top of this page.

In v6.3 we removed both test project for `@quasar/app-vite` v1, testing respectively Vite 4 and Vite 5 setups, and the test project for `@quasar/app-webpack` v3.
Cypress v15 support made them incompatible with our pre-release automated test system.
Tests for those setups are still available in a [dedicated branch](https://github.com/quasarframework/quasar-testing/tree/cypress-v14).

### Upgrade from Cypress AE v6.1 to v6.2 onwards

> If you're coming from v5.1, follow the migration guide in the next section first.
Expand Down
14 changes: 7 additions & 7 deletions packages/e2e-cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@
"yarn": ">= 1.17.3"
},
"dependencies": {
"@cypress/code-coverage": "^3.12.26",
"@cypress/code-coverage": "^3.14.6",
"cross-env": "^7.0.3",
"lodash": "^4.17.21",
"nyc": "^15.1.0",
"start-server-and-test": "^2.0.3",
"vite-plugin-istanbul": "^7.0.0"
"nyc": "^17.1.0",
"start-server-and-test": "^2.1.2",
"vite-plugin-istanbul": "^7.2.0"
},
"devDependencies": {
"@types/lodash": "^4.14.202",
"cypress": "^14.2.1",
"@types/lodash": "^4.17.20",
"cypress": "^15.3.0",
"eslint-plugin-cypress": "^3.6.0",
"rimraf": "^5.0.5"
},
"peerDependencies": {
"cypress": "^12.2.0 || ^13.2.0 || ^14.0.0",
"cypress": "^12.2.0 || ^13.2.0 || ^14.0.0 || ^15.0.0",
"eslint-plugin-cypress": ">=2.0.0"
},
"peerDependenciesMeta": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ export function registerCypressOverwrites() {
},
);

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
chai.Assertion.overwriteProperty('checked', (_super: () => void) => {
return function (
this: typeof chai.Assertion & { __flags: { negate?: boolean } },
Expand Down
13 changes: 13 additions & 0 deletions packages/e2e-cypress/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ module.exports = async function (api) {
api.compatibleWith('quasar', '^2.0.0');
if (api.hasVite) {
api.compatibleWith('@quasar/app-vite', '^1.0.0 || ^2.0.0');


// app-vite v2.4.0 switches to Vite 7, which requires Cypress v15
if (api.hasPackage('@quasar/app-vite', '^2.4.0')) {
api.compatibleWith('cypress', '^15.0.0');
}

// Cypress v15 drops support for Vite versions below v5
// So if the user has Cypress v15, we need to ensure they are using @quasar/app-vite v2
// which uses Vite 6 or above
if (api.hasPackage('cypress', '^15.0.0')) {
api.compatibleWith('@quasar/app-vite', '^2.0.0');
}
} else if (api.hasWebpack) {
api.compatibleWith('@quasar/app-webpack', '^3.0.0 || ^4.0.0');
}
Expand Down
15 changes: 14 additions & 1 deletion packages/e2e-cypress/src/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ function getEslintPluginCypressDependency(api) {
devDependencies: {
// eslint-plugin-cypress v3 doesn't support ESLint v9 and eslint-plugin-cypress v4 only supports ESLint v9,
// So if the user has ESLint v9 installed, then we will scaffold with eslint-plugin-cypress v4, otherwise we will use v3
// We cannot use v5.x of eslint-plugin-cypress because it drops support for non-flat ESLint configs
'eslint-plugin-cypress': api.hasPackage('eslint', '^9.0.0')
? '^4.2.1'
? '^4.3.0'
: '^3.6.0',
},
};
Expand All @@ -78,6 +79,18 @@ module.exports = async function (api) {
if (api.hasVite) {
// PromptsAPI and hasTypescript are only available from v1.6.0 onwards
api.compatibleWith('@quasar/app-vite', '^v1.6.0 || ^2.0.0');

// app-vite v2.4.0 switches to Vite 7, which requires Cypress v15
if (api.hasPackage('@quasar/app-vite', '^2.4.0')) {
api.compatibleWith('cypress', '^15.0.0');
}

// Cypress v15 drops support for Vite versions below v5
// So if the user has Cypress v15, we need to ensure they are using @quasar/app-vite v2
// which uses Vite 6 or above
if (api.hasPackage('cypress', '^15.0.0')) {
api.compatibleWith('@quasar/app-vite', '^2.0.0');
}
} else if (api.hasWebpack) {
// PromptsAPI and hasTypescript are only available from v3.11.0 onwards
api.compatibleWith('@quasar/app-webpack', '^3.11.0 || ^4.0.0');
Expand Down
9 changes: 0 additions & 9 deletions test-vite-app-v1-vite4/.editorconfig

This file was deleted.

7 changes: 0 additions & 7 deletions test-vite-app-v1-vite4/.eslintignore

This file was deleted.

115 changes: 0 additions & 115 deletions test-vite-app-v1-vite4/.eslintrc.js

This file was deleted.

36 changes: 0 additions & 36 deletions test-vite-app-v1-vite4/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions test-vite-app-v1-vite4/.nycrc

This file was deleted.

4 changes: 0 additions & 4 deletions test-vite-app-v1-vite4/.prettierrc

This file was deleted.

15 changes: 0 additions & 15 deletions test-vite-app-v1-vite4/.vscode/extensions.json

This file was deleted.

9 changes: 0 additions & 9 deletions test-vite-app-v1-vite4/.vscode/settings.json

This file was deleted.

43 changes: 0 additions & 43 deletions test-vite-app-v1-vite4/README.md

This file was deleted.

14 changes: 0 additions & 14 deletions test-vite-app-v1-vite4/babel.config.js

This file was deleted.

Loading