Skip to content

Commit

Permalink
Merge pull request scratchfoundation#1004 from paulkaplan/force-test-…
Browse files Browse the repository at this point in the history
…window-size

Force 1024x768 window size for automated tests
  • Loading branch information
paulkaplan committed Dec 6, 2017
2 parents 75f2748 + dea5396 commit b698115
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/helpers/selenium-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,17 @@ class SeleniumHelper {
}

loadUri (uri) {
const WINDOW_WIDTH = 1024;
const WINDOW_HEIGHT = 768;
return this.driver
.get(`file://${uri}`)
.then(() => (
this.driver.executeScript('window.onbeforeunload = undefined;')
))
.then(() => (
this.driver.manage()
.window()
.setSize(WINDOW_WIDTH, WINDOW_HEIGHT)
));
}

Expand Down

0 comments on commit b698115

Please sign in to comment.