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\Behat\Event\StepEvent;
|
||||||
|
|
||||||
use Behat\Mink\Mink;
|
use Behat\Mink\Mink;
|
||||||
|
use Behat\Mink\Exception\Exception as MinkException;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the Behat\MinkExtension.
|
* This file is part of the Behat\MinkExtension.
|
||||||
@@ -80,6 +81,10 @@ class FailureShowListener implements EventSubscriberInterface
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$event->getException() instanceof MinkException) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (null === $this->parameters['show_cmd']) {
|
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")');
|
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