Fixed eslint errors

This commit is contained in:
witzig 2017-05-27 14:24:08 +02:00
parent 2160a10338
commit a9285e1181
10 changed files with 15 additions and 17 deletions

View file

@ -12,7 +12,7 @@ module.exports = (...extras) => page({
await this.waitUntilVisible();
},
async ensureUrl(path) {
async ensureUrl(path) { // eslint-disable-line no-unused-vars
throw new Error('Unsupported method.');
},

View file

@ -25,7 +25,7 @@ function UseCaseReporter(runner) {
return Array(indents).join(' ');
}
runner.on('start', function () {
runner.on('start', () => {
console.log();
});
@ -104,7 +104,7 @@ function UseCaseReporter(runner) {
console.log();
console.log(err);
console.log();
console.log(`Snaphot of and info about the current page are in last-failed-e2e-test.*`);
console.log('Snaphot of and info about the current page are in last-failed-e2e-test.*');
});
runner.on('end', () => {

View file

@ -1,6 +1,5 @@
'use strict';
const config = require('./config');
const webdriver = require('selenium-webdriver');
const By = webdriver.By;
const until = webdriver.until;
@ -45,7 +44,7 @@ module.exports = (...extras) => Object.assign({
}
for (const text of (this.textsToWaitFor || [])) {
await driver.wait(new webdriver.Condition(`for text "${text}"`, async (driver) => {
await driver.wait(new webdriver.Condition(`for text "${text}"`, async () => {
return await this.containsText(text);
}), waitTimeout);
}
@ -58,7 +57,7 @@ module.exports = (...extras) => Object.assign({
},
async waitUntilVisibleAfterRefresh(selector) {
await driver.wait(new webdriver.Condition('for refresh', async (driver) => {
await driver.wait(new webdriver.Condition('for refresh', async () => {
const val = await driver.executeScript('return document.mailTrainRefreshAcknowledged;');
return !val;
}), waitTimeout);

View file

@ -19,7 +19,7 @@ class Semaphore {
const self = this;
function wait(resolve) {
if (self.counter == 0) {
if (self.counter === 0) {
resolve();
} else {
setTimeout(wait, 500, resolve);
@ -28,7 +28,7 @@ class Semaphore {
return new Promise(resolve => {
setTimeout(wait, 500, resolve);
})
});
}
}

View file

@ -15,7 +15,7 @@ module.exports = (...extras) => page({
path = pathOrParams;
} else {
const urlPattern = new UrlPattern(this.requestUrl || this.url);
path = urlPattern.stringify(pathOrParams)
path = urlPattern.stringify(pathOrParams);
}
const parsedUrl = url.parse(path);