forked from uc-cdis/gen3-qa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodecept.conf.js
145 lines (141 loc) · 4.96 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
const { Env } = require('./utils/env');
Env.setupEnvVariables();
// Set hostname according to namespace
exports.config = {
output: './output',
helpers: {
WebDriver: {
host: 'selenium-hub',
url: `https://${process.env.NAMESPACE}.planx-pla.net${process.env.PORTAL_SUFFIX}/`,
smartWait: 30000,
browser: 'chrome',
// fullPageScreenshots: true,
disableScreenshots: true,
desiredCapabilities: {
chromeOptions: {
args: [
'--headless', // for dev, you can comment this line to open actual chrome for easier test
'--disable-gpu', // https://stackoverflow.com/questions/51959986/how-to-solve-selenium-chromedriver-timed-out-receiving-message-from-renderer-exc
'--whitelisted-ips=*',
'--disable-features=VizDisplayCompositor', // https://stackoverflow.com/a/55371396/491553
'--window-size=1280,720',
// '--no-sandbox',
// '--enable-features=NetworkService,NetworkServiceInProcess',
'--disable-infobars', // https://stackoverflow.com/a/43840128/1689770
'--disable-dev-shm-usage', // https://stackoverflow.com/a/50725918/1689770
'--disable-browser-side-navigation', // https://stackoverflow.com/a/49123152/1689770
],
},
},
restart: true, // restart browser for every test
timeouts: {
script: 6000,
// 'page load': 10000,
},
port: 4444,
},
REST: {
endpoint: `https://${process.env.HOSTNAME}`,
timeout: 300000,
defaultHeaders: {
common: {
Accept: 'application/json',
},
get: {},
head: {},
delete: {},
post: { 'Content-Type': 'application/json' },
patch: { 'Content-Type': 'application/json' },
put: { 'Content-Type': 'application/json' },
},
},
CDISHelper: {
require: './helpers/cdisHelper.js',
},
browserLogHelper: {
require: './helpers/browserLogHelper.js',
},
},
include: {
// General Utils
nodes: './utils/nodes.js',
users: './utils/user.js',
google: './utils/google.js',
files: './utils/file.js',
dataUpload: './utils/dataUpload.js',
// APIs
sheepdog: './services/apis/sheepdog/sheepdogService.js',
indexd: './services/apis/indexd/indexdService.js',
drs: './services/apis/drs/drsService.js',
peregrine: './services/apis/peregrine/peregrineService.js',
fence: './services/apis/fence/fenceService.js',
dataClient: './services/apis/dataClient/dataClientService.js',
etl: './services/apis/etl/etlService.js',
manifestService: './services/apis/manifestService/manifestServiceService.js',
guppy: './services/apis/guppy/guppyService.js',
mds: './services/apis/mds/mdsService.js',
auditService: './services/apis/auditService/auditService.js',
nondbgap: './services/apis/nondbgapUsersync/nonDbgapService.js',
ras: './services/apis/rasDrs/rasService.js',
requestor: './services/apis/requestor/requestorService.js',
// Pages
home: './services/portal/home/homeService.js',
gwas: './services/portal/GWAS/GWASService.js',
indexing: './services/portal/indexing/indexingService.js',
login: './services/portal/login/loginService.js',
explorer: './services/portal/explorer/explorerService.js',
portalDataUpload: './services/portal/dataUpload/dataUploadService.js',
portalExportToWorkspace: './services/portal/exportToWorkspace/exportToWorkspaceService.js',
portalCoreMetadataPage: './services/portal/coreMetadataPage/coreMetadataPageService.js',
discovery: './services/portal/discovery/discoveryService.js',
workspace: './services/portal/workspace/workspaceService.js',
gen3ffLandingPage: './services/portal/gen3ffLandingPage/gen3ffLandingPageService.js',
studyRegistration: './services/portal/studyRegistration/studyRegistrationService.js',
},
mocha: {
reporterOptions: {
'codeceptjs-cli-reporter': {
stdout: '-',
options: {
verbose: true,
steps: true,
},
},
'mocha-junit-reporter': {
stdout: 'output/result[hash].xml',
options: {
mochaFile: 'output/result[hash].xml',
verbose: true,
steps: true,
},
},
},
},
bootstrap: require('./test_setup.js'), // eslint-disable-line global-require
hooks: [
require('./hooks/test_results.js'), // eslint-disable-line global-require
require('./hooks/test_conditions.js'), // eslint-disable-line global-require
],
tests: './suites/**/*.js',
gherkin: {
features: './suites/bdd/**/*.feature',
steps: './suites/bdd/**/*.js',
},
plugins: {
allure: {
enabled: true,
require: "allure-codeceptjs",
outputDir: "output",
},
tryTo: {
enabled: true,
},
screenshotOnFail: {
enabled: true,
uniqueScreenshotNames: true,
fullPageScreenshots: true,
},
},
timeout: 900, // in seconds (15 min)
name: 'selenium',
};