Merge branch 'develop' into mochawesome

This commit is contained in:
John McLear 2021-02-03 11:23:54 +00:00 committed by GitHub
commit 7630e71957
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
75 changed files with 1347 additions and 1020 deletions

View file

@ -39,7 +39,8 @@ describe('assign ordered list', function () {
it('does not insert unordered list', function (done) {
this.timeout(3000);
helper.waitFor(() => helper.padInner$('div').first().find('ol li').length === 1).done(() => {
helper.waitFor(
() => helper.padInner$('div').first().find('ol li').length === 1).done(() => {
expect().fail(() => 'Unordered list inserted, should ignore shortcut');
}).fail(() => {
done();
@ -69,7 +70,8 @@ describe('assign ordered list', function () {
it('does not insert unordered list', function (done) {
this.timeout(3000);
helper.waitFor(() => helper.padInner$('div').first().find('ol li').length === 1).done(() => {
helper.waitFor(
() => helper.padInner$('div').first().find('ol li').length === 1).done(() => {
expect().fail(() => 'Unordered list inserted, should ignore shortcut');
}).fail(() => {
done();
@ -78,7 +80,8 @@ describe('assign ordered list', function () {
});
});
xit('issue #1125 keeps the numbered list on enter for the new line - EMULATES PASTING INTO A PAD', function (done) {
xit('issue #1125 keeps the numbered list on enter for the new line', function (done) {
// EMULATES PASTING INTO A PAD
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;
@ -104,19 +107,19 @@ describe('assign ordered list', function () {
});
});
const triggerCtrlShiftShortcut = function (shortcutChar) {
const triggerCtrlShiftShortcut = (shortcutChar) => {
const inner$ = helper.padInner$;
const e = inner$.Event(helper.evtType);
const e = new inner$.Event(helper.evtType);
e.ctrlKey = true;
e.shiftKey = true;
e.which = shortcutChar.toString().charCodeAt(0);
inner$('#innerdocbody').trigger(e);
};
const makeSureShortcutIsDisabled = function (shortcut) {
const makeSureShortcutIsDisabled = (shortcut) => {
helper.padChrome$.window.clientVars.padShortcutEnabled[shortcut] = false;
};
const makeSureShortcutIsEnabled = function (shortcut) {
const makeSureShortcutIsEnabled = (shortcut) => {
helper.padChrome$.window.clientVars.padShortcutEnabled[shortcut] = true;
};
});
@ -142,7 +145,7 @@ describe('Pressing Tab in an OL increases and decreases indentation', function (
const $insertorderedlistButton = chrome$('.buttonicon-insertorderedlist');
$insertorderedlistButton.click();
const e = inner$.Event(helper.evtType);
const e = new inner$.Event(helper.evtType);
e.keyCode = 9; // tab
inner$('#innerdocbody').trigger(e);
@ -156,7 +159,8 @@ describe('Pressing Tab in an OL increases and decreases indentation', function (
});
describe('Pressing indent/outdent button in an OL increases and decreases indentation and bullet / ol formatting', function () {
describe('Pressing indent/outdent button in an OL increases and ' +
'decreases indentation and bullet / ol formatting', function () {
// create a new pad before each test run
beforeEach(function (cb) {
helper.newPad(cb);