Low hanging lint frontend tests (#4695)

* lint: low hanging specs/alphabet.js

* lint: low hanging specs/authorship_of_editions.js

* lint: low hanging specs/bold.js

* lint: low hanging specs/caret.js

* lint: low hanging specs/change_user_color.js

* lint: low hanging specs/change_user_name.js

* lint: low hanging specs/chat.js

* lint: low hanging specs/chat_load_messages.js

* lint: low hanging specs/clear_authorship_colors.js

* lint: low hanging specs/delete.js

* lint: low hanging specs/drag_and_drop.js

* lint: low hanging specs/embed_value.js

* lint: low hanging specs/enter.js

* lint: low hanging specs/font_type.js

* lint: low hanging specs/helper.js

* lint: low hanging specs/importexport.js

* lint: low hanging specs/importindents.js

* lint: low hanging specs/indentation.js

* lint: low hanging specs/italic.js

* lint: low hanging specs/language.js

* lint: low hanging specs/multiple_authors_clear_authorship_colors.js

* lint: low hanging specs/ordered_list.js

* lint: low hanging specs/pad_modal.js

* lint: low hanging specs/redo.js

* lint: low hanging specs/responsiveness.js

* lint: low hanging specs/select_formatting_buttons.js

* lint: low hanging specs/strikethrough.js

* lint: low hanging specs/timeslider.js

* lint: low hanging specs/timeslider_labels.js

* lint: low hanging specs/timeslider_numeric_padID.js

* lint: low hanging specs/timeslider_revisions.js

* lint: low hanging specs/undo.js

* lint: low hanging specs/unordered_list.js

* lint: low hanging specs/xxauto_reconnect.js

* lint: attempt to do remote_runner.js

* lint: helper linting

* lint: rate limit linting

* use constructor for Event to make eslint happier

* for squash: lint fix refinements

* for squash: lint fix refinements

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
This commit is contained in:
John McLear 2021-02-01 20:23:14 +00:00 committed by GitHub
parent 759e2aaec3
commit 915849b319
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 595 additions and 357 deletions

View file

@ -1,10 +1,13 @@
'use strict';
describe('Chat messages and UI', function () {
// create a new pad before each test run
beforeEach(function (cb) {
helper.newPad(cb);
});
it('opens chat, sends a message, makes sure it exists on the page and hides chat', async function () {
it('opens chat, sends a message, makes sure it exists ' +
'on the page and hides chat', async function () {
const chatValue = 'JohnMcLear';
await helper.showChat();
@ -31,7 +34,8 @@ describe('Chat messages and UI', function () {
await helper.showChat();
await helper.sendChatMessage(`{enter}${chatValue}{enter}`); // simulate a keypress of typing enter, mluto and enter (to send 'mluto')
// simulate a keypress of typing enter, mluto and enter (to send 'mluto')
await helper.sendChatMessage(`{enter}${chatValue}{enter}`);
const chat = helper.chatTextParagraphs();
@ -44,7 +48,8 @@ describe('Chat messages and UI', function () {
expect(chat.text()).to.be(`${username}${time} ${chatValue}`);
});
it('makes chat stick to right side of the screen via settings, remove sticky via settings, close it', async function () {
it('makes chat stick to right side of the screen via settings, ' +
'remove sticky via settings, close it', async function () {
await helper.showSettings();
await helper.enableStickyChatviaSettings();
@ -60,7 +65,8 @@ describe('Chat messages and UI', function () {
expect(helper.isChatboxShown()).to.be(false);
});
it('makes chat stick to right side of the screen via icon on the top right, remove sticky via icon, close it', async function () {
it('makes chat stick to right side of the screen via icon on the top' +
' right, remove sticky via icon, close it', async function () {
await helper.showChat();
await helper.enableStickyChatviaIcon();
@ -76,10 +82,9 @@ describe('Chat messages and UI', function () {
expect(helper.isChatboxShown()).to.be(false);
});
xit('Checks showChat=false URL Parameter hides chat then when removed it shows chat', function (done) {
xit('Checks showChat=false URL Parameter hides chat then' +
' when removed it shows chat', function (done) {
this.timeout(60000);
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;
setTimeout(() => { // give it a second to save the username on the server side
helper.newPad({ // get a new pad, but don't clear the cookies