-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcodecept.conf.js
More file actions
90 lines (88 loc) · 2.46 KB
/
codecept.conf.js
File metadata and controls
90 lines (88 loc) · 2.46 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
const { setHeadlessWhen } = require('@codeceptjs/configure');
// const { setHeadlessWhen, setWindowSize } = require('@codeceptjs/configure');
// setHeadlessWhen(process.env.HEADLESS); // enables headless mode when HEADLESS environment variable exists
// turn on headless mode when running with HEADLESS=true environment variable
// HEADLESS=true npx codecept run
setHeadlessWhen(process.env.HEADLESS);
exports.config = {
// tests: 'tests/**/*_test.js',
tests: 'tests/*/*_test.js',
// tests: 'tests/*_test.js',
output: './output',
helpers: {
WebDriver: {
url: 'https://dokan.ajaira.website/',
browser: 'chrome',
windowSize: '1200x1280',
timeouts: {
"script": 60000,
"page load": 10000
},
desiredCapabilities: {
chromeOptions: {
args: [ "--headless", "--disable-gpu", "--no-sandbox" ]
}
},
}
// Puppeteer: {
// url: "https://dokan.ajaira.website/",
// show: true,
// waitForNavigation: "networkidle0",
// windowSize: '1200x1880',
// }
},
include: {
I: './steps_file.js',
pagesPage: './pages/pages.js',
},
bootstrap: null,
mocha: {},
name: 'dokan',
plugins: {
retryFailedStep: {
enabled: true
},
screenshotOnFail: {
enabled: true
},
allure: {
enabled: true
},
autoLogin: {
enabled: true,
saveToFile: false,
inject: 'loginAs',
users: {
admin: {
login: (I) => {
I.amOnPage('/my-account/');
I.fillField('username', 'Dokan_Admin');
I.fillField('password', 'ohjcw6j3mLdN9q7s$f');
I.checkOption('Remember me');
I.click('login');
I.dontSeeElement('.woocommerce-error');
},
check: (I) => {
I.seeCurrentUrlEquals('/dashboard');
// I.see('Hello admin'); seeInCurrentUrl
I.amOnPage('/wp-admin');
},
},
user: {
login: (I) => {
I.amOnPage('/my-account');
I.fillField('Username or email address', 'jones');
I.fillField('Password', 'aa');
I.checkOption('Remember me');
I.click('login');
I.dontSeeElement('.woocommerce-error');
},
check: (I) => {
I.seeCurrentUrlEquals('/dashboard');
// I.see('Hello daniel');
},
}
},
}
}
}