Skip to content

Commit 7cfb053

Browse files
authored
Merge branch 'develop' into ACQE-4310
2 parents 0e7c386 + fa5739b commit 7cfb053

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
use Yandex\Allure\Adapter\Support\AttachmentSupport;
3131
use Magento\FunctionalTestingFramework\Exceptions\TestFrameworkException;
3232
use Magento\FunctionalTestingFramework\DataGenerator\Handlers\PersistedObjectHandler;
33+
use Yandex\Allure\Adapter\Allure as YandexAllure;
34+
use Yandex\Allure\Adapter\Event\AddAttachmentEvent;
3335

3436
/**
3537
* MagentoWebDriver module provides common Magento web actions through Selenium WebDriver.
@@ -911,10 +913,10 @@ public function _failed(TestInterface $test, $fail)
911913
throw new \RuntimeException("Suite condition failure: \n"
912914
. " Something went wrong with selenium server/chrome driver ");
913915
}
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'));
918920
$this->debug("Failure due to : {$fail->getMessage()}");
919921
$this->debug("Screenshot saved to {$this->pngReport}");
920922
$this->debug("Html saved to {$this->htmlReport}");

0 commit comments

Comments
 (0)