File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
src/Magento/FunctionalTestingFramework/Allure/Adapter Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 55 */
66namespace Magento \FunctionalTestingFramework \Allure \Adapter ;
77
8- use Magento \FunctionalTestingFramework \Data \Argument \Interpreter \NullType ;
98use Magento \FunctionalTestingFramework \Suite \Handlers \SuiteObjectHandler ;
109use Yandex \Allure \Adapter \AllureAdapter ;
1110use Yandex \Allure \Adapter \Event \StepStartedEvent ;
11+ use Yandex \Allure \Adapter \Event \StepFinishedEvent ;
12+ use Yandex \Allure \Adapter \Event \StepFailedEvent ;
1213use Codeception \Event \SuiteEvent ;
1314use 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}
You can’t perform that action at this time.
0 commit comments