Skip to content

Commit

Permalink
Merge branch 'develop' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
jilu1 authored Jan 22, 2019
2 parents f44f975 + c80e1d3 commit 698f0a0
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 21 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Magento Functional Testing Framework Changelog
================================================
2.3.12
-----
### Enhancements
* Fetched latest allure-codeception package

2.3.11
-----
Expand Down
2 changes: 1 addition & 1 deletion bin/mftf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ try {
try {
$application = new Symfony\Component\Console\Application();
$application->setName('Magento Functional Testing Framework CLI');
$application->setVersion('2.3.11');
$application->setVersion('2.3.12');
/** @var \Magento\FunctionalTestingFramework\Console\CommandListInterface $commandList */
$commandList = new \Magento\FunctionalTestingFramework\Console\CommandList;
foreach ($commandList->getCommands() as $command) {
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"name": "magento/magento2-functional-testing-framework",
"description": "Magento2 Functional Testing Framework",
"type": "library",
"version": "2.3.11",
"version": "2.3.12",
"license": "AGPL-3.0",
"keywords": ["magento", "automation", "functional", "testing"],
"config": {
"sort-packages": true
},
"require": {
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0|~7.2.0",
"allure-framework/allure-codeception": "~1.3.0",
"ext-curl": "*",
"allure-framework/allure-codeception": "~1.2.6",
"codeception/codeception": "~2.3.4",
"codeception/codeception": "~2.3.4 || ~2.4.0 ",
"consolidation/robo": "^1.0.0",
"epfremme/swagger-php": "^2.0",
"flow/jsonpath": ">0.2",
Expand Down
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion etc/config/codeception.dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extensions:
- Magento\FunctionalTestingFramework\Extension\TestContextExtension
- Magento\FunctionalTestingFramework\Allure\Adapter\MagentoAllureAdapter
config:
Yandex\Allure\Adapter\AllureAdapter:
Magento\FunctionalTestingFramework\Allure\Adapter\MagentoAllureAdapter:
deletePreviousResults: true
outputDirectory: allure-results
ignoredAnnotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Magento\FunctionalTestingFramework\Allure\Adapter;

use Magento\FunctionalTestingFramework\Suite\Handlers\SuiteObjectHandler;
use Yandex\Allure\Adapter\AllureAdapter;
use Yandex\Allure\Codeception\AllureCodeception;
use Yandex\Allure\Adapter\Event\StepStartedEvent;
use Yandex\Allure\Adapter\Event\StepFinishedEvent;
use Yandex\Allure\Adapter\Event\StepFailedEvent;
Expand All @@ -23,7 +23,7 @@
* @package Magento\FunctionalTestingFramework\Allure
*/

class MagentoAllureAdapter extends AllureAdapter
class MagentoAllureAdapter extends AllureCodeception
{
/**
* Array of group values passed to test runner command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
class TestContextExtension extends BaseExtension
{
const TEST_PHASE_AFTER = "_after";
const CODECEPT_AFTER_VERSION = "2.3.9";
const TEST_FAILED_FILE = 'failed';

/**
Expand Down Expand Up @@ -69,7 +70,7 @@ public function testFail(\Codeception\Event\FailEvent $e)
$this->runAfterBlock($e, $cest);
}
}

/**
* Codeception event listener function, triggered on test ending (naturally or by error).
* @param \Codeception\Event\TestEvent $e
Expand Down Expand Up @@ -117,13 +118,15 @@ private function runAfterBlock($e, $cest)
try {
$actorClass = $e->getTest()->getMetadata()->getCurrent('actor');
$I = new $actorClass($cest->getScenario());
call_user_func(\Closure::bind(
function () use ($cest, $I) {
$cest->executeHook($I, 'after');
},
null,
$cest
));
if (version_compare(Codeception\Codecept::VERSION, TestContextExtension::CODECEPT_AFTER_VERSION, "<=")) {
call_user_func(\Closure::bind(
function () use ($cest, $I) {
$cest->executeHook($I, 'after');
},
null,
$cest
));
}
} catch (\Exception $e) {
// Do not rethrow Exception
}
Expand Down

0 comments on commit 698f0a0

Please sign in to comment.