-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbehat.yml
More file actions
133 lines (122 loc) · 5.91 KB
/
Copy pathbehat.yml
File metadata and controls
133 lines (122 loc) · 5.91 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
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
regions:
page_actions: '.top-bar__actions'
header_top_1: '.ct-header__content-top1'
header_top_2: '.ct-header__content-top2'
header_top_3: '.ct-header__content-top3'
header_middle_1: '.ct-header__content-middle1'
header_middle_2: '.ct-header__content-middle2'
header_middle_3: '.ct-header__content-middle3'
header_bottom_1: '.ct-header__content-bottom1'
banner: 'body'
highlighted: '.container .row .col-xxs-12'
content_top: 'main.ct-layout'
content: '.ct-layout__main'
content_bottom: 'main.ct-layout'
sidebar_top_left: '.ct-layout__sidebar_top_left'
sidebar_bottom_left: '.ct-layout__sidebar_bottom_left'
sidebar_top_right: '.ct-layout__sidebar_top_right'
sidebar_bottom_right: '.ct-layout__sidebar_bottom_right'
footer_top_1: '.ct-footer__top__content-top1'
footer_top_2: '.ct-footer__top__content-top2'
footer_middle_1: '.ct-footer__middle__content-middle1'
footer_middle_2: '.ct-footer__middle__content-middle2'
footer_middle_3: '.ct-footer__middle__content-middle3'
footer_middle_4: '.ct-footer__middle__content-middle4'
footer_bottom_1: '.ct-footer__bottom__content-bottom1'
footer_bottom_2: '.ct-footer__bottom__content-bottom2'
hidden: '.hide-xxs'
selectors:
login_form_selector: 'form#user-login,form#user-login-form'
logged_in_selector: 'body.logged-in,body.user-logged-in'
messages:
default: '.messages,.ct-message'
error: '.messages.error,.messages.messages--error,.ct-message.ct-message--error'
success: '.messages.status,.messages.messages--status,.ct-message.ct-message--info'
warning: '.messages.warning,.messages.messages--warning,.ct-message.ct-message--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.
animation: # Record an animated GIF per scenario from per-step screenshots.
enabled: true # Requires the 'gd' PHP extension and a '@javascript' driver.
frame_delay: 500 # Delay between animated GIF frames, in milliseconds.
info_types: # Additional information to include in screenshots.
- url
- feature
- step
- datetime
# Show explicit fail information and continue the test run.
DrevOps\BehatFormatProgressFail\FormatExtension: ~
# Profiles for parallel testing. CI derives the profile number from the index
# of the runner it is on minus 'VORTEX_CI_BEHAT_PROFILE_OFFSET', so profiles
# stay numbered from 'p0' regardless of which runner Behat starts on. Adding a
# runner that runs Behat means adding a profile for its derived number and
# excluding its tag from the 'p0' catch-all below.
# https://www.vortextemplate.com/docs/continuous-integration#test-parallelism
# Runs all tests tagged with '@smoke' or not tagged with '@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'
# 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'