-
Notifications
You must be signed in to change notification settings - Fork 2
/
codecept.conf.js
66 lines (60 loc) · 1.77 KB
/
codecept.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
var path = require('path');
/* global cat, cd, cp, echo, exec, exit, find, ls, mkdir, pwd, rm, target, test */
require('shelljs/make');
var RELATIVE_PATH = './test/acceptance';
var OUTPUT_PATH = RELATIVE_PATH + '/report';
var HOST = getSandboxUrl();
function getSandboxUrl() {
if (test('-f', path.join(process.cwd(), 'dw.json'))) {
var config = cat(path.join(process.cwd(), 'dw.json'));
var parsedConfig = JSON.parse(config);
return '' + parsedConfig.hostname;
}
return '';
}
var webDriver = {
url: `https://${HOST}`,
browser: 'chrome',
smartWait: 10000,
waitForTimeout: 10000,
timeouts: {
script: 60000,
'page load': 10000
}
};
exports.config = {
output: OUTPUT_PATH,
helpers: {
WebDriver: webDriver
},
plugins: {
wdio: {
enabled: true,
services: ['selenium-standalone']
},
allure: {
enabled: true
},
retryFailedStep: {
enabled: true,
retries: 5
}
},
include: {
homePage: RELATIVE_PATH + '/pages/HomePage.js',
confirmationPage: RELATIVE_PATH + '/pages/ConfirmationPage.js',
productPage: RELATIVE_PATH + '/pages/ProductPage.js',
productLandingPage: RELATIVE_PATH + '/pages/ProductLandingPage.js',
uriUtils: RELATIVE_PATH + '/utils/uriUtils.js'
},
gherkin: {
features: RELATIVE_PATH + '/features/**/*.feature',
steps: [
RELATIVE_PATH + '/features/steps/confirmation.steps.js',
RELATIVE_PATH + '/features/steps/pdp_ratings_and_reviews.steps.js',
RELATIVE_PATH + '/features/steps/plp_reviews.steps.js'
]
},
tests: RELATIVE_PATH + '/tests/**/*.test.js',
name: 'yotpo-link'
};