tests: Delete overly aggressive frontend test timeouts

This should reduce test flakiness.
This commit is contained in:
Richard Hansen 2021-04-01 15:51:03 -04:00 committed by webzwo0i
parent 7cbb3f565d
commit 4ad80d4072
17 changed files with 0 additions and 42 deletions

View file

@ -10,7 +10,6 @@ describe('All the alphabet works n stuff', function () {
});
it('when you enter any char it appears right', function (done) {
this.timeout(250);
const inner$ = helper.padInner$;
// get the first text element out of the inner iframe

View file

@ -8,7 +8,6 @@ describe('bold button', function () {
});
it('makes text bold on click', function (done) {
this.timeout(200);
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;
@ -37,7 +36,6 @@ describe('bold button', function () {
});
it('makes text bold on keypress', function (done) {
this.timeout(200);
const inner$ = helper.padInner$;
// get the first text element out of the inner iframe

View file

@ -8,7 +8,6 @@ describe('delete keystroke', function () {
});
it('makes text delete', async function () {
this.timeout(50);
const inner$ = helper.padInner$;
// get the first text element out of the inner iframe

View file

@ -30,7 +30,6 @@ describe('drag and drop', function () {
});
it('moves text back to its original place', async function () {
this.timeout(50);
// test text was removed from drop target
const $targetLine = getLine(TARGET_LINE);
expect($targetLine.text()).to.be('Target line []');
@ -66,7 +65,6 @@ describe('drag and drop', function () {
});
it('moves text back to its original place', async function () {
this.timeout(50);
// test text was removed from drop target
const $targetLine = getLine(TARGET_LINE);
expect($targetLine.text()).to.be('Target line []');

View file

@ -57,7 +57,6 @@ describe('embed links', function () {
describe('the share link', function () {
it('is the actual pad url', async function () {
this.timeout(100);
const chrome$ = helper.padChrome$;
// open share dropdown
@ -72,7 +71,6 @@ describe('embed links', function () {
describe('the embed as iframe code', function () {
it('is an iframe with the the correct url parameters and correct size', async function () {
this.timeout(50);
const chrome$ = helper.padChrome$;
// open share dropdown
@ -94,7 +92,6 @@ describe('embed links', function () {
describe('the share link', function () {
it('shows a read only url', async function () {
this.timeout(50);
const chrome$ = helper.padChrome$;
// open share dropdown
@ -111,7 +108,6 @@ describe('embed links', function () {
describe('the embed as iframe code', function () {
it('is an iframe with the the correct url parameters and correct size', async function () {
this.timeout(50);
const chrome$ = helper.padChrome$;
// open share dropdown

View file

@ -8,7 +8,6 @@ describe('font select', function () {
});
it('makes text RobotoMono', async function () {
this.timeout(100);
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;

View file

@ -8,7 +8,6 @@ describe('indentation button', function () {
});
it('indent text with keypress', async function () {
this.timeout(100);
const inner$ = helper.padInner$;
// get the first text element out of the inner iframe
@ -25,7 +24,6 @@ describe('indentation button', function () {
});
it('indent text with button', async function () {
this.timeout(100);
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;

View file

@ -8,7 +8,6 @@ describe('italic some text', function () {
});
it('makes text italic using button', async function () {
this.timeout(100);
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;
@ -36,7 +35,6 @@ describe('italic some text', function () {
});
it('makes text italic using keypress', async function () {
this.timeout(100);
const inner$ = helper.padInner$;
// get the first text element out of the inner iframe

View file

@ -24,8 +24,6 @@ describe('author of pad edition', function () {
// author 2 makes some changes on the pad
it('Clears Authorship by second user', async function () {
this.timeout(100);
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;

View file

@ -9,7 +9,6 @@ describe('ordered_list.js', function () {
});
it('inserts ordered list text', async function () {
this.timeout(200);
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;
@ -29,7 +28,6 @@ describe('ordered_list.js', function () {
});
it('inserts unordered list', async function () {
this.timeout(50);
await helper.waitForPromise(
() => helper.padInner$('div').first().find('ol li').length === 1);
});
@ -76,7 +74,6 @@ describe('ordered_list.js', function () {
});
it('inserts unordered list', async function () {
this.timeout(200);
helper.waitForPromise(() => helper.padInner$('div').first().find('ol li').length === 1);
});
});
@ -177,7 +174,6 @@ describe('ordered_list.js', function () {
});
it('indent and de-indent list item with keypress', async function () {
this.timeout(200);
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;

View file

@ -17,13 +17,11 @@ describe('Pad modal', function () {
});
it('disables editor', async function () {
this.timeout(200);
expect(isEditorDisabled()).to.be(true);
});
context('and user clicks on editor', function () {
it('does not close the modal', async function () {
this.timeout(200);
clickOnPadInner();
const $modal = helper.padChrome$(MODAL_SELECTOR);
const modalIsVisible = $modal.hasClass('popup-show');
@ -34,7 +32,6 @@ describe('Pad modal', function () {
context('and user clicks on pad outer', function () {
it('does not close the modal', async function () {
this.timeout(200);
clickOnPadOuter();
const $modal = helper.padChrome$(MODAL_SELECTOR);
const modalIsVisible = $modal.hasClass('popup-show');
@ -61,7 +58,6 @@ describe('Pad modal', function () {
context('and user clicks on editor', function () {
it('closes the modal', async function () {
this.timeout(200);
clickOnPadInner();
await helper.waitForPromise(() => isModalOpened(MODAL_SELECTOR) === false);
});
@ -69,7 +65,6 @@ describe('Pad modal', function () {
context('and user clicks on pad outer', function () {
it('closes the modal', async function () {
this.timeout(200);
clickOnPadOuter();
await helper.waitForPromise(() => isModalOpened(MODAL_SELECTOR) === false);
});

View file

@ -7,7 +7,6 @@ describe('undo button then redo button', function () {
});
it('redo some typing with button', async function () {
this.timeout(200);
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;
@ -33,7 +32,6 @@ describe('undo button then redo button', function () {
});
it('redo some typing with keypress', async function () {
this.timeout(200);
const inner$ = helper.padInner$;
// get the first text element inside the editable space

View file

@ -9,7 +9,6 @@ describe('scrollTo.js', function () {
});
it('Scrolls down to Line 4', async function () {
this.timeout(100);
const chrome$ = helper.padChrome$;
await helper.waitForPromise(() => {
const topOffset = parseInt(chrome$('iframe').first('iframe')
@ -27,7 +26,6 @@ describe('scrollTo.js', function () {
});
it('Does NOT change scroll', async function () {
this.timeout(100);
const chrome$ = helper.padChrome$;
await helper.waitForPromise(() => {
const topOffset = parseInt(chrome$('iframe').first('iframe')

View file

@ -44,14 +44,12 @@ describe('select formatting buttons when selection has style applied', function
const testIfFormattingButtonIsDeselected = function (style) {
it(`deselects the ${style} button`, async function () {
this.timeout(100);
await helper.waitForPromise(() => !isButtonSelected(style));
});
};
const testIfFormattingButtonIsSelected = function (style) {
it(`selects the ${style} button`, async function () {
this.timeout(100);
await helper.waitForPromise(() => isButtonSelected(style));
});
};
@ -128,7 +126,6 @@ describe('select formatting buttons when selection has style applied', function
context('when user applies a style and the selection does not change', function () {
it('selects the style button', async function () {
this.timeout(100);
const style = STYLES[0]; // italic
applyStyleOnLine(style, FIRST_LINE);
await helper.waitForPromise(() => isButtonSelected(style) === true);

View file

@ -8,7 +8,6 @@ describe('strikethrough button', function () {
});
it('makes text strikethrough', async function () {
this.timeout(100);
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;

View file

@ -7,8 +7,6 @@ describe('undo button', function () {
});
it('undo some typing by clicking undo button', async function () {
this.timeout(100);
this.timeout(150);
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;
@ -29,7 +27,6 @@ describe('undo button', function () {
});
it('undo some typing using a keypress', async function () {
this.timeout(150);
const inner$ = helper.padInner$;
// get the first text element inside the editable space

View file

@ -9,7 +9,6 @@ describe('unordered_list.js', function () {
});
it('insert unordered list text then removes by outdent', async function () {
this.timeout(150);
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;
const originalText = inner$('div').first().text();
@ -36,7 +35,6 @@ describe('unordered_list.js', function () {
});
it('insert unordered list text then remove by clicking list again', async function () {
this.timeout(150);
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;
const originalText = inner$('div').first().text();
@ -64,7 +62,6 @@ describe('unordered_list.js', function () {
});
it('Keeps the unordered list on enter for the new line', async function () {
this.timeout(250);
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;
@ -95,7 +92,6 @@ describe('unordered_list.js', function () {
});
it('indent and de-indent list item with keypress', async function () {
this.timeout(150);
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;
@ -130,7 +126,6 @@ describe('unordered_list.js', function () {
});
it('indent and de-indent list item with indent button', async function () {
this.timeout(150);
const inner$ = helper.padInner$;
const chrome$ = helper.padChrome$;