diff --git a/tests/frontend/specs/change_user_color.js b/tests/frontend/specs/change_user_color.js index 3b4b3d20e..e8c16db37 100644 --- a/tests/frontend/specs/change_user_color.js +++ b/tests/frontend/specs/change_user_color.js @@ -93,7 +93,7 @@ describe('change user color', function () { $chatInput.sendkeys('{enter}'); // simulate a keypress of enter actually does evt.which = 10 not 13 // check if chat shows up - helper.waitFor(() => chrome$('#chattext').children('p').length !== 0, // wait until the chat message shows up + helper.waitFor(() => chrome$('#chattext').children('p').length !== 0 // wait until the chat message shows up ).done(() => { const $firstChatMessage = chrome$('#chattext').children('p'); expect($firstChatMessage.css('background-color')).to.be(testColorRGB); // expect the first chat message to be of the user's color diff --git a/tests/frontend/specs/change_user_name.js b/tests/frontend/specs/change_user_name.js index d0d9b763c..e144a2340 100644 --- a/tests/frontend/specs/change_user_name.js +++ b/tests/frontend/specs/change_user_name.js @@ -60,7 +60,7 @@ describe('change username value', function () { $chatInput.sendkeys('{enter}'); // simulate a keypress of enter actually does evt.which = 10 not 13 // check if chat shows up - helper.waitFor(() => chrome$('#chattext').children('p').length !== 0, // wait until the chat message shows up + helper.waitFor(() => chrome$('#chattext').children('p').length !== 0 // wait until the chat message shows up ).done(() => { const $firstChatMessage = chrome$('#chattext').children('p'); const containsJohnMcLear = $firstChatMessage.text().indexOf('John McLear') !== -1; // does the string contain John McLear diff --git a/tests/frontend/specs/clear_authorship_colors.js b/tests/frontend/specs/clear_authorship_colors.js index 0be189625..f622e912a 100644 --- a/tests/frontend/specs/clear_authorship_colors.js +++ b/tests/frontend/specs/clear_authorship_colors.js @@ -28,7 +28,7 @@ describe('clear authorship colors button', function () { $firstTextElement.sendkeys(sentText); $firstTextElement.sendkeys('{rightarrow}'); - helper.waitFor(() => inner$('div span').first().attr('class').indexOf('author') !== -1, // wait until we have the full value available + helper.waitFor(() => inner$('div span').first().attr('class').indexOf('author') !== -1 // wait until we have the full value available ).done(() => { // IE hates you if you don't give focus to the inner frame bevore you do a clearAuthorship inner$('div').first().focus(); @@ -80,7 +80,7 @@ describe('clear authorship colors button', function () { $firstTextElement.sendkeys(sentText); $firstTextElement.sendkeys('{rightarrow}'); - helper.waitFor(() => inner$('div span').first().attr('class').indexOf('author') !== -1, // wait until we have the full value available + helper.waitFor(() => inner$('div span').first().attr('class').indexOf('author') !== -1 // wait until we have the full value available ).done(() => { // IE hates you if you don't give focus to the inner frame bevore you do a clearAuthorship inner$('div').first().focus(); diff --git a/tests/frontend/specs/importexport.js b/tests/frontend/specs/importexport.js index 7f3e4c415..0be2a0744 100644 --- a/tests/frontend/specs/importexport.js +++ b/tests/frontend/specs/importexport.js @@ -136,7 +136,7 @@ describe('import functionality', function () { const htmlWithBullets = ''; importrequest(htmlWithBullets, importurl, 'html'); const oldtext = getinnertext(); - helper.waitFor(() => oldtext != getinnertext(), + helper.waitFor(() => oldtext != getinnertext() // return expect(getinnertext()).to.be('\ // \n\ // \n\ diff --git a/tests/frontend/specs/responsiveness.js b/tests/frontend/specs/responsiveness.js index 1c3a0c65b..63803f641 100644 --- a/tests/frontend/specs/responsiveness.js +++ b/tests/frontend/specs/responsiveness.js @@ -53,7 +53,7 @@ xdescribe('Responsiveness of Editor', function () { inner$('div').first().text(text); // Put the text contents into the pad helper.waitFor(() => // Wait for the new contents to be on the pad - inner$('div').text().length > length, + inner$('div').text().length > length ).done(() => { expect(inner$('div').text().length).to.be.greaterThan(length); // has the text changed? const start = Date.now(); // get the start time diff --git a/tests/frontend/specs/timeslider.js b/tests/frontend/specs/timeslider.js index f0d74b1ef..bea7932df 100644 --- a/tests/frontend/specs/timeslider.js +++ b/tests/frontend/specs/timeslider.js @@ -18,7 +18,7 @@ xdescribe('timeslider button takes you to the timeslider of a pad', function () const modifiedValue = $firstTextElement.text(); // get the modified value expect(modifiedValue).not.to.be(originalValue); // expect the value to change - helper.waitFor(() => modifiedValue !== originalValue, // The value has changed so we can.. + helper.waitFor(() => modifiedValue !== originalValue // The value has changed so we can.. ).done(() => { const $timesliderButton = chrome$('#timesliderlink'); $timesliderButton.click(); // So click the timeslider link diff --git a/tests/frontend/specs/timeslider_follow.js b/tests/frontend/specs/timeslider_follow.js index 55502d869..c570cbd07 100644 --- a/tests/frontend/specs/timeslider_follow.js +++ b/tests/frontend/specs/timeslider_follow.js @@ -42,7 +42,7 @@ describe('timeslider follow', function () { const lines = helper.linesDiv(); helper.selectLines(lines[0], lines[lines.length - 1]); // select all lines // probably unnecessary, but wait for the selection to be Range not Caret - await helper.waitForPromise(() => !helper.padInner$.document.getSelection().isCollapsed, + await helper.waitForPromise(() => !helper.padInner$.document.getSelection().isCollapsed // only supported in FF57+ // return helper.padInner$.document.getSelection().type === 'Range'; ); diff --git a/tests/frontend/travis/remote_runner.js b/tests/frontend/travis/remote_runner.js index b2c9f3a00..70c850ca8 100644 --- a/tests/frontend/travis/remote_runner.js +++ b/tests/frontend/travis/remote_runner.js @@ -15,10 +15,10 @@ var allTestsPassed = true; // and the script would silently exit with error code 0 process.exitCode = 2; process.on('exit', (code) => { - if (code === 2){ - console.log("\x1B[31mFAILED\x1B[39m Not all saucelabs runner have been started."); + if (code === 2) { + console.log('\x1B[31mFAILED\x1B[39m Not all saucelabs runner have been started.'); } -}) +}); var sauceTestWorker = async.queue((testSettings, callback) => { const browser = wd.promiseChainRemote(config.host, config.port, config.username, config.accessKey);