|
| 1 | +<?php |
| 2 | +namespace Magento\AcceptanceTest\_default\Backend; |
| 3 | + |
| 4 | +use Magento\FunctionalTestingFramework\AcceptanceTester; |
| 5 | +use \Codeception\Util\Locator; |
| 6 | +use Yandex\Allure\Adapter\Annotation\Features; |
| 7 | +use Yandex\Allure\Adapter\Annotation\Stories; |
| 8 | +use Yandex\Allure\Adapter\Annotation\Title; |
| 9 | +use Yandex\Allure\Adapter\Annotation\Description; |
| 10 | +use Yandex\Allure\Adapter\Annotation\Parameter; |
| 11 | +use Yandex\Allure\Adapter\Annotation\Severity; |
| 12 | +use Yandex\Allure\Adapter\Model\SeverityLevel; |
| 13 | +use Yandex\Allure\Adapter\Annotation\TestCaseId; |
| 14 | + |
| 15 | +/** |
| 16 | + * @group functional |
| 17 | + * @Description("<h3>Test files</h3>verification/TestModule/Test/MergeFunctionalTest/MergedActionGroupReturningValueTest.xml<br>") |
| 18 | + */ |
| 19 | +class MergedActionGroupReturningValueTestCest |
| 20 | +{ |
| 21 | + /** |
| 22 | + * @param AcceptanceTester $I |
| 23 | + * @throws \Exception |
| 24 | + */ |
| 25 | + public function _before(AcceptanceTester $I) |
| 26 | + { |
| 27 | + $I->createEntity("createPersonParam", "hook", "ReplacementPerson", [], []); // stepKey: createPersonParam |
| 28 | + $I->comment("Entering Action Group [beforeGroup] FunctionalActionGroup"); |
| 29 | + $I->fillField("#foo", "myData1"); // stepKey: fillField1BeforeGroup |
| 30 | + $I->fillField("#bar", "myData2"); // stepKey: fillField2BeforeGroup |
| 31 | + $I->comment("Exiting Action Group [beforeGroup] FunctionalActionGroup"); |
| 32 | + } |
| 33 | + |
| 34 | + /** |
| 35 | + * @param AcceptanceTester $I |
| 36 | + * @throws \Exception |
| 37 | + */ |
| 38 | + public function _after(AcceptanceTester $I) |
| 39 | + { |
| 40 | + $I->comment("Entering Action Group [afterGroup] FunctionalActionGroup"); |
| 41 | + $I->fillField("#foo", "myData1"); // stepKey: fillField1AfterGroup |
| 42 | + $I->fillField("#bar", "myData2"); // stepKey: fillField2AfterGroup |
| 43 | + $I->comment("Exiting Action Group [afterGroup] FunctionalActionGroup"); |
| 44 | + } |
| 45 | + |
| 46 | + /** |
| 47 | + * @param AcceptanceTester $I |
| 48 | + * @throws \Exception |
| 49 | + */ |
| 50 | + public function _failed(AcceptanceTester $I) |
| 51 | + { |
| 52 | + $I->saveScreenshot(); // stepKey: saveScreenshot |
| 53 | + } |
| 54 | + |
| 55 | + /** |
| 56 | + * @Severity(level = SeverityLevel::CRITICAL) |
| 57 | + * @Features({"TestModule"}) |
| 58 | + * @Stories({"MQE-433"}) |
| 59 | + * @Parameter(name = "AcceptanceTester", value="$I") |
| 60 | + * @param AcceptanceTester $I |
| 61 | + * @return void |
| 62 | + * @throws \Exception |
| 63 | + */ |
| 64 | + public function MergedActionGroupReturningValueTest(AcceptanceTester $I) |
| 65 | + { |
| 66 | + $I->amOnPage("/someUrl"); // stepKey: step1 |
| 67 | + $I->comment("Entering Action Group [actionGroupWithReturnValue1] MergeActionGroupReturningValueActionGroup"); |
| 68 | + $I->amOnPage("/Jane/Dane.html"); // stepKey: amOnPage1ActionGroupWithReturnValue1 |
| 69 | + $I->click(".merge .Jane"); // stepKey: myMergedClickActionGroupWithReturnValue1 |
| 70 | + $grabMultiple1ActionGroupWithReturnValue1 = $I->grabMultiple("#foo"); // stepKey: grabMultiple1ActionGroupWithReturnValue1 |
| 71 | + $actionGroupWithReturnValue1 = $I->return($grabMultiple1ActionGroupWithReturnValue1); // stepKey: returnValueActionGroupWithReturnValue1 |
| 72 | + $I->comment("Exiting Action Group [actionGroupWithReturnValue1] MergeActionGroupReturningValueActionGroup"); |
| 73 | + $I->comment("Entering Action Group [actionGroupWithStringUsage1] actionGroupWithStringUsage"); |
| 74 | + $I->see($actionGroupWithReturnValue1, "#element .{$actionGroupWithReturnValue1}"); // stepKey: see1ActionGroupWithStringUsage1 |
| 75 | + $I->comment("Exiting Action Group [actionGroupWithStringUsage1] actionGroupWithStringUsage"); |
| 76 | + } |
| 77 | +} |
0 commit comments