Skip to content

Commit

Permalink
Merge branch 'develop' into AM/severity-levels
Browse files Browse the repository at this point in the history
  • Loading branch information
tomreece authored Jul 24, 2020
2 parents f958045 + ef5be1d commit c996fb4
Show file tree
Hide file tree
Showing 38 changed files with 952 additions and 98 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ Magento Functional Testing Framework Changelog
* [MFTF 3.0.0 RC2](https://www.youtube.com/watch?v=BJOQAw6dX5o)
* [MFTF 3.0.0 RC3](https://www.youtube.com/watch?v=scLb7pi8pR0)

2.6.4
-----

### Fixes
* added dependency to packages MFTF used but never specified in composer.json

2.6.3
-----

Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-hacker
2 changes: 1 addition & 1 deletion bin/mftf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ try {
$version = $version['version'];
$application = new Symfony\Component\Console\Application();
$application->setName('Magento Functional Testing Framework CLI');
$application->setVersion('3.0.0');
$application->setVersion($version);
/** @var \Magento\FunctionalTestingFramework\Console\CommandListInterface $commandList */
$commandList = new \Magento\FunctionalTestingFramework\Console\CommandList;
foreach ($commandList->getCommands() as $command) {
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/magento2-functional-testing-framework",
"description": "Magento2 Functional Testing Framework",
"type": "library",
"version": "3.0.0-RC5",
"version": "3.0.0",
"license": "AGPL-3.0",
"keywords": ["magento", "automation", "functional", "testing"],
"config": {
Expand Down Expand Up @@ -30,6 +30,7 @@
"spomky-labs/otphp": "^10.0",
"symfony/console": "^4.4",
"symfony/finder": "^5.0",
"symfony/http-foundation": "^5.0",
"symfony/mime": "^5.0",
"symfony/process": "^4.4",
"vlucas/phpdotenv": "^2.4",
Expand Down
147 changes: 134 additions & 13 deletions composer.lock

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

75 changes: 75 additions & 0 deletions dev/tests/verification/Resources/ActionGroupReturningValueTest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php
namespace Magento\AcceptanceTest\_default\Backend;

use Magento\FunctionalTestingFramework\AcceptanceTester;
use \Codeception\Util\Locator;
use Yandex\Allure\Adapter\Annotation\Features;
use Yandex\Allure\Adapter\Annotation\Stories;
use Yandex\Allure\Adapter\Annotation\Title;
use Yandex\Allure\Adapter\Annotation\Description;
use Yandex\Allure\Adapter\Annotation\Parameter;
use Yandex\Allure\Adapter\Annotation\Severity;
use Yandex\Allure\Adapter\Model\SeverityLevel;
use Yandex\Allure\Adapter\Annotation\TestCaseId;

/**
* @group functional
* @Description("<h3>Test files</h3>verification/TestModule/Test/ActionGroupFunctionalTest/ActionGroupReturningValueTest.xml<br>")
*/
class ActionGroupReturningValueTestCest
{
/**
* @param AcceptanceTester $I
* @throws \Exception
*/
public function _before(AcceptanceTester $I)
{
$I->createEntity("createPersonParam", "hook", "ReplacementPerson", [], []); // stepKey: createPersonParam
$I->comment("Entering Action Group [beforeGroup] FunctionalActionGroup");
$I->fillField("#foo", "myData1"); // stepKey: fillField1BeforeGroup
$I->fillField("#bar", "myData2"); // stepKey: fillField2BeforeGroup
$I->comment("Exiting Action Group [beforeGroup] FunctionalActionGroup");
}

/**
* @param AcceptanceTester $I
* @throws \Exception
*/
public function _after(AcceptanceTester $I)
{
$I->comment("Entering Action Group [afterGroup] FunctionalActionGroup");
$I->fillField("#foo", "myData1"); // stepKey: fillField1AfterGroup
$I->fillField("#bar", "myData2"); // stepKey: fillField2AfterGroup
$I->comment("Exiting Action Group [afterGroup] FunctionalActionGroup");
}

/**
* @param AcceptanceTester $I
* @throws \Exception
*/
public function _failed(AcceptanceTester $I)
{
$I->saveScreenshot(); // stepKey: saveScreenshot
}

/**
* @Severity(level = SeverityLevel::CRITICAL)
* @Features({"TestModule"})
* @Stories({"MQE-433"})
* @Parameter(name = "AcceptanceTester", value="$I")
* @param AcceptanceTester $I
* @return void
* @throws \Exception
*/
public function ActionGroupReturningValueTest(AcceptanceTester $I)
{
$I->amOnPage("/someUrl"); // stepKey: step1
$I->comment("Entering Action Group [actionGroupWithReturnValue1] FunctionalActionGroupWithReturnValueActionGroup");
$grabTextFrom1ActionGroupWithReturnValue1 = $I->grabTextFrom("#foo"); // stepKey: grabTextFrom1ActionGroupWithReturnValue1
$actionGroupWithReturnValue1 = $I->return($grabTextFrom1ActionGroupWithReturnValue1); // stepKey: returnActionGroupWithReturnValue1
$I->comment("Exiting Action Group [actionGroupWithReturnValue1] FunctionalActionGroupWithReturnValueActionGroup");
$I->comment("Entering Action Group [actionGroupWithStringUsage1] actionGroupWithStringUsage");
$I->see($actionGroupWithReturnValue1, "#element .{$actionGroupWithReturnValue1}"); // stepKey: see1ActionGroupWithStringUsage1
$I->comment("Exiting Action Group [actionGroupWithStringUsage1] actionGroupWithStringUsage");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php
namespace Magento\AcceptanceTest\_default\Backend;

use Magento\FunctionalTestingFramework\AcceptanceTester;
use \Codeception\Util\Locator;
use Yandex\Allure\Adapter\Annotation\Features;
use Yandex\Allure\Adapter\Annotation\Stories;
use Yandex\Allure\Adapter\Annotation\Title;
use Yandex\Allure\Adapter\Annotation\Description;
use Yandex\Allure\Adapter\Annotation\Parameter;
use Yandex\Allure\Adapter\Annotation\Severity;
use Yandex\Allure\Adapter\Model\SeverityLevel;
use Yandex\Allure\Adapter\Annotation\TestCaseId;

/**
* @Title("[NO TESTCASEID]: Extended ActionGroup Returning Value Test")
* @Description("<h3>Test files</h3>verification/TestModule/Test/ActionGroupTest/ExtendedActionGroupReturningValueTest.xml<br>")
*/
class ExtendedActionGroupReturningValueTestCest
{
/**
* @Severity(level = SeverityLevel::CRITICAL)
* @Features({"TestModule"})
* @Parameter(name = "AcceptanceTester", value="$I")
* @param AcceptanceTester $I
* @return void
* @throws \Exception
*/
public function ExtendedActionGroupReturningValueTest(AcceptanceTester $I)
{
$I->comment("Entering Action Group [actionGroupReturningValue] ActionGroupReturningValueActionGroup");
$grabProducts1ActionGroupReturningValue = $I->grabMultiple("selector"); // stepKey: grabProducts1ActionGroupReturningValue
$I->assertCount(99, $grabProducts1ActionGroupReturningValue); // stepKey: assertCountActionGroupReturningValue
$actionGroupReturningValue = $I->return($grabProducts1ActionGroupReturningValue); // stepKey: returnProducts1ActionGroupReturningValue
$I->comment("Exiting Action Group [actionGroupReturningValue] ActionGroupReturningValueActionGroup");
$I->comment("Entering Action Group [actionGroupWithStringUsage1] actionGroupWithStringUsage");
$I->see($actionGroupReturningValue, "#element .{$actionGroupReturningValue}"); // stepKey: see1ActionGroupWithStringUsage1
$I->comment("Exiting Action Group [actionGroupWithStringUsage1] actionGroupWithStringUsage");
}
}
Loading

0 comments on commit c996fb4

Please sign in to comment.