diff --git a/.eslintrc.js b/.eslintrc.js index 0ee555350c8f530888fabc4e8968b28ba1a71ead..95ae0c12176fa832565373cdd94a3caf4b03dbba 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,6 +2,9 @@ module.exports = { "extends": "google", "parser": "babel-eslint", "rules": { - "linebreak-style": 0 + "linebreak-style": 0, + "indent": ["error", 4], + "max-len" : [2, 160, 4, {"ignoreUrls": true}] + } }; \ No newline at end of file diff --git a/pageObjects/README.md b/pageObjects/README.md new file mode 100644 index 0000000000000000000000000000000000000000..eb2335f1b0b8e9716a93d0424aeb87f2900953d3 --- /dev/null +++ b/pageObjects/README.md @@ -0,0 +1 @@ +This is where DOM elements should be referenced to ensure tests maintainability \ No newline at end of file diff --git a/protractor.conf.js b/protractor.conf.js index f6f29d7f024a83300eab0596c99bb08c36b31794..bdb68571cc5e100d17144311d59f080adc70fc2e 100644 --- a/protractor.conf.js +++ b/protractor.conf.js @@ -1,5 +1,5 @@ -let HtmlReporter = require('protractor-beautiful-reporter'); -var path = require('path'); +const HtmlReporter = require('protractor-beautiful-reporter'); +const path = require('path'); exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', @@ -10,14 +10,14 @@ exports.config = { seleniumArgs: [], specs: [ - './specs/*.spec.js' + './specs/*.spec.js', ], capabilities: { browserName: 'chrome', chromeOptions: { - args: ["--window-size=1910,1080"] - } + args: ['--window-size=1910,1080'], + }, }, // A base URL for your application under test. Calls to protractor.get() @@ -26,7 +26,7 @@ exports.config = { framework: 'jasmine', - onPrepare: function () { + onPrepare: function() { // Add a screenshot reporter: jasmine.getEnv().addReporter(new HtmlReporter({ preserveDirectory: false, @@ -36,26 +36,26 @@ exports.config = { baseDirectory: 'reports-tmp', clientDefaults: { columnSettings: { - displaySessionId:false - } + displaySessionId: false, + }, }, pathBuilder: function pathBuilder(spec, descriptions, results, capabilities) { // Return '<30-12-2016>/<browser>/<specname>' as path for screenshots: // Example: '30-12-2016/firefox/list-should work'. - var currentDate = new Date(), - day = currentDate.getDate(), - month = currentDate.getMonth() + 1, - year = currentDate.getFullYear(); + const currentDate = new Date(); + const day = currentDate.getDate(); + const month = currentDate.getMonth() + 1; + const year = currentDate.getFullYear(); - var validDescriptions = descriptions.map(function (description) { + const validDescriptions = descriptions.map(function(description) { return description.replace('/', '@'); }); return path.join( - day + "-" + month + "-" + year, + day + '-' + month + '-' + year, // capabilities.get('browserName'), validDescriptions.join('-')); - } + }, }).getJasmine2Reporter()); }, @@ -64,5 +64,5 @@ exports.config = { showColors: true, // Default time to wait in ms before a test fails. defaultTimeoutInterval: 30000, - } -}; \ No newline at end of file + }, +};