Skip to content

Commit fddb41f

Browse files
authored
Merge branch 'develop' into MQE-1145
2 parents 7336d71 + e1cd4e1 commit fddb41f

File tree

8 files changed

+29
-22
lines changed

8 files changed

+29
-22
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
Magento Functional Testing Framework Changelog
22
================================================
3+
2.3.12
4+
-----
5+
### Enhancements
6+
* Fetched latest allure-codeception package
37

48
2.3.11
59
-----

bin/mftf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ try {
2929
try {
3030
$application = new Symfony\Component\Console\Application();
3131
$application->setName('Magento Functional Testing Framework CLI');
32-
$application->setVersion('2.3.11');
32+
$application->setVersion('2.3.12');
3333
/** @var \Magento\FunctionalTestingFramework\Console\CommandListInterface $commandList */
3434
$commandList = new \Magento\FunctionalTestingFramework\Console\CommandList;
3535
foreach ($commandList->getCommands() as $command) {

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
"name": "magento/magento2-functional-testing-framework",
33
"description": "Magento2 Functional Testing Framework",
44
"type": "library",
5-
"version": "2.3.11",
5+
"version": "2.3.12",
66
"license": "AGPL-3.0",
77
"keywords": ["magento", "automation", "functional", "testing"],
88
"config": {
99
"sort-packages": true
1010
},
1111
"require": {
1212
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0|~7.2.0",
13+
"allure-framework/allure-codeception": "~1.3.0",
1314
"ext-curl": "*",
14-
"allure-framework/allure-codeception": "~1.2.6",
15-
"codeception/codeception": "~2.3.4",
15+
"codeception/codeception": "~2.3.4 || ~2.4.0 ",
1616
"consolidation/robo": "^1.0.0",
1717
"epfremme/swagger-php": "^2.0",
1818
"flow/jsonpath": ">0.2",

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

etc/config/codeception.dist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extensions:
1515
- Magento\FunctionalTestingFramework\Extension\TestContextExtension
1616
- Magento\FunctionalTestingFramework\Allure\Adapter\MagentoAllureAdapter
1717
config:
18-
Yandex\Allure\Adapter\AllureAdapter:
18+
Magento\FunctionalTestingFramework\Allure\Adapter\MagentoAllureAdapter:
1919
deletePreviousResults: true
2020
outputDirectory: allure-results
2121
ignoredAnnotations:

src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Magento\FunctionalTestingFramework\Allure\Adapter;
77

88
use Magento\FunctionalTestingFramework\Suite\Handlers\SuiteObjectHandler;
9-
use Yandex\Allure\Adapter\AllureAdapter;
9+
use Yandex\Allure\Codeception\AllureCodeception;
1010
use Yandex\Allure\Adapter\Event\StepStartedEvent;
1111
use Yandex\Allure\Adapter\Event\StepFinishedEvent;
1212
use Yandex\Allure\Adapter\Event\StepFailedEvent;
@@ -23,7 +23,7 @@
2323
* @package Magento\FunctionalTestingFramework\Allure
2424
*/
2525

26-
class MagentoAllureAdapter extends AllureAdapter
26+
class MagentoAllureAdapter extends AllureCodeception
2727
{
2828
/**
2929
* Array of group values passed to test runner command

src/Magento/FunctionalTestingFramework/DataGenerator/Handlers/CredentialStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private function encryptCredFileContents($credContents)
131131
continue;
132132
}
133133

134-
list($key, $value) = explode("=", $credValue);
134+
list($key, $value) = explode("=", $credValue, 2);
135135
if (!empty($value)) {
136136
$encryptedCreds[$key] = openssl_encrypt(
137137
$value,

src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
class TestContextExtension extends BaseExtension
1717
{
1818
const TEST_PHASE_AFTER = "_after";
19+
const CODECEPT_AFTER_VERSION = "2.3.9";
1920
const TEST_FAILED_FILE = 'failed';
2021

2122
/**
@@ -69,7 +70,7 @@ public function testFail(\Codeception\Event\FailEvent $e)
6970
$this->runAfterBlock($e, $cest);
7071
}
7172
}
72-
73+
7374
/**
7475
* Codeception event listener function, triggered on test ending (naturally or by error).
7576
* @param \Codeception\Event\TestEvent $e
@@ -117,13 +118,15 @@ private function runAfterBlock($e, $cest)
117118
try {
118119
$actorClass = $e->getTest()->getMetadata()->getCurrent('actor');
119120
$I = new $actorClass($cest->getScenario());
120-
call_user_func(\Closure::bind(
121-
function () use ($cest, $I) {
122-
$cest->executeHook($I, 'after');
123-
},
124-
null,
125-
$cest
126-
));
121+
if (version_compare(Codeception\Codecept::VERSION, TestContextExtension::CODECEPT_AFTER_VERSION, "<=")) {
122+
call_user_func(\Closure::bind(
123+
function () use ($cest, $I) {
124+
$cest->executeHook($I, 'after');
125+
},
126+
null,
127+
$cest
128+
));
129+
}
127130
} catch (\Exception $e) {
128131
// Do not rethrow Exception
129132
}

0 commit comments

Comments
 (0)