Skip to content
Snippets Groups Projects
Commit b1178066 authored by Josiah Neuberger's avatar Josiah Neuberger
Browse files

fixed "Load Project (fullscreen) integration test.

  ** This test was failing because using window.miximize() on the
     chromedriver would hang indefinitely. This seems to be a bug
     introduced in chrome stable 60+. relevant bug report:

     https://bugs.chromium.org/p/chromedriver/issues/detail?id=1901

  1. Updated test to use workaround: setSize(1920, 1080).

  2. Updated test to restore driver to previous size so any unit test
     run after this one will be run in the default browser size.
parent a34d68b9
No related branches found
No related tags found
No related merge requests found
......@@ -77,9 +77,13 @@ describe('costumes, sounds and variables', () => {
});
test('Load a project by ID (fullscreen)', async () => {
const prevSize = driver.manage()
.window()
.getSize();
await new Promise(resolve => setTimeout(resolve, 2000));
driver.manage()
.window()
.maximize();
.setSize(1920, 1080);
const projectId = '96708228';
await driver.get(`file://${uri}#${projectId}`);
await new Promise(resolve => setTimeout(resolve, 2000));
......@@ -87,6 +91,11 @@ describe('costumes, sounds and variables', () => {
await clickXpath('//img[@title="Go"]');
await new Promise(resolve => setTimeout(resolve, 2000));
await clickXpath('//img[@title="Stop"]');
prevSize.then(value => {
driver.manage()
.window()
.setSize(value.width, value.height);
});
const logs = await getLogs(errorWhitelist);
await expect(logs).toEqual([]);
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment