Skip to content

Commit 04be7fa

Browse files
author
Janne Rönkkö
committed
Use Chrome for testing in E2E tests
1 parent befb834 commit 04be7fa

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
build_arm64_image: true
6767
file: Dockerfile.cypress
6868
build_args: |
69-
CHROME_VERSION=${{ needs.set_variables.outputs.chrome_version }}
69+
CHROME_FOR_TESTING_VERSION=142.0.7444.59
7070
secrets:
7171
azure_client_id: ${{ secrets.AZURE_CLIENT_ID }}
7272
azure_tenant_id: ${{ secrets.AZURE_TENANT_ID }}

cypress/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"ts:check": "yarn tsc --noEmit",
1010
"ts:build": "yarn tsc --build",
1111
"qa": "yarn --frozen-lockfile && yarn ts:check && yarn prettier:check",
12-
"cy:run": "CYPRESS_BASE_URL=${CYPRESS_BASE_URL:-http://localhost:3300} cypress run --browser chrome",
13-
"cy:run:video": "CYPRESS_BASE_URL=${CYPRESS_BASE_URL:-http://localhost:3300} cypress run --browser chrome --config-file ./cypress.config.video.ts"
12+
"cy:run": "CYPRESS_BASE_URL=${CYPRESS_BASE_URL:-http://localhost:3300} cypress run --browser chrome-for-testing",
13+
"cy:run:video": "CYPRESS_BASE_URL=${CYPRESS_BASE_URL:-http://localhost:3300} cypress run --browser chrome-for-testing --config-file ./cypress.config.video.ts"
1414
},
1515
"dependencies": {
1616
"@4tw/cypress-drag-drop": "^2.2.5",

cypress/support/launchBrowser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function setHeadlessBrowserScreenSizeLaunchOptions(
2323
): Cypress.BeforeBrowserLaunchOptions {
2424
console.log('Setting the browser window size to %d x %d', width, height);
2525

26-
if (browser.name === 'chrome') {
26+
if (browser.name === 'chrome-for-testing') {
2727
return {
2828
...launchOptions,
2929
args: launchOptions.args.concat(
@@ -104,7 +104,7 @@ function applyReducedMotionOptions(
104104
browser: Cypress.Browser,
105105
launchOptions: Cypress.BeforeBrowserLaunchOptions,
106106
): Cypress.BeforeBrowserLaunchOptions {
107-
if (browser.name === 'chrome') {
107+
if (browser.name === 'chrome-for-testing') {
108108
return {
109109
...launchOptions,
110110
args: launchOptions.args.concat('--force-prefers-reduced-motion'),

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"lint": "eslint './**/*.{ts,tsx}' './ui/src/locales/**/*.json' --max-warnings=0",
2222
"test": "yarn ws:ui test:unit",
2323
"test:integration": "yarn ws:ui test:integration",
24-
"test:e2e": "yarn ws:db build && yarn ws:tdi timetables-data-inserter:build && CYPRESS=true yarn ws:e2e cypress run --browser chrome",
24+
"test:e2e": "yarn ws:db build && yarn ws:tdi timetables-data-inserter:build && CYPRESS=true yarn ws:e2e cypress run --browser chrome-for-testing",
2525
"test:e2e:fast": "yarn test:e2e --config-file cypress.config.fast.ts",
2626
"test:e2e:open": "yarn check-hasura-metadata --e2e && yarn ws:db build && yarn ws:tdi timetables-data-inserter:build && CYPRESS=true yarn ws:e2e cypress open",
2727
"test:e2e:list": "yarn ws:e2e print-tests 'e2e/**.cy.ts'",

0 commit comments

Comments
 (0)