Skip to content

Commit 0b1d8f8

Browse files
Update dependency cypress to 7.3.0 (#490)
1 parent b34082b commit 0b1d8f8

File tree

4 files changed

+186
-141
lines changed

4 files changed

+186
-141
lines changed

.circleci/config.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ executors:
2121
image: "windows-server-2019-vs2019:stable"
2222
resource_class: "windows.medium"
2323
shell: "bash.exe"
24+
browsers:
25+
docker:
26+
- image: 'cypress/browsers:node14.16.0-chrome90-ff88'
2427

2528
jobs:
2629
win-test:
@@ -141,7 +144,7 @@ jobs:
141144
path: cypress\videos
142145

143146
release:
144-
executor: cypress/base-10
147+
executor: cypress/base-14
145148
steps:
146149
- attach_workspace:
147150
at: ~/
@@ -233,7 +236,7 @@ workflows:
233236
requires:
234237
- Linux install
235238
# use executor with Chrome installed
236-
executor: cypress/browsers-chrome76
239+
executor: browsers
237240
# use browser "chrome" for running tests
238241
browser: chrome
239242
record: true
@@ -249,7 +252,7 @@ workflows:
249252
requires:
250253
- Linux install
251254
# use executor with Chrome installed
252-
executor: cypress/browsers-chrome73-ff68
255+
executor: browsers
253256
# use browser "chrome" for running tests
254257
browser: firefox
255258
record: true

cypress/plugins/index.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,22 @@
1717
*/
1818
// eslint-disable-next-line no-unused-vars
1919
module.exports = (on, config) => {
20-
// `on` is used to hook into various events Cypress emits
21-
// `config` is the resolved Cypress config
20+
on('before:browser:launch', (browser, launchOptions) => {
21+
if (browser.name === 'chrome' && browser.isHeadless) {
22+
launchOptions.args.push('--window-size=1280,720')
23+
launchOptions.args.push('--force-device-scale-factor=1')
24+
}
25+
26+
if (browser.name === 'electron' && browser.isHeadless) {
27+
launchOptions.preferences.width = 1280
28+
launchOptions.preferences.height = 720
29+
}
30+
31+
if (browser.name === 'firefox' && browser.isHeadless) {
32+
launchOptions.args.push('--width=1280')
33+
launchOptions.args.push('--height=720')
34+
}
35+
36+
return launchOptions
37+
})
2238
}

0 commit comments

Comments
 (0)