Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump cypress from 12.17.4 to 13.6.6 #6554

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ updates:
- dependency-name: formidable
versions:
- "> 2.1.2"
- dependency-name: webpack-dev-server # Waiting for Cypress to add support
versions:
- "> 4.15.1"
Comment on lines +25 to +27
Copy link
Contributor

Choose a reason for hiding this comment

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

Cypress doesn't support the latest version of this yet - cypress-io/cypress#28924


# These are part of dependency groups and should be updated via the relevant script.
- dependency-name: "@storybook/addon-a11y"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ COPY --chown=node:node package*.json "$HOME/"
WORKDIR $HOME

# Install specific version of cypress
RUN npm install -g cypress@12.17.4 \
RUN npm install -g cypress@13.6.6 \
&& npx cypress verify \
&& npx cypress cache path \
&& npx cypress cache list \
Expand Down
1 change: 0 additions & 1 deletion cypress.a11y.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const { defineConfig } = require('cypress')

module.exports = defineConfig({
video: true,
videoUploadOnPasses: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

videoUploadOnPasses has been deprecated by Cypress

screenshotOnRunFailure: false,
defaultCommandTimeout: 5000,
requestTimeout: 5000,
Expand Down
23 changes: 11 additions & 12 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
const { defineConfig } = require("cypress");
const { defineConfig } = require('cypress')

module.exports = defineConfig({
video: true,
videoUploadOnPasses: false,
screenshotOnRunFailure: false,
defaultCommandTimeout: 5000,
requestTimeout: 5000,
projectId: "w97se2",
projectId: 'w97se2',

env: {
codeCoverage: {
url: "http://localhost:3000/__coverage__",
url: 'http://localhost:3000/__coverage__',
},
},
component: {
supportFile: "test/cypress/support/index.js",
supportFile: 'test/cypress/support/index.js',
devServer: {
framework: "react",
bundler: "webpack",
framework: 'react',
bundler: 'webpack',
},
},
e2e: {
setupNodeEvents(on, config) {
return require("./test/cypress/plugins/index.js")(on, config);
return require('./test/cypress/plugins/index.js')(on, config)
},
specPattern: "test/functional/cypress/specs/**/*.{js,jsx}",
baseUrl: "http://localhost:3000",
supportFile: "test/cypress/support/index.js",
specPattern: 'test/functional/cypress/specs/**/*.{js,jsx}',
baseUrl: 'http://localhost:3000',
supportFile: 'test/cypress/support/index.js',
},
});
})
1 change: 0 additions & 1 deletion cypress.visual.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ require('dotenv').config()

module.exports = defineConfig({
video: true,
videoUploadOnPasses: false,
screenshotOnRunFailure: false,
defaultCommandTimeout: 5000,
requestTimeout: 5000,
Expand Down
31 changes: 12 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"test:unit": "NODE_ENV=test API_ROOT=http://test MOCHA_FILE=junit/test-results.xml npx mocha ./src/**/*.test.js --exit",
"test:functional": "CYPRESS_retries=3 nyc cypress run --browser chrome",
"test:a11y": "CYPRESS_coverage=false cypress run --config-file cypress.a11y.config.js --browser chrome",
"test:a11y:watch": "CYPRESS_coverage=false cypress open --config-file cypress.a11y.config.js --browser chrome",
"test:a11y:watch": "CYPRESS_coverage=false cypress open --config-file cypress.a11y.config.js --e2e --browser chrome",
"test:unit-client": "NODE_ENV=test WEBPACK_ENV=develop MOCHA_FILE=junit/test-results.xml npx mochapack --webpack-config webpack.node.config.js --opts ./test/unit-client/mocha.opts ./test/unit-client/assets/javascripts/**/*.test.{js,jsx}",
"test:functional:watch": "cypress open --e2e --browser chrome",
"test:e2e:lep": "CYPRESS_coverage=false cypress run --config '{\"specPattern\":[\"test/end-to-end/cypress/specs/LEP/**/*.js\"]}' --browser chrome",
Expand Down Expand Up @@ -179,7 +179,7 @@
"chai": "^4.4.1",
"chai-as-promised": "^7.1.1",
"chai-subset": "^1.6.0",
"cypress": "^12.17.4",
"cypress": "^13.6.6",
"cypress-axe": "^1.5.0",
"cypress-image-diff-js": "^1.32.0",
"eslint": "^8.56.0",
Expand Down
2 changes: 2 additions & 0 deletions test/a11y/cypress/config/urlTestExclusions.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export const urlTestExclusions = [
{ url: '/reminders/settings/my-tasks-task-completed/' },
{ url: '/export/' },
{ url: '/tasks/:taskId/edit' },
{ url: '/companies/:companyId/overview' },
Copy link
Contributor

Choose a reason for hiding this comment

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

The test for this page is extremely flaky so I've skipped this URL until we get around to looking into these failures

// 404 errors and or no sandbox data available
{ url: '/companies/:companyId/audit' },
{ url: '/companies/:companyId/archive' },
Expand Down Expand Up @@ -131,6 +132,7 @@ export const urlTestExclusions = [
{ url: '/investments/projects/:investmentId/propositions/:propositionId' },
{ url: '/companies/:companyId/hierarchies/ghq/:globalHqId/add' },
{ url: '/companies/:companyId/hierarchies/ghq/remove' },
{ url: '/companies/:companyId' },
Copy link
Contributor

Choose a reason for hiding this comment

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

This just redirects to the overview page so we don't need to test this individually

// API calls with redirect
{ url: '/tasks/:taskId/status-complete' },
{ url: '/tasks/:taskId/status-active' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,8 @@ describe('Company Orders (OMIS) Collection Page', () => {
}).as('archivedApiRequest')
cy.visit(urls.companies.orders(archivedLtd.id))
assertPayload('@archivedApiRequest', {
offset: 0,
limit: 10,
sortby: 'created_on:desc',
offset: 0,
company: archivedLtd.id,
})
})
Expand Down
Loading