diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index 83a9ed8d49a5..b44e2a5093bb 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -1755,7 +1755,7 @@ describe('browser-window module', function () { }) }) - describe.only('minWidth', function () { + describe('minWidth', function () { beforeEach(function () { if (w != null) w.destroy() w = new BrowserWindow({ @@ -1764,7 +1764,7 @@ describe('browser-window module', function () { }) }) - it('should persist when restoring the window', function (done) { + it('should not affect the bounds when restoring the window', function (done) { w.minimize(); setTimeout(() => { w.restore(); @@ -1773,6 +1773,23 @@ describe('browser-window module', function () { }, 200); }) }) + + describe.only('window position', function () { + beforeEach(function () { + if (w != null) w.destroy() + w = new BrowserWindow() + }) + + it('should not affect the bounds when restoring the window', function (done) { + const originalPos = w.getPosition(); + w.maximize(); + setTimeout(() => { + w.unmaximize(); + assertBoundsEqual(originalPos, w.getPosition()); + done(); + }, 200); + }) + }) }) const assertBoundsEqual = (actual, expect) => {