You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,9 +23,7 @@ composer test # Run PHPUnit tests without coverage
23
23
- Coverage reports are generated in .logs/coverage directory
24
24
25
25
## Recent Improvements
26
-
- Added support for fullscreen screenshots with two algorithms:
27
-
- Stitch algorithm (default): Takes multiple screenshots while scrolling and stitches them together
28
-
- Resize algorithm: Temporarily resizes browser window to capture full page
26
+
- Fullscreen screenshots use the resize algorithm (temporarily resizes browser window to capture full page)
29
27
- Updated autoloader from PSR-0 to PSR-4
30
28
- Made constants public as per PHP 8.2+ standards
31
29
- Improved error messages for file operations
@@ -37,7 +35,7 @@ composer test # Run PHPUnit tests without coverage
37
35
The Behat Screenshot extension provides functionality to capture screenshots during Behat test runs. Its main components are:
38
36
39
37
1.**BehatScreenshotExtension**: Handles configuration and service container integration
40
-
2.**ScreenshotContext**: Provides Behat steps and screenshot capabilities, including fullscreen screenshot functionality with both stitch and resize algorithms
38
+
2.**ScreenshotContext**: Provides Behat steps and screenshot capabilities, including fullscreen screenshot functionality
41
39
3.**Tokenizer**: Processes dynamic filename generation with tokens
@@ -89,24 +88,8 @@ Given I am on "http://google.com"
89
88
Then I save fullscreen screenshot
90
89
```
91
90
92
-
There are two algorithms available for capturing fullscreen screenshots:
93
-
94
-
1.**Resize** (default): Temporarily resizes the browser window to the full height of the
95
-
page to capture everything in one screenshot. This is faster, but may cause
96
-
layout issues on some pages.
97
-
98
-
2.**Stitch**: Takes multiple screenshots while scrolling the page and
99
-
stitches them together. This produces high-quality results with proper
100
-
content rendering but requires the GD extension.
101
-
102
-
You can configure which algorithm to use via the `fullscreen_algorithm` option:
103
-
104
-
```yaml
105
-
default:
106
-
extensions:
107
-
DrevOps\BehatScreenshotExtension:
108
-
fullscreen_algorithm: resize # Options: 'stitch' or 'resize'
109
-
```
91
+
Fullscreen screenshots work by temporarily resizing the browser window to the
92
+
full height of the page to capture everything in one screenshot.
110
93
111
94
You may optionally specify the size of the browser window in the screenshot
112
95
step:
@@ -173,7 +156,6 @@ The `@screenshots` tag takes precedence over the global configuration, allowing
173
156
| `on_every_step` | `false` | Automatically capture screenshots after every step. Can be enabled globally via config or per-scenario using the `@screenshots` tag. Only captures on passed steps to avoid duplicates with `on_failed`. |
174
157
| `purge` | `false` | Remove all files from the screenshots directory on each test run. Useful during debugging of tests. |
175
158
| `always_fullscreen` | `false` | Always use fullscreen screenshot capture for all screenshot steps, including regular screenshot steps. When enabled, all `I save screenshot` steps will behave like `I save fullscreen screenshot`. |
176
-
| `fullscreen_algorithm` | `resize` | Algorithm to use for fullscreen screenshots. Options: `resize`(temporarily resizes browser window to full page height) or `stitch` (captures multiple screenshots while scrolling and stitches them together). The stitch algorithm requires GD extension but produces higher quality results. |
177
159
| `info_types` | `url`, `feature`, `step`, `datetime` | Show additional information on screenshots. Comma-separated list of `url`, `feature`, `step`, `datetime`, or remove to disable. Ordered as listed. |
178
160
| `failed_prefix` | `failed_` | Prefix failed screenshots with `failed_` string. Useful to distinguish failed and intended screenshots. |
179
161
| `filename_pattern` | `{datetime:u}.{feature_file}.feature_{step_line}.{ext}` | File name pattern for successful assertions. |
0 commit comments