Skip to content

Commit b35ac19

Browse files
author
Philipp Menke
committed
Fix tests
1 parent 7eb2204 commit b35ac19

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/wdio/VisualRegressionLauncher.test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -220,20 +220,20 @@ describe('VisualRegressionLauncher - custom compare method & hooks', function ()
220220

221221
beforeEach(function () {
222222
spy(browser, 'pause');
223-
spy(browser, 'windowHandleSize');
223+
spy(browser, 'setViewportSize');
224224
});
225225

226226
afterEach(function () {
227227
browser.pause.restore();
228-
browser.windowHandleSize.restore();
228+
browser.setViewportSize.restore();
229229
});
230230

231231
it('uses a custom delay passed in constructor options', async function () {
232232
await browser.checkViewport({
233233
widths: [500],
234234
});
235235

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');
237237
assert.isTrue(browser.pause.calledWith(250), 'browser.pause should have been called called with 250');
238238
});
239239

@@ -243,7 +243,7 @@ describe('VisualRegressionLauncher - custom compare method & hooks', function ()
243243
viewportChangePause: 1500,
244244
});
245245

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');
247247
assert.isTrue(browser.pause.calledWith(1500), 'browser.pause should have been called with 1500');
248248
});
249249
});

0 commit comments

Comments
 (0)