@@ -220,20 +220,20 @@ describe('VisualRegressionLauncher - custom compare method & hooks', function ()
220
220
221
221
beforeEach ( function ( ) {
222
222
spy ( browser , 'pause' ) ;
223
- spy ( browser , 'windowHandleSize ' ) ;
223
+ spy ( browser , 'setViewportSize ' ) ;
224
224
} ) ;
225
225
226
226
afterEach ( function ( ) {
227
227
browser . pause . restore ( ) ;
228
- browser . windowHandleSize . restore ( ) ;
228
+ browser . setViewportSize . restore ( ) ;
229
229
} ) ;
230
230
231
231
it ( 'uses a custom delay passed in constructor options' , async function ( ) {
232
232
await browser . checkViewport ( {
233
233
widths : [ 500 ] ,
234
234
} ) ;
235
235
236
- assert . isTrue ( browser . pause . calledAfter ( browser . windowHandleSize ) , 'browser.pause should have been after windowHandleSize ' ) ;
236
+ assert . isTrue ( browser . pause . calledAfter ( browser . setViewportSize ) , 'browser.pause should have been after setViewportSize ' ) ;
237
237
assert . isTrue ( browser . pause . calledWith ( 250 ) , 'browser.pause should have been called called with 250' ) ;
238
238
} ) ;
239
239
@@ -243,27 +243,27 @@ describe('VisualRegressionLauncher - custom compare method & hooks', function ()
243
243
viewportChangePause : 1500 ,
244
244
} ) ;
245
245
246
- assert . isTrue ( browser . pause . calledAfter ( this . beforeScreenshotStub ) , 'browser.pause should have been called after windowHandleSize ' ) ;
246
+ assert . isTrue ( browser . pause . calledAfter ( browser . setViewportSize ) , 'browser.pause should have been called after setViewportSize ' ) ;
247
247
assert . isTrue ( browser . pause . calledWith ( 1500 ) , 'browser.pause should have been called with 1500' ) ;
248
248
} ) ;
249
249
} ) ;
250
250
251
251
context ( 'widths' , function ( ) {
252
252
253
253
beforeEach ( function ( ) {
254
- spy ( browser , 'windowHandleSize ' ) ;
254
+ spy ( browser , 'setViewportSize ' ) ;
255
255
} ) ;
256
256
257
257
afterEach ( function ( ) {
258
- browser . windowHandleSize . restore ( ) ;
258
+ browser . setViewportSize . restore ( ) ;
259
259
} ) ;
260
260
261
261
it ( 'uses width passed in constructor options' , async function ( ) {
262
262
const expectedWidth = browser . options . visualRegression . widths [ 0 ] ;
263
263
await browser . checkViewport ( ) ;
264
264
265
- const { width } = browser . windowHandleSize . args [ 0 ] [ 0 ] ;
266
- assert . strictEqual ( width , expectedWidth , 'browser.windowHandleSize should have been called with global value' ) ;
265
+ const { width } = browser . setViewportSize . args [ 0 ] [ 0 ] ;
266
+ assert . strictEqual ( width , expectedWidth , 'browser.setViewportSize should have been called with global value' ) ;
267
267
} ) ;
268
268
269
269
it ( 'uses a custom width passed in command options' , async function ( ) {
@@ -273,8 +273,8 @@ describe('VisualRegressionLauncher - custom compare method & hooks', function ()
273
273
widths : [ expectedWidth ] ,
274
274
} ) ;
275
275
276
- const { width } = browser . windowHandleSize . args [ 0 ] [ 0 ] ;
277
- assert . strictEqual ( width , expectedWidth , 'browser.windowHandleSize should have been called with custom value' ) ;
276
+ const { width } = browser . setViewportSize . args [ 0 ] [ 0 ] ;
277
+ assert . strictEqual ( width , expectedWidth , 'browser.setViewportSize should have been called with custom value' ) ;
278
278
} ) ;
279
279
} ) ;
280
280
0 commit comments