-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathScreenshotAwareContextInterface.php
More file actions
64 lines (55 loc) · 1.62 KB
/
ScreenshotAwareContextInterface.php
File metadata and controls
64 lines (55 loc) · 1.62 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
<?php
declare(strict_types=1);
namespace DrevOps\BehatScreenshotExtension\Context;
use Behat\Behat\Context\Context;
/**
* Interface ScreenshotContext.
*/
interface ScreenshotAwareContextInterface extends Context {
/**
* Set context parameters.
*
* @param string $dir
* Directory to store screenshots.
* @param bool $on_failed
* Create screenshots on fail.
* @param string $failed_prefix
* File name prefix for a failed test.
* @param bool $always_fullscreen
* Always take fullscreen screenshots.
* @param bool $on_every_step
* Capture screenshot after every step.
* @param string $filename_pattern
* File name pattern.
* @param string $filename_pattern_failed
* File name pattern failed.
* @param array<int,string> $info_types
* Show these info types in the screenshot.
*
* @return $this
*/
public function setScreenshotParameters(string $dir, bool $on_failed, string $failed_prefix, bool $always_fullscreen, bool $on_every_step, string $filename_pattern, string $filename_pattern_failed, array $info_types): static;
/**
* Save screenshot content into a file.
*
* @param array<string,mixed> $options
* Contextual options.
*/
public function screenshot(array $options): void;
/**
* Adds information to context.
*
* @param string $label
* Debug information label.
* @param string $value
* Debug information value.
*/
public function appendInfo(string $label, string $value): void;
/**
* Render information.
*
* @return string
* Rendered debug information.
*/
public function renderInfo(): string;
}