From 4ae400068251a9eae00694ffa986623a01803bec Mon Sep 17 00:00:00 2001 From: Paul Kaplan <pkaplan@media.mit.edu> Date: Mon, 4 Feb 2019 11:51:10 -0500 Subject: [PATCH] Remove beforeunload callback that was breaking tests --- test/integration/localization.test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/integration/localization.test.js b/test/integration/localization.test.js index e7cc64e90..8c92ee161 100644 --- a/test/integration/localization.test.js +++ b/test/integration/localization.test.js @@ -49,6 +49,9 @@ describe('Localization', () => { // After switching languages, make sure Apple sprite still exists await rightClickText('Apple', scope.spriteTile); // Make sure it is there + // Remounting re-attaches the beforeunload callback. Make sure to remove it + driver.executeScript('window.onbeforeunload = undefined;'); + const logs = await getLogs(); await expect(logs).toEqual([]); }); -- GitLab