Add failing spec for window size after restore
authorSamuel Attard <samuel.r.attard@gmail.com>
Tue, 22 Nov 2016 04:49:47 +0000 (15:49 +1100)
committerSamuel Attard <samuel.r.attard@gmail.com>
Tue, 22 Nov 2016 04:49:47 +0000 (15:49 +1100)
spec/api-browser-window-spec.js

index a0425d7..83a9ed8 100644 (file)
@@ -1754,6 +1754,25 @@ describe('browser-window module', function () {
       })
     })
   })
+
+  describe.only('minWidth', function () {
+    beforeEach(function () {
+      if (w != null) w.destroy()
+      w = new BrowserWindow({
+        minWidth: 800,
+        width: 800
+      })
+    })
+
+    it('should persist when restoring the window', function (done) {
+      w.minimize();
+      setTimeout(() => {
+        w.restore();
+        assert.equal(w.getSize()[0], 800);
+        done();
+      }, 200);
+    })
+  })
 })
 
 const assertBoundsEqual = (actual, expect) => {