tests: Fix race in `timeslider_revisions.js`

pull/4989/head
Richard Hansen 2021-04-01 22:29:31 -04:00 committed by webzwo0i
parent 27e5373050
commit e4754eb9df
1 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,9 @@ describe('timeslider', function () {
// Create a bunch of revisions.
for (let i = 0; i < 99; i++) await helper.edit('a');
chrome$('.buttonicon-savedRevision').click();
await helper.waitForPromise(() => helper.padChrome$('.saved-revision').length > 0);
// Give some time to send the SAVE_REVISION message to the server before navigating away.
await new Promise((resolve) => setTimeout(resolve, 100));
// go to timeslider
$('#iframe-container iframe')