Repository navigation
Expand file tree
/
Copy pathcucumber.js
More file actions
58 lines (54 loc) · 1.57 KB
/
Copy pathcucumber.js
File metadata and controls
58 lines (54 loc) · 1.57 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
const profile = process.env.CUCUMBER_PROFILE || "standalone";
const featurePaths = {
standalone: ["features/**/*.feature"],
cockpit: [
"features/cockpit/**/*.feature",
"features/dashboard/**/*.feature",
"features/agents/**/*.feature",
"features/attestations/**/*.feature",
"features/policies/**/*.feature",
"features/certificates/**/*.feature",
"features/alerts/**/*.feature",
"features/performance/**/*.feature",
"features/audit/**/*.feature",
"features/integrations/**/*.feature",
"features/settings/**/*.feature",
],
api: ["features/api/**/*.feature"],
};
const tagFilters = {
standalone: "not @cockpit and not @wip",
cockpit: "not @standalone-only and not @wip",
api: "@api and not @wip",
};
const worldParams = {
standalone: {
deploymentMode: "standalone",
baseUrl: "http://localhost:5173",
apiBaseUrl: "http://localhost:8080",
},
cockpit: {
deploymentMode: "cockpit",
baseUrl: "http://localhost:9090",
apiBaseUrl: "http://localhost:8080",
},
api: {
deploymentMode: "api-only",
baseUrl: "http://localhost:8080",
apiBaseUrl: "http://localhost:8080",
},
};
export default {
import: ["src/support/*.ts", "src/steps/**/*.ts"],
paths: featurePaths[profile] || featurePaths.standalone,
tags: tagFilters[profile] || tagFilters.standalone,
format: [
"progress-bar",
"json:reports/cucumber-report.json",
"html:reports/cucumber-report.html",
],
formatOptions: {
snippetInterface: "async-await",
},
worldParameters: worldParams[profile] || worldParams.standalone,
};