mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 22:23:33 +01:00
tests: Wait for commit instead of sleep in timeslider_revisions.js
This commit is contained in:
parent
d15ff9ce8d
commit
7a154b1e1d
1 changed files with 4 additions and 21 deletions
|
@ -9,18 +9,10 @@ describe('timeslider', function () {
|
||||||
|
|
||||||
it('loads adds a hundred revisions', async function () {
|
it('loads adds a hundred revisions', async function () {
|
||||||
this.timeout(100000);
|
this.timeout(100000);
|
||||||
const inner$ = helper.padInner$;
|
|
||||||
const chrome$ = helper.padChrome$;
|
const chrome$ = helper.padChrome$;
|
||||||
|
|
||||||
// make some changes to produce 100 revisions
|
// Create a bunch of revisions.
|
||||||
const timePerRev = 900;
|
for (let i = 0; i < 99; i++) await helper.edit('a');
|
||||||
const revs = 99;
|
|
||||||
this.timeout(revs * timePerRev + 10000);
|
|
||||||
for (let i = 0; i < revs; i++) {
|
|
||||||
await new Promise((resolve) => setTimeout(resolve, timePerRev));
|
|
||||||
// enter 'a' in the first text element
|
|
||||||
inner$('div').first().sendkeys('a');
|
|
||||||
}
|
|
||||||
chrome$('.buttonicon-savedRevision').click();
|
chrome$('.buttonicon-savedRevision').click();
|
||||||
|
|
||||||
// go to timeslider
|
// go to timeslider
|
||||||
|
@ -65,17 +57,8 @@ describe('timeslider', function () {
|
||||||
|
|
||||||
// Disabled as jquery trigger no longer works properly
|
// Disabled as jquery trigger no longer works properly
|
||||||
xit('changes the url when clicking on the timeslider', async function () {
|
xit('changes the url when clicking on the timeslider', async function () {
|
||||||
const inner$ = helper.padInner$;
|
// Create some revisions.
|
||||||
|
for (let i = 0; i < 20; i++) await helper.edit('a');
|
||||||
// make some changes to produce 7 revisions
|
|
||||||
const timePerRev = 1000;
|
|
||||||
const revs = 20;
|
|
||||||
this.timeout(revs * timePerRev + 10000);
|
|
||||||
for (let i = 0; i < revs; i++) {
|
|
||||||
await new Promise((resolve) => setTimeout(resolve, timePerRev));
|
|
||||||
// enter 'a' in the first text element
|
|
||||||
inner$('div').first().sendkeys('a');
|
|
||||||
}
|
|
||||||
|
|
||||||
// go to timeslider
|
// go to timeslider
|
||||||
$('#iframe-container iframe')
|
$('#iframe-container iframe')
|
||||||
|
|
Loading…
Reference in a new issue