-
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathbehat.yml
More file actions
110 lines (100 loc) · 4.4 KB
/
behat.yml
File metadata and controls
110 lines (100 loc) · 4.4 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
default:
autoload: ['%paths.base%/tests/behat/bootstrap']
gherkin:
cache: ~ # Disable caching during development. It is enabled for profiles below.
filters:
tags: '~@skipped' # Allow skipping tests by tagging them with '@skipped'.
suites:
default:
paths: ['%paths.base%/tests/behat/features']
contexts:
- FeatureContext
- Drupal\DrupalExtension\Context\MinkContext
- Drupal\DrupalExtension\Context\MarkupContext
- Drupal\DrupalExtension\Context\MessageContext
- Drupal\DrupalExtension\Context\DrushContext
- DrevOps\BehatScreenshotExtension\Context\ScreenshotContext
formatters:
# Show test progress and explicit fail information whule continuing the test run.
progress_fail: true
# Output test results in JUnit format.
junit:
output_path: '%paths.base%/.logs/test_results/behat'
extensions:
Drupal\MinkExtension:
browserkit_http: ~
base_url: http://nginx:8080
files_path: '%paths.base%/tests/behat/fixtures'
browser_name: chrome
javascript_session: selenium2
selenium2:
wd_host: 'http://chrome:4444/wd/hub'
capabilities:
browser: chrome
extra_capabilities:
'goog:chromeOptions':
args:
- '--disable-extensions' # Prevents interference from browser extensions.
- '--disable-popup-blocking' # Allows tests to open popups without being blocked.
- '--disable-translate' # Prevents the translation bar from appearing on non-English pages.
- '--force-prefers-reduced-motion' # Disables CSS animations and transitions for test stability.
- '--test-type' # Suppresses error dialogs and crash recovery prompts.
- '--window-size=1920,1080' # Sets the browser window size for consistent test screenshots.
# Provides integration with Drupal APIs.
Drupal\DrupalExtension:
blackbox: ~
api_driver: drupal
drush_driver: drush
drupal:
drupal_root: web
drush:
root: web
region_map:
header: '#header'
primary_menu: '.header-nav'
secondary_menu: '.region.region--secondary-menu'
hero: '.region.region--hero'
highlighted: '.region.region--highlighted'
breadcrumb: '.region.region--breadcrumb'
social: '.social-bar'
content_above: '.region.region--content-above'
content: '.region.region--content'
sidebar: '.region.region--sidebar'
content_below: '.region.region--content-below'
footer_top: '.region.region--footer-top'
footer_bottom: '.region.region--footer-bottom'
selectors:
login_form_selector: 'form#user-login,form#user-login-form'
logged_in_selector: 'body.logged-in,body.user-logged-in'
message_selector: '.messages'
error_message_selector: '.messages.error,.messages.messages--error'
success_message_selector: '.messages.status,.messages.messages--status'
warning_message_selector: '.messages.warning,.messages.messages--warning'
# Capture HTML and PNG screenshots on demand and on failure.
DrevOps\BehatScreenshotExtension:
dir: '%paths.base%/.logs/screenshots' # Directory to save screenshots.
on_failed: true # Change to 'false' (no quotes) to disable screenshots on failure.
always_fullscreen: true # Always capture full page screenshots.
purge: false # Purge screenshots before each run. Use `BEHAT_SCREENSHOT_PURGE=true` to override.
info_types: # Additional information to include in screenshots.
- url
- feature
- step
- datetime
# Show explicit fail information and continue the test run.
DrevOps\BehatFormatProgressFail\FormatExtension: ~
# Profile for parallel testing.
# Runs all tests not tagged with 'smoke' or '@p1' and not tagged with '@skipped'.
# This is a 'catch-all' profile that runs any tests not tagged with '@pX'.
p0:
gherkin:
cache: '/tmp/behat_gherkin_cache'
filters:
tags: '@smoke,~@p1&&~@skipped'
# Profile for parallel testing.
# Runs all tests tagged with '@smoke' or '@p1' and not tagged with '@skipped'.
p1:
gherkin:
cache: '/tmp/behat_gherkin_cache'
filters:
tags: '@smoke,@p1&&~@skipped'