-
Notifications
You must be signed in to change notification settings - Fork 5
Cypress visual regression testing #998
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
Merged
Merged
Changes from 31 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
0abe2a3
Partial cypress configuration
mwtrew cf8a5d5
Add basic Cypress component testing config
mwtrew 57f5dba
Configure visual regression testing
mwtrew 9d0a711
Support site-specific visual testing
mwtrew 3cff679
Add dockerised cypress run
mwtrew 12f357b
Run Cypress visual regression tests on CI
mwtrew 9f55cfe
Refactor utils to resolve Node dependency issue
mwtrew 541e329
Remove -it from Docker commands
mwtrew 977bf42
Use Cypress workflow definition
mwtrew ad1e767
Remove unused import
mwtrew 12ca153
Add artifact upload step to Cypress action
mwtrew 0aa3da5
Run artifact upload if VRT fails
mwtrew bd276fa
Force Cypress to wait for page load
mwtrew ba01568
Update baselines
mwtrew 2d19859
Merge branch 'master' of github.com:isaacphysics/isaac-react-app into…
mwtrew f1c1682
Downgrade Cypress and regenerate baselines
mwtrew 5fd728b
Fix Ada run configuration
mwtrew adc230b
Fix Ada run configuration
mwtrew 24fbde3
Fix Ada run configuration
mwtrew 777bb6e
Use Chrome for visual regression tests
mwtrew 25b0330
Add new command to mount with store and router
mwtrew 12be0a6
Revert changes to RTK renderTestEnvironment
mwtrew 60704a7
Cache dependencies when running locally
mwtrew bb68990
Add groups VRT, use fixed future date for test data
mwtrew 7789f09
Remove unused imports
mwtrew ace35cd
Remove sample Cypress fixtures file
mwtrew 51db4e9
Add Set Assignments VRTs
mwtrew 7543d9f
Add Cypress downloads to gitignore
mwtrew b21b9a6
Cache webpack output to speed up local dev and VRTs
mwtrew 184e12c
Revert common webpack config, create derived Cypress configs
mwtrew ac9ded2
Remove unused imports
mwtrew 8e22e06
Add Windows support for Cypress VRTs
mwtrew eeb7f8f
Fix site and update baseline vars, remove unused imports
mwtrew 0fb9f40
Rename docker entrypoint
mwtrew fd0d835
Use python3 in package.json call to suit MacOS & WSL
mwtrew fc754e0
Restore common webpack config
mwtrew 634fafc
Merge branch 'master' of github.com:isaacphysics/isaac-react-app into…
mwtrew de1cba4
Update VRT baselines
mwtrew File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Cypress visual regression tests | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
cypress-run: | ||
runs-on: ubuntu-22.04 | ||
container: | ||
# This must stay in sync with the image used by the test-{site}-visual scripts in package.json. | ||
image: cypress/browsers:node-20.14.0-chrome-125.0.6422.141-1-ff-126.0.1-edge-125.0.2535.85-1 | ||
options: --user 1001 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Cypress run (Ada) | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
component: true | ||
browser: chrome | ||
env: | ||
CYPRESS_SITE: ada | ||
- name: Cypress run (Physics) | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
component: true | ||
browser: chrome | ||
env: | ||
CYPRESS_SITE: phy | ||
- name: Upload artifacts | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: visual-diffs | ||
path: src/test/**/*.diff.png |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* eslint-disable */ | ||
const path = require('path'); | ||
const configAda = require('./webpack.config.ada'); | ||
const {merge} = require('webpack-merge'); | ||
|
||
module.exports = env => { | ||
let configAdaCypress = { | ||
cache: {type: 'filesystem', name: 'cs'}, | ||
}; | ||
|
||
return merge(configAda({...env, isRenderer: false, prod: false}), configAdaCypress); | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.