Skip to content

Commit 1033b71

Browse files
authored
Merge branch 'develop' into MQE-1279
2 parents 999b5c3 + ecac043 commit 1033b71

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
*/
66
namespace Magento\FunctionalTestingFramework\Allure\Adapter;
77

8-
use Magento\FunctionalTestingFramework\Data\Argument\Interpreter\NullType;
98
use Magento\FunctionalTestingFramework\Suite\Handlers\SuiteObjectHandler;
109
use Yandex\Allure\Adapter\AllureAdapter;
1110
use Yandex\Allure\Adapter\Event\StepStartedEvent;
11+
use Yandex\Allure\Adapter\Event\StepFinishedEvent;
12+
use Yandex\Allure\Adapter\Event\StepFailedEvent;
1213
use Codeception\Event\SuiteEvent;
1314
use Codeception\Event\StepEvent;
1415

@@ -117,4 +118,18 @@ public function stepBefore(StepEvent $stepEvent)
117118
$this->emptyStep = false;
118119
$this->getLifecycle()->fire(new StepStartedEvent($stepName));
119120
}
121+
122+
/**
123+
* Override of parent method, fires StepFailedEvent if step has failed (for xml output)
124+
* @param StepEvent $stepEvent
125+
* @throws \Yandex\Allure\Adapter\AllureException
126+
* @return void
127+
*/
128+
public function stepAfter(StepEvent $stepEvent = null)
129+
{
130+
if ($stepEvent->getStep()->hasFailed()) {
131+
$this->getLifecycle()->fire(new StepFailedEvent());
132+
}
133+
$this->getLifecycle()->fire(new StepFinishedEvent());
134+
}
120135
}

0 commit comments

Comments
 (0)