forked from riskiana/fims-e2e
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconf.js
52 lines (45 loc) · 1.77 KB
/
conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// conf.js
var Jasmine2HtmlReporter = require('protractor-jasmine2-html-reporter');
exports.config = {
framework: 'jasmine',
specs: [
'Specs/loans1_creation&assignment.js'
],
directConnect: true,
allScriptsTimeout: 45000,
jasmineNodeOpts: {defaultTimeoutInterval: 500000},
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: [
'--start-maximized'
]
}
},
onPrepare: function() {
jasmine.getEnv().addReporter(
new Jasmine2HtmlReporter({
savePath: './target/screenshots',
takeScreenshots: true,
takeScreenshotsOnlyOnFailures: true
})
);
browser.ignoreSynchronization = true;
//browser.driver.get('https://pilot.kuelap.io/index.html');
browser.driver.get('http://localhost:4200');
//browser.driver.get(' https://sandbox.kuelap.io/index.html');
browser.driver.findElement(by.css(".mat-input-element[formcontrolname='tenant']")).sendKeys('playground');
browser.driver.findElement(by.css(".mat-input-element[formcontrolname='username']")).sendKeys('operator');
browser.driver.findElement(by.css(".mat-input-element[formcontrolname='password']")).sendKeys('init1@l');
browser.driver.findElement(by.css('.mat-raised-button.mat-primary')).click();
// Login takes some time, so wait until it's done.
// For the test app's login, we know it's done when it redirects to
// index.html.
return browser.driver.wait(function() {
return browser.driver.getCurrentUrl().then(function(url) {
return /quickAccess/.test(url);
});
}, 10000);
},
useAllAngular2AppRoots: true
};