lint: lint and various fixes of frontend test specs

This commit is contained in:
John McLear 2021-02-07 06:39:03 +00:00 committed by GitHub
parent da10d42183
commit f8a19c4527
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 261 additions and 240 deletions

View file

@ -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);
});
});
});