Skip to content

Commit

Permalink
avoid unnecessary screenshots in updater tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Sep 19, 2023
1 parent 0fd1e0f commit 730308e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
4 changes: 2 additions & 2 deletions plugins/Login/tests/UI/Invite_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('Invite', function () {
$('#login_form_submit').click();
});
// should show site without data page
await page.waitForNetworkIdle();
await page.waitForSelector('#site-without-data');
await page.waitForSelector('#site-without-data', {visible: true});
await page.evaluate(() => window.stop()); // stop ongoing requests
});
});

This file was deleted.

3 changes: 0 additions & 3 deletions tests/UI/expected-screenshots/OneClickUpdate_login.png

This file was deleted.

6 changes: 3 additions & 3 deletions tests/UI/specs/OneClickLastForcedUpdate_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ describe("OneClickLastForcedUpdate", function () {
}
}

await page.waitForSelector('#start-tracking-method-list', { visible: true });
await page.waitForNetworkIdle();
expect(await element.screenshot()).to.matchImage('login');
// avoid taking an unnecessary screenshot, as knowing we land on #site-without-data is enough
await page.waitForSelector('#site-without-data', { visible: true });
await page.evaluate(() => window.stop()); // stop ongoing requests
});

it('should have a working cron archiving process', async function () {
Expand Down
6 changes: 3 additions & 3 deletions tests/UI/specs/OneClickUpdate_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ describe("OneClickUpdate", function () {
}
}

await page.waitForSelector('#start-tracking-method-list', { visible: true });
await page.waitForNetworkIdle();
expect(await element.screenshot()).to.matchImage('login');
// avoid taking an unnecessary screenshot, as knowing we land on #site-without-data is enough
await page.waitForSelector('#site-without-data', { visible: true });
await page.evaluate(() => window.stop()); // stop ongoing requests
});

it('should have a working cron archiving process', async function () {
Expand Down

0 comments on commit 730308e

Please sign in to comment.