File tree 1 file changed +26
-0
lines changed
src/Magento/FunctionalTestingFramework/Allure/Adapter
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 8
8
use Magento \FunctionalTestingFramework \Data \Argument \Interpreter \NullType ;
9
9
use Magento \FunctionalTestingFramework \Suite \Handlers \SuiteObjectHandler ;
10
10
use Yandex \Allure \Adapter \AllureAdapter ;
11
+ use Yandex \Allure \Adapter \Event \StepStartedEvent ;
11
12
use Codeception \Event \SuiteEvent ;
13
+ use Codeception \Event \StepEvent ;
12
14
13
15
/**
14
16
* Class MagentoAllureAdapter
@@ -91,4 +93,28 @@ private function sanitizeGroupName($group)
91
93
$ originalName = in_array ($ originalName , $ suiteNames ) ? $ originalName : $ group ;
92
94
return $ originalName ;
93
95
}
96
+
97
+ /**
98
+ * Override of parent method, only different to prevent replacing of . to •
99
+ *
100
+ * @param StepEvent $stepEvent
101
+ * @return void
102
+ */
103
+ public function stepBefore (StepEvent $ stepEvent )
104
+ {
105
+ //Hard set to 200; we don't expose this config in MFTF
106
+ $ argumentsLength = 200 ;
107
+ $ stepAction = $ stepEvent ->getStep ()->getHumanizedActionWithoutArguments ();
108
+ $ stepArgs = $ stepEvent ->getStep ()->getArgumentsAsString ($ argumentsLength );
109
+
110
+ if (!trim ($ stepAction )) {
111
+ $ stepAction = $ stepEvent ->getStep ()->getMetaStep ()->getHumanizedActionWithoutArguments ();
112
+ $ stepArgs = $ stepEvent ->getStep ()->getMetaStep ()->getArgumentsAsString ($ argumentsLength );
113
+ }
114
+
115
+ $ stepName = $ stepAction . ' ' . $ stepArgs ;
116
+
117
+ $ this ->emptyStep = false ;
118
+ $ this ->getLifecycle ()->fire (new StepStartedEvent ($ stepName ));
119
+ }
94
120
}
You can’t perform that action at this time.
0 commit comments