Skip to content

Commit

Permalink
Merge pull request #3 from Janesh98/Janesh98-patch-1
Browse files Browse the repository at this point in the history
Fix Cypress Chrome 117 bug
  • Loading branch information
Janesh98 authored Sep 25, 2023
2 parents 9a895ba + b57eabf commit 65115cc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Prod E2E
on:
workflow_dispatch:
schedule:
# runs tests every monday at 10am
- cron: '0 10 * * MON'
Expand All @@ -23,4 +24,4 @@ jobs:
run: |
chmod +x ./src/e2e/email-test.sh
./src/e2e/email-test.sh
shell: bash
shell: bash
14 changes: 14 additions & 0 deletions src/e2e/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ module.exports = defineConfig({
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
// chrome 117 bug fix, https://github.com/cypress-io/cypress-documentation/issues/5479
on('before:browser:launch', (browser = {}, launchOptions) => {
if (browser.name === 'chrome' && browser.isHeadless) {
launchOptions.args = launchOptions.args.map((arg) => {
if (arg === '--headless') {
return '--headless=new'
}

return arg
})
}

return launchOptions
})
return require('./cypress/plugins/index.js')(on, config);
},
baseUrl: 'https://coding-test-platform.web.app',
Expand Down

0 comments on commit 65115cc

Please sign in to comment.