mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
adminsettings test: Fix restart detection
We cannot guarantee that the system time on SauceLabs and Github is in sync. In case the SauceLabs runner's clock is slow the test would have failed.
This commit is contained in:
parent
d262e31bbf
commit
cc6fda6916
1 changed files with 4 additions and 4 deletions
|
@ -69,15 +69,15 @@ describe('Admin > Settings', function () {
|
|||
return null;
|
||||
}
|
||||
};
|
||||
let oldStartTime;
|
||||
await helper.waitForPromise(async () => {
|
||||
const startTime = await getStartTime();
|
||||
return startTime != null && startTime > 0 && Date.now() > startTime;
|
||||
oldStartTime = await getStartTime();
|
||||
return oldStartTime != null && oldStartTime > 0;
|
||||
}, 1000, 500);
|
||||
const clickTime = Date.now();
|
||||
helper.admin$('#restartEtherpad').click();
|
||||
await helper.waitForPromise(async () => {
|
||||
const startTime = await getStartTime();
|
||||
return startTime != null && startTime >= clickTime;
|
||||
return startTime != null && startTime > oldStartTime;
|
||||
}, 60000, 500);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue