diff --git a/test/components/windowTest.js b/test/components/windowTest.js index 6d6dc6d3a75..3a4b0fece02 100644 --- a/test/components/windowTest.js +++ b/test/components/windowTest.js @@ -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) => { diff --git a/test/lib/brave.js b/test/lib/brave.js index 0dc4afb8ca3..f1bc61c4f0e 100644 --- a/test/lib/brave.js +++ b/test/lib/brave.js @@ -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)