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,6 +1,8 @@
function deletecookie(name) {
'use strict';
const deletecookie = (name) => {
document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
}
};
describe('Language select and change', function () {
// Destroy language cookies
@ -14,7 +16,6 @@ describe('Language select and change', function () {
// Destroy language cookies
it('makes text german', function (done) {
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;
// click on the settings button to make settings visible
@ -29,7 +30,7 @@ describe('Language select and change', function () {
$languageoption.attr('selected', 'selected');
$language.change();
helper.waitFor(() => chrome$('.buttonicon-bold').parent()[0].title == 'Fett (Strg-B)')
helper.waitFor(() => chrome$('.buttonicon-bold').parent()[0].title === 'Fett (Strg-B)')
.done(() => {
// get the value of the bold button
const $boldButton = chrome$('.buttonicon-bold').parent();
@ -44,7 +45,6 @@ describe('Language select and change', function () {
});
it('makes text English', function (done) {
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;
// click on the settings button to make settings visible
@ -60,7 +60,7 @@ describe('Language select and change', function () {
// get the value of the bold button
const $boldButton = chrome$('.buttonicon-bold').parent();
helper.waitFor(() => $boldButton[0].title != 'Fett (Strg+B)')
helper.waitFor(() => $boldButton[0].title !== 'Fett (Strg+B)')
.done(() => {
// get the value of the bold button
const $boldButton = chrome$('.buttonicon-bold').parent();
@ -75,7 +75,6 @@ describe('Language select and change', function () {
});
it('changes direction when picking an rtl lang', function (done) {
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;
// click on the settings button to make settings visible
@ -91,7 +90,7 @@ describe('Language select and change', function () {
$language.val('ar');
$languageoption.change();
helper.waitFor(() => chrome$('html')[0].dir != 'ltr')
helper.waitFor(() => chrome$('html')[0].dir !== 'ltr')
.done(() => {
// check if the document's direction was changed
expect(chrome$('html')[0].dir).to.be('rtl');
@ -100,7 +99,6 @@ describe('Language select and change', function () {
});
it('changes direction when picking an ltr lang', function (done) {
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;
// click on the settings button to make settings visible
@ -117,7 +115,7 @@ describe('Language select and change', function () {
$language.val('en');
$languageoption.change();
helper.waitFor(() => chrome$('html')[0].dir != 'rtl')
helper.waitFor(() => chrome$('html')[0].dir !== 'rtl')
.done(() => {
// check if the document's direction was changed
expect(chrome$('html')[0].dir).to.be('ltr');