File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/Yandex/Allure/Codeception Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ private function buildTestName($test) {
252252 $ testName .= ' with data set # ' . $ this ->testInvocations [$ testFullName ];
253253 }
254254 } else if ($ test instanceof Gherkin) {
255- $ testName = $ test ->getMetadata ()->getFeature ();
255+ $ testName = $ test ->getFeatureNode ()->getTitle ();
256256 }
257257 return $ testName ;
258258 }
@@ -394,6 +394,11 @@ public function testEnd(TestEvent $testEvent)
394394 foreach ($ artifacts as $ name => $ artifact ) {
395395 Allure::lifecycle ()->fire (new AddAttachmentEvent ($ artifact , $ name , null ));
396396 }
397+ } elseif (version_compare (Codecept::VERSION , '3.0.0 ' ) > -1 && $ testEvent ->getTest () instanceof Gherkin) {
398+ $ artifacts = $ testEvent ->getTest ()->getMetadata ()->getReports ();
399+ foreach ($ artifacts as $ name => $ artifact ) {
400+ Allure::lifecycle ()->fire (new AddAttachmentEvent ($ artifact , $ name , null ));
401+ }
397402 }
398403 $ this ->getLifecycle ()->fire (new TestCaseFinishedEvent ());
399404 }
You can’t perform that action at this time.
0 commit comments