Skip to content

Commit daa28ec

Browse files
authored
Merge pull request #259 from magento-gl/4.0.1-RC
MFTF 4.0.0 Release checklist
2 parents 3403324 + a506a27 commit daa28ec

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Magento Functional Testing Framework Changelog
22
================================================
33

4+
4.0.1
5+
---------
6+
### Fixes
7+
8+
* Fixed HTML files and images not attached to allure report issue
9+
410
4.0.0
511
---------
612
### Enhancements

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/magento2-functional-testing-framework",
33
"description": "Magento2 Functional Testing Framework",
44
"type": "library",
5-
"version": "4.0.0",
5+
"version": "4.0.1",
66
"license": "AGPL-3.0",
77
"keywords": ["magento", "automation", "functional", "testing"],
88
"config": {

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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.
@@ -910,10 +912,10 @@ public function _failed(TestInterface $test, $fail)
910912
if ($this->current_test === null) {
911913
throw new \RuntimeException("Suite condition failure: \n" . $fail->getMessage());
912914
}
913-
914-
$this->addAttachment($this->pngReport, $test->getMetadata()->getName() . '.png', 'image/png');
915-
$this->addAttachment($this->htmlReport, $test->getMetadata()->getName() . '.html', 'text/html');
916-
915+
YandexAllure::lifecycle()
916+
->fire(new AddAttachmentEvent($this->pngReport, $test->getMetadata()->getName() . '.png', 'image/png'));
917+
YandexAllure::lifecycle()
918+
->fire(new AddAttachmentEvent($this->htmlReport, $test->getMetadata()->getName() . '.html', 'text/html'));
917919
$this->debug("Failure due to : {$fail->getMessage()}");
918920
$this->debug("Screenshot saved to {$this->pngReport}");
919921
$this->debug("Html saved to {$this->htmlReport}");

0 commit comments

Comments
 (0)