Skip to content

Commit 777bb6e

Browse files
committed
Use Chrome for visual regression tests
1 parent 24fbde3 commit 777bb6e

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.github/workflows/cypress.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Cypress Tests using Cypress Docker Image
1+
name: Cypress visual regression tests
22

33
on:
44
push:
@@ -20,12 +20,14 @@ jobs:
2020
uses: cypress-io/github-action@v6
2121
with:
2222
component: true
23+
browser: chrome
2324
env:
2425
CYPRESS_SITE: ada
2526
- name: Cypress run (Physics)
2627
uses: cypress-io/github-action@v6
2728
with:
2829
component: true
30+
browser: chrome
2931
env:
3032
CYPRESS_SITE: phy
3133
- name: Upload artifacts

docker-entrypoint-visual-testing.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
yarn install
44
# yarn cypress info
5-
yarn cypress run --component
5+
yarn cypress run --component --browser chrome

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
"start-phy": "webpack-dev-server --hot --port 8004 --history-api-fallback --config config/webpack.config.physics.js --allowed-hosts=true",
6060
"start-ada": "webpack-dev-server --hot --port 8003 --history-api-fallback --config config/webpack.config.ada.js --allowed-hosts=true",
6161
"test": "yarn run test-phy && yarn run test-ada",
62+
"test-visual": "yarn run test-phy-visual && yarn run test-ada-visual",
63+
"test-visual-update-baselines": "yarn run test-phy-visual-update-baseline && yarn run test-ada-visual-update-baseline",
6264
"test-phy": "jest --config config/jest/jest.config.physics.js",
6365
"test-phy-visual": "docker run --platform linux/amd64 --rm -w /tests -v ./docker-entrypoint-visual-testing.sh:/tests/docker-entrypoint-visual-testing.sh -v ./src:/tests/src -v ./package.json:/tests/package.json -v ./yarn.lock:/tests/yarn.lock -v ./tsconfig.json:/tests/tsconfig.json -v ./cypress.config.ts:/tests/cypress.config.ts -v ./cypress:/tests/cypress -v ./config:/tests/config -v ./public:/tests/public -e CYPRESS_SITE='phy' -e CYPRESS_INTERNAL_BROWSER_CONNECT_TIMEOUT=300000 cypress/browsers:node-20.14.0-chrome-125.0.6422.141-1-ff-126.0.1-edge-125.0.2535.85-1 /tests/docker-entrypoint-visual-testing.sh",
6466
"test-phy-visual-update-baseline": "docker run --platform linux/amd64 --rm -w /tests -v ./docker-entrypoint-visual-testing.sh:/tests/docker-entrypoint-visual-testing.sh -v ./src:/tests/src -v ./package.json:/tests/package.json -v ./yarn.lock:/tests/yarn.lock -v ./tsconfig.json:/tests/tsconfig.json -v ./cypress.config.ts:/tests/cypress.config.ts -v ./cypress:/tests/cypress -v ./config:/tests/config -v ./public:/tests/public -e CYPRESS_SITE='phy' -e CYPRESS_INTERNAL_BROWSER_CONNECT_TIMEOUT=300000 cypress/browsers:node-20.14.0-chrome-125.0.6422.141-1-ff-126.0.1-edge-125.0.2535.85-1 /tests/docker-entrypoint-visual-testing.sh --env 'pluginVisualRegressionUpdateImages=true'",

0 commit comments

Comments
 (0)