var featsLocation = 'features/';
var stepsLocation = 'steps/';
exports.config = {
rootElement: '[ng-app]',
directConnect: true,
params: {
authURL: '',
login: {
email: '',
passw: ''
}
},
resultJsonOutputFile: '',
getPageTimeout: 60000,
allScriptsTimeout: 60000,
framework: 'custom', // set to "custom" instead of cucumber.
frameworkPath: require.resolve('protractor-cucumber-framework'), //
path relative to the current config file
ignoreUncaughtExceptions: true,
capabilities: {
shardTestFiles: true,
maxInstances: 1,
'browserName': '',
'phantomjs.binary.path':
'/srv/build/applications/phantomjs/bin/phantomjs.exe',
chromeOptions: {
args: [
'useAutomationExtension: false',
'show-fps-counter=true',
'--disable-browser-side-navigation',]
}
},
onPrepare: function () {
global.EC = protractor.ExpectedConditions;
browser.driver.get(browser.params.authURL);
browser.driver.manage().window().maximize();
browser.driver.findElement(by.id('Main_txtUserName'
)).sendKeys(browser.params.login.email);
browser.driver.findElement(by.id('Main_txtPassword'
)).sendKeys(browser.params.login.passw);
browser.driver.findElement(by.id('Main_btnSubmit')).click();
browser.driver.sleep(3000);
browser.driver.findElement(by.id('Main_lnkCancel')).click();
return browser.driver.wait(function () {
return browser.driver.getCurrentUrl().then(function (url) {
var expectedurl = new RegExp(
"finalmile.wernerds.net/finalmile/#/shipmentErrors");
var until = protractor.ExpectedConditions;
browser.waitForAngular();
console.log('Validating components presence...')
browser.wait(until.presenceOf(element(by.id("searchKeyword"))),
5000, 'ERROR: Element taking too long to appear in the DOM');
return expectedurl.test(url);
});
}, 10000, 'ERROR: Angular did not load!');
},
baseUrl: '',
// require feature files
specs: [
featsLocation+'locationSearch.feature'
, featsLocation+'ediRejects.feature'
],
logLevel: 'INFO',
coloredLogs: true,
cucumberOpts: {
tags: '',
require: [
'./support/*.js'
, stepsLocation+'locationSearch/locationSearch.spec.js'
, stepsLocation+'ediRejects/ediRejects.spec.js'
],
monochrome: true,
strict: true, // <boolean> fail if there are any undefined or
pending steps
'no-colors': false,
format: ['pretty', 'progress',
'pretty:Reports_Json/FinalMileLog.txt', 'json:FinalMileFeatureReport.json',
'html:Reports_Json/FinalMileFeatureReport.json'], // <string[]>
(type[:path]) specify the output format, optionally supply PATH to redirect
formatter output (repeatable)
plugin: "json",
'dry-run': false, // <boolean> invoke formatters without executing
steps
compiler: [] // <string[]> ("extension:module") require files with
the given EXTENSION after requiring MODULE (repeatable)
,
includeStackTrace: true,
},
};
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.