File tree 3 files changed +17
-2
lines changed
3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,19 @@ _connectToChromeRemoteInterface = (port) ->
159
159
debug (" received wsUrl %s for port %d" , wsUrl, port)
160
160
161
161
CriClient .create (wsUrl)
162
+ .then (client) ->
163
+ if process .env .CYPRESS_FORCE_BROWSER_SCALE
164
+ client .send (' Emulation.setDeviceMetricsOverride' , {
165
+ width : 1280 ,
166
+ height : 720 ,
167
+ deviceScaleFactor : 1 ,
168
+ mobile : false ,
169
+ screenWidth : 1280 ,
170
+ screenHeight : 720 ,
171
+ }).then ->
172
+ client
173
+
174
+ client
162
175
163
176
_maybeRecordVideo = (options ) ->
164
177
return (client ) ->
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ module.exports = {
56
56
# # then display a warning to the user
57
57
if not options .invokedFromCli
58
58
warning (" INVOKED_BINARY_OUTSIDE_NPM_MODULE" )
59
-
59
+
60
60
# # just run the gui code directly here
61
61
# # and pass our options directly to main
62
62
debug (" running Electron currently" )
@@ -131,7 +131,7 @@ module.exports = {
131
131
132
132
options = require (" ./util/args" ).toObject (argv)
133
133
134
- if options .runProject and not options .headed
134
+ if ( options .runProject and not options .headed ) or process . env . CYPRESS_FORCE_BROWSER_SCALE
135
135
# scale the electron browser window
136
136
# to force retina screens to not
137
137
# upsample their images when offscreen
Original file line number Diff line number Diff line change @@ -210,6 +210,8 @@ module.exports = {
210
210
# # can take a long time (5-15 secs)
211
211
@ timeout (human (" 2 minutes" ))
212
212
213
+ process .env .CYPRESS_FORCE_BROWSER_SCALE = ' 1'
214
+
213
215
Fixtures .scaffold ()
214
216
215
217
sinon .stub (process , " exit" )
You can’t perform that action at this time.
0 commit comments