chore(tests): suppress beforeunload to stop spec-runner from quitting over and over [wip]

This commit is contained in:
Zach Bloomquist 2021-08-27 02:11:15 -04:00 committed by Ben Gotow
parent e813727d28
commit 0107398019

View file

@ -120,8 +120,9 @@ class SpecRunner {
}
_setupWindow() {
window.addEventListener('core:close', () => window.close());
window.addEventListener('beforeunload', () => {
window.addEventListener('beforeunload', (e) => {
// TODO(flotwig): figure out a way to stop the tests from quitting prematurely that is not this
e.returnValue = 'foo'
AppEnv.storeWindowDimensions();
AppEnv.saveWindowState();
});