Skip to content

Commit

Permalink
mark step as failed (via #60)
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Eroshenko authored Mar 13, 2020
1 parent c47b1ee commit cbbc449
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Yandex/Allure/Codeception/AllureCodeception.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use Yandex\Allure\Adapter\Annotation\Stories;
use Yandex\Allure\Adapter\Annotation\Title;
use Yandex\Allure\Adapter\Event\AddParameterEvent;
use Yandex\Allure\Adapter\Event\StepFailedEvent;
use Yandex\Allure\Adapter\Event\StepFinishedEvent;
use Yandex\Allure\Adapter\Event\StepStartedEvent;
use Yandex\Allure\Adapter\Event\TestCaseBrokenEvent;
Expand Down Expand Up @@ -418,8 +419,11 @@ public function stepBefore(StepEvent $stepEvent)
$this->getLifecycle()->fire(new StepStartedEvent($stepName));
}

public function stepAfter()
public function stepAfter(StepEvent $stepEvent)
{
if ($stepEvent->getStep()->hasFailed()) {
$this->getLifecycle()->fire(new StepFailedEvent());
}
$this->getLifecycle()->fire(new StepFinishedEvent());
}

Expand Down

0 comments on commit cbbc449

Please sign in to comment.