Skip to content

Commit

Permalink
chore(deps): update dependency cypress to v10 (#5722)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency cypress to v10

* chore: run automated migration script

* wip changes

* chore: rename spec files, adhering to new convention

* chore: update yarn.lock

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dominic Saadi <dominiceliassaadi@gmail.com>
  • Loading branch information
renovate[bot] and jtoar authored Sep 16, 2022
1 parent 58ce815 commit 7d625b2
Show file tree
Hide file tree
Showing 47 changed files with 35 additions and 95 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@ jobs:
working-directory: ${{ steps.createpath.outputs.project_path }}

- name: 🌲 Run cypress
uses: cypress-io/github-action@v2
uses: cypress-io/github-action@v4
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_RW_PATH: "${{ steps.createpath.outputs.project_path }}"
with:
Expand All @@ -150,8 +149,8 @@ jobs:
wait-on: 'http://localhost:8910'
working-directory: ./tasks/e2e
spec: |
cypress/integration/01-tutorial/*.spec.js
cypress/integration/04-logger/*.spec.js
cypress/e2e/01-tutorial/*.cy.js
cypress/e2e/04-logger/*.cy.js
tutorial-e2e-docs:
needs: only-doc-changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"babel-plugin-remove-code": "0.0.6",
"boxen": "5.1.2",
"core-js": "3.25.1",
"cypress": "9.7.0",
"cypress": "10.3.1",
"cypress-wait-until": "1.7.2",
"eslint": "8.23.1",
"fast-glob": "3.2.12",
Expand Down
20 changes: 20 additions & 0 deletions tasks/e2e/cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { defineConfig } = require('cypress')

module.exports = defineConfig({
e2e: {
excludeSpecPattern: ['**/codemods/*.js', '**/sharedTests.js'],
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
supportFile: false,
},
// `runMode` is for `cypress run`, `openMode` is for `cypress open`.
// Locally, we use open. But in CI, we use run.
retries: {
runMode: 5,
openMode: 0,
},
defaultCommandTimeout: 12_0000,
execTimeout: 12_0000,
pageLoadTimeout: 12_0000,
requestTimeout: 12_0000,
taskTimeout: 12_0000,
})
18 changes: 0 additions & 18 deletions tasks/e2e/cypress.json

This file was deleted.

21 changes: 0 additions & 21 deletions tasks/e2e/cypress/plugins/index.js

This file was deleted.

25 changes: 0 additions & 25 deletions tasks/e2e/cypress/support/commands.js

This file was deleted.

20 changes: 0 additions & 20 deletions tasks/e2e/cypress/support/index.js

This file was deleted.

7 changes: 6 additions & 1 deletion tasks/run-e2e
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,12 @@ const runCypress = () => {
execa.sync(
// do not use Yarn to run Cypress; this avoids missing binary errors
'../../node_modules/.bin/cypress',
['open', `--env RW_PATH=${REDWOOD_PROJECT_DIRECTORY}`],
[
'open',
`--env RW_PATH=${REDWOOD_PROJECT_DIRECTORY}`,
'--e2e',
'--browser chrome',
],
{
cwd: path.join(REDWOODJS_FRAMEWORK_PATH, 'tasks/e2e'),
shell: true,
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14065,9 +14065,9 @@ __metadata:
languageName: node
linkType: hard

"cypress@npm:9.7.0":
version: 9.7.0
resolution: "cypress@npm:9.7.0"
"cypress@npm:10.3.1":
version: 10.3.1
resolution: "cypress@npm:10.3.1"
dependencies:
"@cypress/request": ^2.88.10
"@cypress/xvfb": ^1.2.4
Expand Down Expand Up @@ -14113,7 +14113,7 @@ __metadata:
yauzl: ^2.10.0
bin:
cypress: bin/cypress
checksum: 9ebffdc463ebb4db796fa27fa11883f04e696711417f544a7d793a7a283c2f79c4f5d1e528bc3d312a16a1e1d6ae63532106feb4c70b4a42f51fd3d0487d4d38
checksum: 5db249c8c1bce7d21c49ad3849d68ff9358cb31ead92c018846e8a79c08ad8ff51a215754e54ccc62bd8c10bd643e9971c9722a212fa646b1137b30805e193fc
languageName: node
linkType: hard

Expand Down Expand Up @@ -27121,7 +27121,7 @@ __metadata:
babel-plugin-remove-code: 0.0.6
boxen: 5.1.2
core-js: 3.25.1
cypress: 9.7.0
cypress: 10.3.1
cypress-wait-until: 1.7.2
eslint: 8.23.1
fast-glob: 3.2.12
Expand Down

0 comments on commit 7d625b2

Please sign in to comment.