Skip to content

Commit

Permalink
Update dependency cypress to 7.3.0 (#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifer-shehane authored May 20, 2021
1 parent b34082b commit 0b1d8f8
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 141 deletions.
9 changes: 6 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ executors:
image: "windows-server-2019-vs2019:stable"
resource_class: "windows.medium"
shell: "bash.exe"
browsers:
docker:
- image: 'cypress/browsers:node14.16.0-chrome90-ff88'

jobs:
win-test:
Expand Down Expand Up @@ -141,7 +144,7 @@ jobs:
path: cypress\videos

release:
executor: cypress/base-10
executor: cypress/base-14
steps:
- attach_workspace:
at: ~/
Expand Down Expand Up @@ -233,7 +236,7 @@ workflows:
requires:
- Linux install
# use executor with Chrome installed
executor: cypress/browsers-chrome76
executor: browsers
# use browser "chrome" for running tests
browser: chrome
record: true
Expand All @@ -249,7 +252,7 @@ workflows:
requires:
- Linux install
# use executor with Chrome installed
executor: cypress/browsers-chrome73-ff68
executor: browsers
# use browser "chrome" for running tests
browser: firefox
record: true
Expand Down
20 changes: 18 additions & 2 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@
*/
// eslint-disable-next-line no-unused-vars
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
on('before:browser:launch', (browser, launchOptions) => {
if (browser.name === 'chrome' && browser.isHeadless) {
launchOptions.args.push('--window-size=1280,720')
launchOptions.args.push('--force-device-scale-factor=1')
}

if (browser.name === 'electron' && browser.isHeadless) {
launchOptions.preferences.width = 1280
launchOptions.preferences.height = 720
}

if (browser.name === 'firefox' && browser.isHeadless) {
launchOptions.args.push('--width=1280')
launchOptions.args.push('--height=720')
}

return launchOptions
})
}
Loading

0 comments on commit 0b1d8f8

Please sign in to comment.