Using the ScreenshotContext I did some changes that maybe you want to have in your repository:
Obtain screenshots dir (/tmp) from a method. This allows classes which extend it to implement their own screenshots dir.
When taking screenshots for php notices, also take screenshots for warnings as it could be useful.
When taking screenshot after failed step, check the step has failed by this condition:
if ($event->getTestResult()->getResultCode() !== TestResult::FAILED) {
Checking only the test has not passed would make an screenshot also a step is pending, not only when it fails.
Allow override way to take screenshots when a step has failed. This is useful for classes which extends ScreenshotContext.
Could this changes be good to apply in the main repository?
Thanks!
Hi.
Using the ScreenshotContext I did some changes that maybe you want to have in your repository:
if ($event->getTestResult()->getResultCode() !== TestResult::FAILED) {
Checking only the test has not passed would make an screenshot also a step is pending, not only when it fails.Could this changes be good to apply in the main repository? Thanks!