Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Don't assume unmaximized for tests
Browse files Browse the repository at this point in the history
Ubuntu maximizes applications by default on first run.  Tests should not assume window is not maximized. Resizes don't work when a window is maximized.

Fix #6554
  • Loading branch information
bbondy committed Jan 15, 2017
1 parent 0ece625 commit 9a98903
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/components/windowTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ describe('application window', function () {
yield this.app.client
.waitForUrl(Brave.newTabUrl)
.windowByIndex(0)
.unmaximize()
.resizeWindow(600, 700)
.waitUntil(function () {
return this.getAppState().then((val) => {
Expand Down
6 changes: 6 additions & 0 deletions test/lib/brave.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ var exports = {
}, message, ...param).then((response) => response.value)
})

this.app.client.addCommand('unmaximize', function () {
return this.execute(function () {
return devTools('electron').remote.getCurrentWindow().unmaximize()
}).then((response) => response.value)
})

this.app.client.addCommand('ipcSendRenderer', function (message, ...param) {
return this.execute(function (message, ...param) {
return devTools('electron').ipcRenderer.send(message, ...param)
Expand Down

0 comments on commit 9a98903

Please sign in to comment.