feat(*): upgrade cypress

This commit is contained in:
thomas
2025-01-27 21:07:25 +01:00
parent f3be3eedff
commit 5be923c256
18 changed files with 75 additions and 120 deletions

View File

@@ -23,20 +23,3 @@ declare global {
}
Cypress.Commands.add('mount', mount);
//
// -- This is a parent command --
Cypress.Commands.add('login', (email, password) => {
console.log('Custom command example: Login', email, password);
});
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })

View File

@@ -82,6 +82,15 @@
"coverage": true
}
}
},
"component-test": {
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/testing/17-router/cypress.config.ts",
"testingType": "component",
"skipServe": true,
"devServerTarget": "testing-router:build"
}
}
}
}

View File

@@ -22,7 +22,7 @@
"path": "./tsconfig.editor.json"
},
{
"path": "./cypress/tsconfig.base.json"
"path": "./cypress/tsconfig.json"
}
],
"extends": "../../../tsconfig.base.json",

View File

@@ -23,20 +23,3 @@ declare global {
}
Cypress.Commands.add('mount', mount);
//
// -- This is a parent command --
Cypress.Commands.add('login', (email, password) => {
console.log('Custom command example: Login', email, password);
});
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })

View File

@@ -82,6 +82,15 @@
"coverage": true
}
}
},
"component-test": {
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/testing/18-nested-components/cypress.config.ts",
"testingType": "component",
"skipServe": true,
"devServerTarget": "testing-nested-components:build"
}
}
}
}

View File

@@ -22,7 +22,7 @@
"path": "./tsconfig.editor.json"
},
{
"path": "./cypress/tsconfig.base.json"
"path": "./cypress/tsconfig.json"
}
],
"extends": "../../../tsconfig.base.json",

View File

@@ -23,20 +23,3 @@ declare global {
}
Cypress.Commands.add('mount', mount);
//
// -- This is a parent command --
Cypress.Commands.add('login', (email, password) => {
console.log('Custom command example: Login', email, password);
});
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })

View File

@@ -82,6 +82,15 @@
"coverage": true
}
}
},
"component-test": {
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/testing/19-input-output/cypress.config.ts",
"testingType": "component",
"skipServe": true,
"devServerTarget": "testing-input-output:build"
}
}
}
}

View File

@@ -22,7 +22,7 @@
"path": "./tsconfig.editor.json"
},
{
"path": "./cypress/tsconfig.base.json"
"path": "./cypress/tsconfig.json"
}
],
"extends": "../../../tsconfig.base.json",

View File

@@ -23,20 +23,3 @@ declare global {
}
Cypress.Commands.add('mount', mount);
//
// -- This is a parent command --
Cypress.Commands.add('login', (email, password) => {
console.log('Custom command example: Login', email, password);
});
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })

View File

@@ -85,6 +85,15 @@
"coverage": true
}
}
},
"component-test": {
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/testing/20-modal/cypress.config.ts",
"testingType": "component",
"skipServe": true,
"devServerTarget": "testing-modal:build"
}
}
}
}

View File

@@ -22,7 +22,7 @@
"path": "./tsconfig.editor.json"
},
{
"path": "./cypress/tsconfig.base.json"
"path": "./cypress/tsconfig.json"
}
],
"extends": "../../../tsconfig.base.json",

View File

@@ -23,20 +23,3 @@ declare global {
}
Cypress.Commands.add('mount', mount);
//
// -- This is a parent command --
Cypress.Commands.add('login', (email, password) => {
console.log('Custom command example: Login', email, password);
});
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })

View File

@@ -85,6 +85,15 @@
"coverage": true
}
}
},
"component-test": {
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/testing/29-real-life-application/cypress.config.ts",
"testingType": "component",
"skipServe": true,
"devServerTarget": "testing-real-life-application:build"
}
}
}
}

View File

@@ -22,7 +22,7 @@
"path": "./tsconfig.editor.json"
},
{
"path": "./cypress/tsconfig.base.json"
"path": "./cypress/tsconfig .json"
}
],
"extends": "../../../tsconfig.base.json",

