-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcucumber.js
More file actions
90 lines (89 loc) · 2.95 KB
/
Copy pathcucumber.js
File metadata and controls
90 lines (89 loc) · 2.95 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
// Cucumber-js config for the Varbase Components varbase-e2e suite.
//
// Runs the Drupal Standard profile feature set (Olivero front end, Claro
// admin theme) under tests/features/drupal/.
//
// npx cucumber-js --config cucumber.js
//
// Reusable step definitions ship with varbase-e2e; the module-specific steps
// live in tests/step-definitions/varbase_components.steps.js. Every
// worldParameter (users, selectors, screenshot, video, javascript, minWaitTime,
// launchUrl) is inlined below - this single file is the whole configuration.
// Artefacts land directly under tests/reports, tests/screenshots and
// tests/videos.
module.exports = {
default: {
timeout: 120000,
requireModule: ["tsx/cjs"],
require: [
"node_modules/@vardot/varbase-e2e/tests/step-definitions/**/*.js",
"tests/step-definitions/**/*.js",
],
paths: ["tests/features/drupal/**/*.feature"],
format: [
"@cucumber/pretty-formatter",
"json:tests/reports/cucumber_report.json",
],
worldParameters: {
launchUrl: process.env.LAUNCH_URL || "http://localhost",
// Test users. The Webmaster row is the `drush site:install` super-admin
// created with `--account-name=webmaster --account-pass=...`.
users: {
Webmaster: {
username: "webmaster",
email: "webmaster@example.test",
password: "dD.123123ddd",
isAdmin: true,
},
},
minWaitTime: {
page: 10000,
before_scenario: 0,
after_scenario: 0,
before_step: 0,
after_step: 0,
},
selectors: {
css: {},
xpath: {},
filesPath: "./tests/selectors/",
files: ["cms-drupal-core-claro.json", "varbase_components.json"],
offset: 60,
breakpoints: {
xs: { width: 375, height: 667 },
sm: { width: 576, height: 800 },
md: { width: 768, height: 1024 },
lg: { width: 992, height: 768 },
xl: { width: 1200, height: 900 },
xxl: { width: 1400, height: 900 },
xxxl: { width: 1920, height: 1080, default: true },
},
},
screenshot: {
dir: "./tests/screenshots",
purge: false,
onFailed: true,
onEveryStep: false,
alwaysFullscreen: false,
failedPrefix: "failed_",
filenamePattern: "{datetime}.{feature_file}.feature_{step_line}.{ext}",
filenamePatternFailed:
"{failed_prefix}{datetime}.{feature_file}.feature_{step_line}.{ext}",
infoTypes: "",
},
video: {
mode: process.env.VARBASE_E2E_VIDEO || "on-failure",
dir: "./tests/videos",
size: { width: 1920, height: 1080 },
filenamePattern: "{datetime}.{feature_file}.{scenario}.{status}.{ext}",
},
javascript: {
mode: process.env.VARBASE_E2E_JS_ERROR_MODE || "warn",
levels: ["error"],
ignore: "",
beforeScenario: false,
afterScenario: true,
},
},
},
};