public function TestSubContext::afterStepTakeScreenshot in Panopoly 7
Same name and namespace in other branches
- 8.2 modules/panopoly/panopoly_test/behat/steps/panopoly_test.behat.inc \TestSubContext::afterStepTakeScreenshot()
After a failed step, upload a screenshot.
@AfterStep
File
- modules/
panopoly/ panopoly_test/ behat/ steps/ panopoly_test.behat.inc, line 372 - Provide Behat step-definitions for generic Panopoly tests.
Class
Code
public function afterStepTakeScreenshot($event) {
if ($event
->getTestResult()
->getResultCode() === TestResult::FAILED) {
$this
->takeScreenshot($event
->getStep()
->getText());
}
}