mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-25 18:06:15 -04:00
lint: lint and various fixes of frontend test specs
This commit is contained in:
parent
da10d42183
commit
f8a19c4527
9 changed files with 261 additions and 240 deletions
|
@ -34,9 +34,11 @@ describe('Automatic pad reload on Force Reconnect message', function () {
|
|||
});
|
||||
|
||||
context('and user clicks on Cancel', function () {
|
||||
beforeEach(function () {
|
||||
beforeEach(async function () {
|
||||
const $errorMessageModal = helper.padChrome$('#connectivity .userdup');
|
||||
$errorMessageModal.find('#cancelreconnect').click();
|
||||
await helper.waitForPromise(
|
||||
() => helper.padChrome$('#connectivity .userdup').is(':visible') === true);
|
||||
});
|
||||
|
||||
it('does not show Cancel button nor timer anymore', function (done) {
|
||||
|
@ -54,16 +56,16 @@ describe('Automatic pad reload on Force Reconnect message', function () {
|
|||
context('and user does not click on Cancel until timer expires', function () {
|
||||
let padWasReloaded = false;
|
||||
|
||||
beforeEach(function () {
|
||||
beforeEach(async function () {
|
||||
$originalPadFrame.one('load', () => {
|
||||
padWasReloaded = true;
|
||||
});
|
||||
});
|
||||
|
||||
it('reloads the pad', function (done) {
|
||||
helper.waitFor(() => padWasReloaded, 5000).done(done);
|
||||
helper.waitFor(() => padWasReloaded, 10000).done(done);
|
||||
|
||||
this.timeout(5000);
|
||||
this.timeout(10000);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue