From e4754eb9dfb1ca032eacd1fbea06a62d07ed7190 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 1 Apr 2021 22:29:31 -0400 Subject: [PATCH] tests: Fix race in `timeslider_revisions.js` --- src/tests/frontend/specs/timeslider_revisions.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tests/frontend/specs/timeslider_revisions.js b/src/tests/frontend/specs/timeslider_revisions.js index 24b3ce4b1..03a05b236 100644 --- a/src/tests/frontend/specs/timeslider_revisions.js +++ b/src/tests/frontend/specs/timeslider_revisions.js @@ -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')