Skip to content

Commit e379683

Browse files
taty2010LekoArts
andauthored
chore: Update to cypress v12 (#2061)
* chore: migrate to cypress 12 * chore: updated workflow with new file/folder names * set cy:open for e2e and Chrome Co-authored-by: Lennart <lekoarts@gmail.com> * chore: updated github-action from v2 to v5 --------- Co-authored-by: Lennart <lekoarts@gmail.com>
1 parent 44dac40 commit e379683

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+188
-126
lines changed

.github/workflows/cypress-canary.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- main
88
paths:
99
- 'demos/canary/**/*.{js,jsx,ts,tsx}'
10-
- 'cypress/integration/canary/**/*.{ts,js}'
10+
- 'cypress/e2e/canary/**/*.{ts,js}'
1111
- 'src/**/*.{ts,js}'
1212
jobs:
1313
cypress:
@@ -56,15 +56,15 @@ jobs:
5656
- name: Cypress run
5757
if: ${{ steps.deploy.outputs.origin-url }}
5858
id: cypress
59-
uses: cypress-io/github-action@v2
59+
uses: cypress-io/github-action@v5
6060
with:
6161
browser: chrome
6262
headless: true
6363
record: true
6464
parallel: true
65-
config-file: cypress/config/canary.json
65+
config-file: cypress/config/canary.config.ts
6666
group: 'Next Runtime - Demo Canary'
67-
spec: cypress/integration/canary/*
67+
spec: cypress/e2e/canary/*
6868
env:
6969
DEBUG: '@cypress/github-action'
7070
CYPRESS_baseUrl: ${{ steps.deploy.outputs.origin-url }}

.github/workflows/cypress-demo-nx.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- main
88
paths:
99
- 'demos/nx-next-monorepo-demo/**/*.{js,jsx,ts,tsx}'
10-
- 'cypress/integration/nx/**/*.{ts,js}'
10+
- 'cypress/e2e/nx/**/*.{ts,js}'
1111
- 'src/**/*.{ts,js}'
1212
jobs:
1313
cypress:
@@ -56,15 +56,15 @@ jobs:
5656
- name: Cypress run
5757
if: ${{ steps.deploy.outputs.origin-url }}
5858
id: cypress
59-
uses: cypress-io/github-action@v2
59+
uses: cypress-io/github-action@v5
6060
with:
6161
browser: chrome
6262
headless: true
6363
record: true
6464
parallel: true
65-
config-file: cypress/config/nx-demo.json
65+
config-file: cypress/config/nx-demo.config.ts
6666
group: 'Next Runtime - Demo NX'
67-
spec: cypress/integration/nx/*
67+
spec: cypress/e2e/nx/*
6868
env:
6969
DEBUG: '@cypress/github-action'
7070
CYPRESS_baseUrl: ${{ steps.deploy.outputs.origin-url }}

.github/workflows/cypress-demo-static.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- main
88
paths:
99
- 'demos/static-root/**/*.{js,jsx,ts,tsx}'
10-
- 'cypress/integration/static/**/*.{ts,js}'
10+
- 'cypress/e2e/static/**/*.{ts,js}'
1111
- 'src/**/*.{ts,js}'
1212
jobs:
1313
cypress:
@@ -56,15 +56,15 @@ jobs:
5656
- name: Cypress run
5757
if: ${{ steps.deploy.outputs.origin-url }}
5858
id: cypress
59-
uses: cypress-io/github-action@v2
59+
uses: cypress-io/github-action@v5
6060
with:
6161
browser: chrome
6262
headless: true
6363
record: true
6464
parallel: true
65-
config-file: cypress/config/static-root.json
65+
config-file: cypress/config/static-root.config.ts
6666
group: 'Next Runtime - Demo Static'
67-
spec: cypress/integration/static-root/*
67+
spec: cypress/e2e/static-root/*
6868
env:
6969
DEBUG: '@cypress/github-action'
7070
CYPRESS_baseUrl: ${{ steps.deploy.outputs.origin-url }}

.github/workflows/cypress-demo.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- main
88
paths:
99
- 'demos/default/**/*.{js,jsx,ts,tsx}'
10-
- 'cypress/integration/default/**/*.{ts,js}'
10+
- 'cypress/e2e/default/**/*.{ts,js}'
1111
- 'src/**/*.{ts,js}'
1212
jobs:
1313
cypress:
@@ -56,15 +56,15 @@ jobs:
5656
- name: Cypress run
5757
if: ${{ steps.deploy.outputs.origin-url }}
5858
id: cypress
59-
uses: cypress-io/github-action@v2
59+
uses: cypress-io/github-action@v5
6060
with:
6161
browser: chrome
6262
headless: true
6363
record: true
6464
parallel: true
65-
config-file: cypress/config/ci.json
65+
config-file: cypress/config/ci.config.ts
6666
group: 'Next Runtime - Demo'
67-
spec: cypress/integration/default/*
67+
spec: cypress/e2e/default/*
6868
env:
6969
DEBUG: '@cypress/github-action'
7070
CYPRESS_baseUrl: ${{ steps.deploy.outputs.origin-url }}

.github/workflows/cypress-middleware.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- main
88
paths:
99
- 'demos/middleware/**/*.{js,jsx,ts,tsx}'
10-
- 'cypress/integration/middleware/**/*.{ts,js}'
10+
- 'cypress/e2e/middleware/**/*.{ts,js}'
1111
- 'src/**/*.{ts,js}'
1212
jobs:
1313
cypress:
@@ -56,15 +56,15 @@ jobs:
5656
- name: Cypress run
5757
if: ${{ steps.deploy.outputs.origin-url }}
5858
id: cypress
59-
uses: cypress-io/github-action@v2
59+
uses: cypress-io/github-action@v5
6060
with:
6161
browser: chrome
6262
headless: true
6363
record: true
6464
parallel: true
65-
config-file: cypress/config/middleware.json
65+
config-file: cypress/config/middleware.config.ts
6666
group: 'Next Runtime - Middleware'
67-
spec: cypress/integration/middleware/*
67+
spec: cypress/e2e/middleware/*
6868
env:
6969
DEBUG: '@cypress/github-action'
7070
CYPRESS_baseUrl: ${{ steps.deploy.outputs.origin-url }}

cypress/config/all.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { defineConfig } from 'cypress'
2+
3+
export default defineConfig({
4+
video: false,
5+
e2e: {
6+
baseUrl: 'http://localhost:3000',
7+
},
8+
})

cypress/config/all.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

cypress/config/canary.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { defineConfig } from 'cypress'
2+
3+
export default defineConfig({
4+
e2e: {
5+
baseUrl: 'http://localhost:3000',
6+
// integrationFolder was replaced by specPattern in Cypress 12 https://docs.cypress.io/guides/references/migration-guide#integrationFolder
7+
"specPattern": "cypress/e2e/canary",
8+
"projectId": "5zbkdv"
9+
},
10+
})

cypress/config/canary.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

cypress/config/ci.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { defineConfig } from 'cypress'
2+
3+
export default defineConfig({
4+
e2e: {
5+
baseUrl: 'http://localhost:3000',
6+
// integrationFolder was replaced by specPattern in Cypress 12 https://docs.cypress.io/guides/references/migration-guide#integrationFolder
7+
"specPattern": "cypress/e2e/default",
8+
"projectId": "66va58"
9+
},
10+
})

cypress/config/ci.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

cypress/config/middleware.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { defineConfig } from 'cypress'
2+
3+
export default defineConfig({
4+
e2e: {
5+
baseUrl: 'http://localhost:8888',
6+
// integrationFolder was replaced by specPattern in Cypress 12 https://docs.cypress.io/guides/references/migration-guide#integrationFolder
7+
"specPattern": "cypress/e2e/middleware",
8+
"projectId": "yn8qwi"
9+
},
10+
})

cypress/config/middleware.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

cypress/config/nx-demo.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { defineConfig } from 'cypress'
2+
3+
export default defineConfig({
4+
e2e: {
5+
baseUrl: 'http://localhost:4200',
6+
// integrationFolder was replaced by specPattern in Cypress 12 https://docs.cypress.io/guides/references/migration-guide#integrationFolder
7+
"specPattern": "cypress/e2e/nx",
8+
"projectId": "ijcdpo"
9+
},
10+
})

cypress/config/nx-demo.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

cypress/config/static-root.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { defineConfig } from 'cypress'
2+
3+
export default defineConfig({
4+
e2e: {
5+
baseUrl: 'http://localhost:3000',
6+
// integrationFolder was replaced by specPattern in Cypress 12 https://docs.cypress.io/guides/references/migration-guide#integrationFolder
7+
"specPattern": "cypress/e2e/static-root",
8+
"projectId": "3tvrbe"
9+
},
10+
})
11+

cypress/config/static-root.json

Lines changed: 0 additions & 5 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

demos/nx-next-monorepo-demo/package-lock.json

Lines changed: 29 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demos/nx-next-monorepo-demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@typescript-eslint/eslint-plugin": "^5.36.1",
3636
"@typescript-eslint/parser": "^5.36.1",
3737
"babel-jest": "28.1.3",
38-
"cypress": "^10.7.0",
38+
"cypress": "^12.10.0",
3939
"eslint": "~8.15.0",
4040
"eslint-config-next": "12.3.4",
4141
"eslint-config-prettier": "8.8.0",

0 commit comments

Comments
 (0)