diff --git a/apps/testing/17-router/cypress/support/commands.ts b/apps/testing/17-router/cypress/support/commands.ts index e6c8976..b5d8a95 100644 --- a/apps/testing/17-router/cypress/support/commands.ts +++ b/apps/testing/17-router/cypress/support/commands.ts @@ -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) => { ... }) diff --git a/apps/testing/17-router/project.json b/apps/testing/17-router/project.json index 366fc20..44c7a2b 100644 --- a/apps/testing/17-router/project.json +++ b/apps/testing/17-router/project.json @@ -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" + } } } } diff --git a/apps/testing/17-router/tsconfig.json b/apps/testing/17-router/tsconfig.json index 8a0cb05..3879b94 100644 --- a/apps/testing/17-router/tsconfig.json +++ b/apps/testing/17-router/tsconfig.json @@ -22,7 +22,7 @@ "path": "./tsconfig.editor.json" }, { - "path": "./cypress/tsconfig.base.json" + "path": "./cypress/tsconfig.json" } ], "extends": "../../../tsconfig.base.json", diff --git a/apps/testing/18-nested-components/cypress/support/commands.ts b/apps/testing/18-nested-components/cypress/support/commands.ts index e6c8976..b5d8a95 100644 --- a/apps/testing/18-nested-components/cypress/support/commands.ts +++ b/apps/testing/18-nested-components/cypress/support/commands.ts @@ -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) => { ... }) diff --git a/apps/testing/18-nested-components/project.json b/apps/testing/18-nested-components/project.json index f80877b..3ea6467 100644 --- a/apps/testing/18-nested-components/project.json +++ b/apps/testing/18-nested-components/project.json @@ -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" + } } } } diff --git a/apps/testing/18-nested-components/tsconfig.json b/apps/testing/18-nested-components/tsconfig.json index 8a0cb05..3879b94 100644 --- a/apps/testing/18-nested-components/tsconfig.json +++ b/apps/testing/18-nested-components/tsconfig.json @@ -22,7 +22,7 @@ "path": "./tsconfig.editor.json" }, { - "path": "./cypress/tsconfig.base.json" + "path": "./cypress/tsconfig.json" } ], "extends": "../../../tsconfig.base.json", diff --git a/apps/testing/19-input-output/cypress/support/commands.ts b/apps/testing/19-input-output/cypress/support/commands.ts index e6c8976..b5d8a95 100644 --- a/apps/testing/19-input-output/cypress/support/commands.ts +++ b/apps/testing/19-input-output/cypress/support/commands.ts @@ -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) => { ... }) diff --git a/apps/testing/19-input-output/project.json b/apps/testing/19-input-output/project.json index e54eaab..e143e2e 100644 --- a/apps/testing/19-input-output/project.json +++ b/apps/testing/19-input-output/project.json @@ -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" + } } } } diff --git a/apps/testing/19-input-output/tsconfig.json b/apps/testing/19-input-output/tsconfig.json index 8a0cb05..3879b94 100644 --- a/apps/testing/19-input-output/tsconfig.json +++ b/apps/testing/19-input-output/tsconfig.json @@ -22,7 +22,7 @@ "path": "./tsconfig.editor.json" }, { - "path": "./cypress/tsconfig.base.json" + "path": "./cypress/tsconfig.json" } ], "extends": "../../../tsconfig.base.json", diff --git a/apps/testing/20-modal/cypress/support/commands.ts b/apps/testing/20-modal/cypress/support/commands.ts index e6c8976..b5d8a95 100644 --- a/apps/testing/20-modal/cypress/support/commands.ts +++ b/apps/testing/20-modal/cypress/support/commands.ts @@ -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) => { ... }) diff --git a/apps/testing/20-modal/project.json b/apps/testing/20-modal/project.json index 4c8011e..2813461 100644 --- a/apps/testing/20-modal/project.json +++ b/apps/testing/20-modal/project.json @@ -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" + } } } } diff --git a/apps/testing/20-modal/tsconfig.json b/apps/testing/20-modal/tsconfig.json index 8a0cb05..3879b94 100644 --- a/apps/testing/20-modal/tsconfig.json +++ b/apps/testing/20-modal/tsconfig.json @@ -22,7 +22,7 @@ "path": "./tsconfig.editor.json" }, { - "path": "./cypress/tsconfig.base.json" + "path": "./cypress/tsconfig.json" } ], "extends": "../../../tsconfig.base.json", diff --git a/apps/testing/29-real-life-application/cypress/support/commands.ts b/apps/testing/29-real-life-application/cypress/support/commands.ts index e6c8976..b5d8a95 100644 --- a/apps/testing/29-real-life-application/cypress/support/commands.ts +++ b/apps/testing/29-real-life-application/cypress/support/commands.ts @@ -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) => { ... }) diff --git a/apps/testing/29-real-life-application/project.json b/apps/testing/29-real-life-application/project.json index 8a8ec0a..c6f1c12 100644 --- a/apps/testing/29-real-life-application/project.json +++ b/apps/testing/29-real-life-application/project.json @@ -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" + } } } } diff --git a/apps/testing/29-real-life-application/tsconfig.json b/apps/testing/29-real-life-application/tsconfig.json index 8a0cb05..c0f4e6d 100644 --- a/apps/testing/29-real-life-application/tsconfig.json +++ b/apps/testing/29-real-life-application/tsconfig.json @@ -22,7 +22,7 @@ "path": "./tsconfig.editor.json" }, { - "path": "./cypress/tsconfig.base.json" + "path": "./cypress/tsconfig .json" } ], "extends": "../../../tsconfig.base.json", diff --git a/nx.json b/nx.json index 65df324..649e495 100644 --- a/nx.json +++ b/nx.json @@ -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": { diff --git a/package-lock.json b/package-lock.json index c3d9e6e..3b3a587 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 1db96f2..63dbb87 100644 --- a/package.json +++ b/package.json @@ -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",