Skip to content
This repository was archived by the owner on Sep 21, 2022. It is now read-only.

Commit 5006927

Browse files
committed
feat(new-browser): change default value for resetZoom
1 parent b9c77e7 commit 5006927

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/browser/new-browser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,14 @@ module.exports = class NewBrowser extends Browser {
185185
}
186186

187187
openRelative(relativeURL) {
188-
return this.open(this.config.getAbsoluteUrl(relativeURL));
188+
return this.open(this.config.getAbsoluteUrl(relativeURL), {resetZoom: true});
189189
}
190190

191191
// Zoom reset should be skipped before calibration cause we're unable to build client scripts before
192192
// calibration done. Reset will be executed as 1 of calibration steps.
193193
open(url, params) {
194194
params = _.defaults(params || {}, {
195-
resetZoom: true
195+
resetZoom: false
196196
});
197197

198198
return this._wd.get(url)

test/unit/browser/new-browser.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,14 +304,14 @@ describe('browser/new-browser', () => {
304304
.then(() => assert.calledWith(wd.get, 'http://www.example.com'));
305305
});
306306

307-
it('should reset page zoom by default', () => {
307+
it('should not reset page zoom by default', () => {
308308
return open(browser, {url: 'http://www.example.com'})
309-
.then(() => assert.calledWith(ClientBridge.prototype.call, 'resetZoom'));
309+
.then(() => assert.neverCalledWith(ClientBridge.prototype.call, 'resetZoom'));
310310
});
311311

312-
it('should not reset page zoom if `resetZoom` param passed as false', () => {
313-
return open(browser, {url: 'http://www.example.com', resetZoom: false})
314-
.then(() => assert.neverCalledWith(ClientBridge.prototype.call, 'resetZoom'));
312+
it('should reset page zoom if `resetZoom` param passed as true', () => {
313+
return open(browser, {url: 'http://www.example.com', resetZoom: true})
314+
.then(() => assert.calledWith(ClientBridge.prototype.call, 'resetZoom'));
315315
});
316316
});
317317

0 commit comments

Comments
 (0)