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 5
5
*/
6
6
namespace Magento \FunctionalTestingFramework \Allure \Adapter ;
7
7
8
- use Magento \FunctionalTestingFramework \Data \Argument \Interpreter \NullType ;
9
8
use Magento \FunctionalTestingFramework \Suite \Handlers \SuiteObjectHandler ;
10
9
use Yandex \Allure \Adapter \AllureAdapter ;
11
10
use Yandex \Allure \Adapter \Event \StepStartedEvent ;
11
+ use Yandex \Allure \Adapter \Event \StepFinishedEvent ;
12
+ use Yandex \Allure \Adapter \Event \StepFailedEvent ;
12
13
use Codeception \Event \SuiteEvent ;
13
14
use Codeception \Event \StepEvent ;
14
15
@@ -117,4 +118,18 @@ public function stepBefore(StepEvent $stepEvent)
117
118
$ this ->emptyStep = false ;
118
119
$ this ->getLifecycle ()->fire (new StepStartedEvent ($ stepName ));
119
120
}
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
+ }
120
135
}
You can’t perform that action at this time.
0 commit comments