View File

@@ -92,15 +92,6 @@
"extensions": ["ts", "tsx", "js", "jsx", "html", "vue"]
}
},
{
"plugin": "@nx/cypress/plugin",
"options": {
"targetName": "component-test",
"ciTargetName": "e2e-ci",
"openTargetName": "open-cypress",
"componentTestingTargetName": "component-test"
}
},
{
"plugin": "@nx/jest/plugin",
"options": {

44
package-lock.json generated
View File

@@ -78,7 +78,7 @@
"@typescript-eslint/utils": "^7.16.0",
"all-contributors-cli": "^6.26.1",
"autoprefixer": "^10.4.0",
"cypress": "13.13.1",
"cypress": "^14.0.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-cypress": "2.15.1",
@@ -13821,14 +13821,14 @@
"license": "MIT"
},
"node_modules/cypress": {
"version": "13.13.1",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-13.13.1.tgz",
"integrity": "sha512-8F9UjL5MDUdgC/S5hr8CGLHbS5gGht5UOV184qc2pFny43fnkoaKxlzH/U6//zmGu/xRTaKimNfjknLT8+UDFg==",
"version": "14.0.0",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-14.0.0.tgz",
"integrity": "sha512-kEGqQr23so5IpKeg/dp6GVi7RlHx1NmW66o2a2Q4wk9gRaAblLZQSiZJuDI8UMC4LlG5OJ7Q6joAiqTrfRNbTw==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"@cypress/request": "^3.0.0",
"@cypress/request": "^3.0.6",
"@cypress/xvfb": "^1.2.4",
"@types/sinonjs__fake-timers": "8.1.1",
"@types/sizzle": "^2.3.2",
@@ -13839,6 +13839,7 @@
"cachedir": "^2.3.0",
"chalk": "^4.1.0",
"check-more-types": "^2.24.0",
"ci-info": "^4.0.0",
"cli-cursor": "^3.1.0",
"cli-table3": "~0.6.1",
"commander": "^6.2.1",
@@ -13853,7 +13854,6 @@
"figures": "^3.2.0",
"fs-extra": "^9.1.0",
"getos": "^3.2.1",
"is-ci": "^3.0.1",
"is-installed-globally": "~0.4.0",
"lazy-ass": "^1.6.0",
"listr2": "^3.8.3",
@@ -13868,6 +13868,7 @@
"semver": "^7.5.3",
"supports-color": "^8.1.1",
"tmp": "~0.2.3",
"tree-kill": "1.2.2",
"untildify": "^4.0.0",
"yauzl": "^2.10.0"
},
@@ -13875,7 +13876,7 @@
"cypress": "bin/cypress"
},
"engines": {
"node": "^16.0.0 || ^18.0.0 || >=20.0.0"
"node": "^18.0.0 || ^20.0.0 || >=22.0.0"
}
},
"node_modules/cypress/node_modules/arch": {
@@ -13899,6 +13900,22 @@
],
"license": "MIT"
},
"node_modules/cypress/node_modules/ci-info": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.1.0.tgz",
"integrity": "sha512-HutrvTNsF48wnxkzERIXOe5/mlcfFcbfCmwcg6CJnizbSue78AbDt+1cgl26zwn61WFxhcPykPfZrbqjGmBb4A==",
"dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/sibiraj-s"
}
],
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/cypress/node_modules/cli-truncate": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz",
@@ -18393,19 +18410,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-ci": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz",
"integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"ci-info": "^3.2.0"
},
"bin": {
"is-ci": "bin.js"
}
},
"node_modules/is-core-module": {
"version": "2.15.1",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz",

View File

@@ -81,7 +81,7 @@
"@typescript-eslint/utils": "^7.16.0",
"all-contributors-cli": "^6.26.1",
"autoprefixer": "^10.4.0",
"cypress": "13.13.1",
"cypress": "14.0.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-cypress": "2.15.1",