File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/Magento/FunctionalTestingFramework/Module Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 30
30
use Yandex \Allure \Adapter \Support \AttachmentSupport ;
31
31
use Magento \FunctionalTestingFramework \Exceptions \TestFrameworkException ;
32
32
use Magento \FunctionalTestingFramework \DataGenerator \Handlers \PersistedObjectHandler ;
33
+ use Yandex \Allure \Adapter \Allure as YandexAllure ;
34
+ use Yandex \Allure \Adapter \Event \AddAttachmentEvent ;
33
35
34
36
/**
35
37
* MagentoWebDriver module provides common Magento web actions through Selenium WebDriver.
@@ -911,10 +913,10 @@ public function _failed(TestInterface $test, $fail)
911
913
throw new \RuntimeException ("Suite condition failure: \n"
912
914
. " Something went wrong with selenium server/chrome driver " );
913
915
}
914
-
915
- $ this -> addAttachment ( $ this ->pngReport , $ test ->getMetadata ()->getName () . '.png ' , 'image/png ' );
916
- $ this -> addAttachment ( $ this -> htmlReport , $ test -> getMetadata ()-> getName () . ' .html ' , ' text/html ' );
917
-
916
+ YandexAllure:: lifecycle ()
917
+ -> fire ( new AddAttachmentEvent ( $ this ->pngReport , $ test ->getMetadata ()->getName () . '.png ' , 'image/png ' ) );
918
+ YandexAllure:: lifecycle ()
919
+ -> fire ( new AddAttachmentEvent ( $ this -> htmlReport , $ test -> getMetadata ()-> getName () . ' .html ' , ' text/html ' ));
918
920
$ this ->debug ("Failure due to : {$ fail ->getMessage ()}" );
919
921
$ this ->debug ("Screenshot saved to {$ this ->pngReport }" );
920
922
$ this ->debug ("Html saved to {$ this ->htmlReport }" );
You can’t perform that action at this time.
0 commit comments