We would like to be able to change the window size in a test to determine if code handling responsiveness is functioning correctly.
Doing simple window.resizeTo(...) calls does not update the window.innerWidth.
Tying into the Electron remote seems to make it a bit further, but still does not trigger anything. For example:
const currentWindow = require('electron').remote.getCurrentWindow();
currentWindow.setSize(1400, 1000);
console.log(currentWindow.getSize()); // Shows 1400!
console.log(window.innerWidth); // Still is 800
In either case, the resize window eventListener is never called.
Is this possible currently or is there a known defect that disallows this from happening? The draw of using Electron for these types of tests is to use browser APIs, such as this.
We would like to be able to change the window size in a test to determine if code handling responsiveness is functioning correctly.
Doing simple
window.resizeTo(...)
calls does not update thewindow.innerWidth
.Tying into the Electron
remote
seems to make it a bit further, but still does not trigger anything. For example:In either case, the
resize
windoweventListener
is never called.Is this possible currently or is there a known defect that disallows this from happening? The draw of using Electron for these types of tests is to use browser APIs, such as this.