Skip to content

chore: use cypress 15 prebuilt binary and test built-in shimming #921

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ defaults: &defaults
parallelism: 1
working_directory: ~/app
docker:
- image: cypress/browsers:node-22.13.0-chrome-132.0.6834.83-1-ff-134.0.1-edge-131.0.2903.147-1
- image: cypress/browsers:node-22.16.0-chrome-137.0.7151.68-1-ff-139.0.1-edge-137.0.3296.62-1
environment:
TERM: xterm
steps:
@@ -51,7 +51,7 @@ jobs:
build:
working_directory: ~/app
docker:
- image: cypress/browsers:node-22.13.0-chrome-132.0.6834.83-1-ff-134.0.1-edge-131.0.2903.147-1
- image: cypress/browsers:node-22.16.0-chrome-137.0.7151.68-1-ff-139.0.1-edge-137.0.3296.62-1
environment:
TERM: xterm
steps:
@@ -83,7 +83,7 @@ jobs:
lint:
working_directory: ~/app
docker:
- image: cypress/browsers:node-22.13.0-chrome-132.0.6834.83-1-ff-134.0.1-edge-131.0.2903.147-1
- image: cypress/browsers:node-22.16.0-chrome-137.0.7151.68-1-ff-139.0.1-edge-137.0.3296.62-1
steps:
- attach_workspace:
at: ~/
@@ -93,7 +93,7 @@ jobs:
# dummy job running after all end-to-end tests
after-tests:
docker:
- image: cypress/browsers:node-22.13.0-chrome-132.0.6834.83-1-ff-134.0.1-edge-131.0.2903.147-1
- image: cypress/browsers:node-22.16.0-chrome-137.0.7151.68-1-ff-139.0.1-edge-137.0.3296.62-1
steps:
- run: echo "all good"

@@ -104,7 +104,7 @@ jobs:
parallelism: 20
working_directory: ~/app
docker:
- image: cypress/browsers:node-22.13.0-chrome-132.0.6834.83-1-ff-134.0.1-edge-131.0.2903.147-1
- image: cypress/browsers:node-22.16.0-chrome-137.0.7151.68-1-ff-139.0.1-edge-137.0.3296.62-1
environment:
TERM: xterm
steps:
@@ -120,7 +120,7 @@ jobs:
parallelism: 10
working_directory: ~/app
docker:
- image: cypress/browsers:node-22.13.0-chrome-132.0.6834.83-1-ff-134.0.1-edge-131.0.2903.147-1
- image: cypress/browsers:node-22.16.0-chrome-137.0.7151.68-1-ff-139.0.1-edge-137.0.3296.62-1
environment:
TERM: xterm
# no need to record these runs yet
@@ -143,7 +143,7 @@ jobs:
parallelism: 1
working_directory: ~/app
docker:
- image: cypress/browsers:node-22.13.0-chrome-132.0.6834.83-1-ff-134.0.1-edge-131.0.2903.147-1
- image: cypress/browsers:node-22.16.0-chrome-137.0.7151.68-1-ff-139.0.1-edge-137.0.3296.62-1
environment:
TERM: xterm
# no need to record these runs yet
@@ -159,7 +159,7 @@ jobs:
parallelism: 10
working_directory: ~/app
docker:
- image: cypress/browsers:node-22.13.0-chrome-132.0.6834.83-1-ff-134.0.1-edge-131.0.2903.147-1
- image: cypress/browsers:node-22.16.0-chrome-137.0.7151.68-1-ff-139.0.1-edge-137.0.3296.62-1
environment:
TERM: xterm
# no need to record these runs yet
19 changes: 19 additions & 0 deletions examples/blogs__element-coverage/cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
const { defineConfig } = require('cypress')
const webpackPreprocessor = require('@cypress/webpack-batteries-included-preprocessor')

function getWebpackOptions () {
const options = webpackPreprocessor.getFullWebpackOptions()

options.resolve.fallback.crypto = require.resolve('crypto-browserify')

return options
}

module.exports = defineConfig({
env: {
@@ -7,5 +16,15 @@ module.exports = defineConfig({
e2e: {
baseUrl: 'http://localhost:3000',
excludeSpecPattern: ['**/*.snap", "**/__snapshot__/*'],
setupNodeEvents (on, config) {
on(
'file:preprocessor',
webpackPreprocessor({
webpackOptions: getWebpackOptions(),
})
)

return config
},
},
})
4 changes: 3 additions & 1 deletion examples/blogs__form-submit/cypress/e2e/spec.cy.js
Original file line number Diff line number Diff line change
@@ -11,7 +11,9 @@ describe('Form submit', () => {
it('wait for URL change', () => {
cy.visit('')
cy.get('select').select('Second')
cy.location('search').should('equal', '?')
// Starting with Cypress 15, the search object will no longer contain an ? is the key value pairs are empty
// This more closely aligns with the url standard in https://developer.mozilla.org/en-US/docs/Web/API/URL/search
cy.location('href').should('contain', '?')
cy.get('input').type('Hallo')
})

16 changes: 16 additions & 0 deletions examples/blogs__testing-redux-store/cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
const { defineConfig } = require('cypress')

const { initPlugin } = require('cypress-plugin-snapshots/plugin')
const webpackPreprocessor = require('@cypress/webpack-batteries-included-preprocessor')

function getWebpackOptions () {
const options = webpackPreprocessor.getFullWebpackOptions()

options.resolve.fallback.crypto = require.resolve('crypto-browserify')

return options
}

module.exports = defineConfig({
env: {
@@ -12,6 +21,13 @@ module.exports = defineConfig({
setupNodeEvents (on, config) {
initPlugin(on, config)

on(
'file:preprocessor',
webpackPreprocessor({
webpackOptions: getWebpackOptions(),
})
)

return config
},
},
3 changes: 0 additions & 3 deletions examples/blogs__testing-redux-store/package.json
Original file line number Diff line number Diff line change
@@ -11,9 +11,6 @@
"test:ci": "../../node_modules/.bin/start-test 3000 cypress:run",
"test:ci:record": "../../node_modules/.bin/start-test 3000 cypress:run:record"
},
"devDependencies": {
"cypress-plugin-snapshots": "1.0.6"
},
"browserslist": [
">0.2%",
"not dead",
Original file line number Diff line number Diff line change
@@ -132,6 +132,7 @@ describe('file download', () => {
// now that we have seen the CSV contents,
// we can get back to the original HTML page
cy.go('back')
cy.url().should('equal', 'http://localhost:8070/')
})

it('CSV file intercept', () => {
2,339 changes: 1,565 additions & 774 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -92,6 +92,7 @@
"@cypress/eslint-plugin-dev": "5.0.2",
"@cypress/skip-test": "2.5.1",
"@cypress/snapshot": "2.1.7",
"@cypress/webpack-batteries-included-preprocessor": "3.1.0",
"@cypress/webpack-preprocessor": "5.5.0",
"@medv/finder": "1.1.2",
"@types/chai": "4.1.7",
@@ -107,8 +108,9 @@
"chrome-remote-interface": "0.28.1",
"common-tags": "1.8.0",
"console.table": "0.10.0",
"crypto-browserify": "3.12.1",
"cy-spok": "1.3.2",
"cypress": "14.5.0",
"cypress": "https://cdn.cypress.io/beta/npm/15.0.0/darwin-arm64/release/15.0.0-49f64e7721e4a5c0a48d430f25192e11b70d9e77/cypress.tgz",
"cypress-axe": "0.12.2",
"cypress-expect-n-assertions": "1.0.0",
"cypress-failed-log": "2.9.5",