/var/www/vhosts/nabawater/vendor/codeception/base/ext
Edit: /var/www/vhosts/nabawater/vendor/codeception/base/ext/Recorder.php (20809B)
login();
* $I->amOnUrl('http://codeception.com');
* }
* ```
*
*/
class Recorder extends \Codeception\Extension
{
/** @var array */
protected $config = [
'delete_successful' => true,
'module' => 'WebDriver',
'template' => null,
'animate_slides' => true,
'ignore_steps' => [],
'success_color' => 'success',
'failure_color' => 'danger',
'error_color' => 'dark',
'delete_orphaned' => false,
];
/** @var string */
protected $template = <<
Recorder Result
EOF;
/** @var string */
protected $indicatorTemplate = <<
EOF;
/** @var string */
protected $indexTemplate = <<
Recorder Results Index
EOF;
/** @var string */
protected $slidesTemplate = <<
{{caption}}
scroll up and down to see the full page
EOF;
/** @var array */
public static $events = [
Events::SUITE_BEFORE => 'beforeSuite',
Events::SUITE_AFTER => 'afterSuite',
Events::TEST_BEFORE => 'before',
Events::TEST_ERROR => 'persist',
Events::TEST_FAIL => 'persist',
Events::TEST_SUCCESS => 'cleanup',
Events::STEP_AFTER => 'afterStep',
];
/** @var WebDriver */
protected $webDriverModule;
/** @var string */
protected $dir;
/** @var array */
protected $slides = [];
/** @var int */
protected $stepNum = 0;
/** @var string */
protected $seed;
/** @var array */
protected $seeds;
/** @var array */
protected $recordedTests = [];
/** @var array */
protected $skipRecording = [];
/** @var array */
protected $errorMessages = [];
/** @var bool */
protected $colors;
/** @var bool */
protected $ansi;
public function beforeSuite()
{
$this->webDriverModule = null;
if (!$this->hasModule($this->config['module'])) {
$this->writeln('Recorder is disabled, no available modules');
return;
}
$this->seed = uniqid();
$this->seeds[] = $this->seed;
$this->webDriverModule = $this->getModule($this->config['module']);
$this->skipRecording = [];
$this->errorMessages = [];
$this->ansi = !isset($this->options['no-ansi']);
$this->colors = !isset($this->options['no-colors']);
if (!$this->webDriverModule instanceof ScreenshotSaver) {
throw new ExtensionException(
$this,
'You should pass module which implements ' . ScreenshotSaver::class . ' interface'
);
}
$this->writeln(
sprintf(
'⏺