Do not show page if exception's not from Mink
This commit is contained in:
@@ -7,6 +7,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Behat\Behat\Event\StepEvent;
|
||||
|
||||
use Behat\Mink\Mink;
|
||||
use Behat\Mink\Exception\Exception as MinkException;
|
||||
|
||||
/*
|
||||
* This file is part of the Behat\MinkExtension.
|
||||
@@ -79,6 +80,10 @@ class FailureShowListener implements EventSubscriberInterface
|
||||
if (StepEvent::FAILED !== $event->getResult()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$event->getException() instanceof MinkException) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (null === $this->parameters['show_cmd']) {
|
||||
throw new \RuntimeException('Set "show_cmd" parameter in behat.yml to be able to open page in browser (ex.: "show_cmd: open %s")');
|
||||
|
||||
Reference in New Issue
Block a user