Skip to content

Commit

Permalink
Upgrade Cypress to v10 (#1649)
Browse files Browse the repository at this point in the history
  • Loading branch information
markchernov authored Aug 1, 2022
1 parent b18f95a commit b958ed2
Show file tree
Hide file tree
Showing 19 changed files with 97 additions and 1,113 deletions.
28 changes: 28 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* eslint-disable global-require */
const { defineConfig } = require('cypress');

module.exports = defineConfig({
projectId: 'dbquo6',
viewportWidth: 1600,
viewportHeight: 1200,
requestTimeout: 10000,
env: {
RETRIES: 2,
codeCoverage: {
url: '/api/__coverage__',
},
},
retries: {
runMode: 2,
openMode: 2,
},
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index')(on, config);
},
baseUrl: 'http://localhost:3000',
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
},
});
17 changes: 0 additions & 17 deletions cypress.json

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ describe('login', () => {

cy.getCookies().then(([tokenCookie]) => {
const jwt = jwt_decode(tokenCookie.value);

expect(jwt.zipcode).to.exist;
expect(jwt.firstName).to.exist;
expect(jwt.lastName).to.exist;
expect(jwt.zipcode).to.exist;
});
});

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = (on, config) => {
// `config` is the resolved Cypress config
addMatchImageSnapshotPlugin(on, config);
require('@cypress/code-coverage/task')(on, config);
on('file:preprocessor', require('@cypress/code-coverage/use-browserify-istanbul'));
on('file:preprocessor', require('@cypress/code-coverage/use-babelrc'));

// this fixes aliasing in cypres e2e tests
// https://github.com/cypress-io/cypress/issues/3262#issuecomment-462646891
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"devDependencies": {
"@babel/core": "^7.18.9",
"@babel/eslint-parser": "^7.18.9",
"@cypress/code-coverage": "3.9.12",
"@cypress/code-coverage": "^3.10.0",
"@cypress/webpack-preprocessor": "^5.12.0",
"@operation_code/eslint-plugin-custom-rules": "^1.0.1",
"@storybook/addon-actions": "6.5.9",
Expand Down Expand Up @@ -107,7 +107,7 @@
"chromatic": "^6.7.3",
"cross-env": "^7.0.3",
"css-loader": "^6.7.1",
"cypress": "^9.5.3",
"cypress": "^10.3.1",
"cypress-image-snapshot": "^4.0.1",
"eslint": "^8.21.0",
"eslint-config-airbnb": "^19.0.4",
Expand Down
1,156 changes: 65 additions & 1,091 deletions yarn.lock

Large diffs are not rendered by default.

2 comments on commit b958ed2

@vercel
Copy link

@vercel vercel bot commented on b958ed2 Aug 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on b958ed2 Aug 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.