File tree 1 file changed +6
-1
lines changed
src/Yandex/Allure/Codeception
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) {
252
252
$ testName .= ' with data set # ' . $ this ->testInvocations [$ testFullName ];
253
253
}
254
254
} else if ($ test instanceof Gherkin) {
255
- $ testName = $ test ->getMetadata ()->getFeature ();
255
+ $ testName = $ test ->getFeatureNode ()->getTitle ();
256
256
}
257
257
return $ testName ;
258
258
}
@@ -394,6 +394,11 @@ public function testEnd(TestEvent $testEvent)
394
394
foreach ($ artifacts as $ name => $ artifact ) {
395
395
Allure::lifecycle ()->fire (new AddAttachmentEvent ($ artifact , $ name , null ));
396
396
}
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
+ }
397
402
}
398
403
$ this ->getLifecycle ()->fire (new TestCaseFinishedEvent ());
399
404
}
You can’t perform that action at this time.
0 commit comments