Skip to content

Commit 76693d9

Browse files
authored
Merge pull request #581 from magento/MQE-1961
MQE-1961 Remove deprecated actions
2 parents b68484f + 7c3609a commit 76693d9

18 files changed

+7
-198
lines changed

dev/tests/verification/Resources/BasicFunctionalTest.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use Yandex\Allure\Adapter\Annotation\TestCaseId;
1515
/**
1616
* @Title("[NO TESTCASEID]: A Functional Cest")
1717
* @group functional
18-
* @Description("<h3 class='y-label y-label_status_broken'>Deprecated Notice(s):</h3><ul><li>DEPRECATED ACTION in Test: at step performOnKey1 'performOn' is DEPRECATED and will be removed in MFTF 3.0.0.</li></ul><h3>Test files</h3>verification/TestModule/Test/BasicFunctionalTest.xml<br>")
18+
* @Description("<h3>Test files</h3>verification/TestModule/Test/BasicFunctionalTest.xml<br>")
1919
*/
2020
class BasicFunctionalTestCest
2121
{
@@ -139,7 +139,6 @@ class BasicFunctionalTestCest
139139
$I->moveMouseOver(".functionalTestSelector"); // stepKey: moveMouseOverKey1
140140
$I->openNewTab(); // stepKey: openNewTabKey1
141141
$I->pauseExecution(); // stepKey: pauseExecutionKey1
142-
$I->performOn("#selector", function(\WebDriverElement $el) {return $el->isDisplayed();}, 10); // stepKey: performOnKey1
143142
$I->pressKey("#page", "a"); // stepKey: pressKey1
144143
$I->pressKey("#page", ['ctrl', 'a'],'new'); // stepKey: pressKey2
145144
$I->pressKey("#page", ['shift', '111'],'1','x'); // stepKey: pressKey3
Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +0,0 @@
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-
* @Description("<h3 class='y-label y-label_status_broken'>Deprecated Notice(s):</h3><ul><li>DEPRECATED ACTION in Test: at step executeInSeleniumStep 'executeInSelenium' is DEPRECATED and will be removed in MFTF 3.0.0.</li></ul><h3>Test files</h3>verification/TestModule/Test/ExecuteInSeleniumTest.xml<br>")
17-
*/
18-
class ExecuteInSeleniumTestCest
19-
{
20-
/**
21-
* @Features({"TestModule"})
22-
* @Parameter(name = "AcceptanceTester", value="$I")
23-
* @param AcceptanceTester $I
24-
* @return void
25-
* @throws \Exception
26-
*/
27-
public function ExecuteInSeleniumTest(AcceptanceTester $I)
28-
{
29-
$I->executeInSelenium(function ($webdriver) { return "Hello, World!"}); // stepKey: executeInSeleniumStep
30-
}
31-
}

dev/tests/verification/TestModule/ActionGroup/XmlDuplicateActionGroup.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@
7878
<doubleClick selector="1" stepKey="dblclick2"/>
7979
<dragAndDrop selector1="1" selector2="2" stepKey="dragndrop1"/>
8080
<dragAndDrop selector1="1" selector2="2" stepKey="dragndrop2"/>
81-
<executeInSelenium function="1" stepKey="executeSelenium1"/>
82-
<executeInSelenium function="1" stepKey="executeSelenium2"/>
8381
<executeJS function="1" stepKey="execJS1"/>
8482
<executeJS function="1" stepKey="execJS2"/>
8583
<fillField stepKey="fill1"/>
@@ -126,8 +124,6 @@
126124
<parseFloat stepKey="parsefloat12"/>
127125
<pauseExecution stepKey="pause1"/>
128126
<pauseExecution stepKey="pause12"/>
129-
<performOn selector="1" function="1" stepKey="performon1"/>
130-
<performOn selector="1" function="1" stepKey="performon12"/>
131127
<pressKey selector="1" stepKey="press1"/>
132128
<pressKey selector="1" stepKey="press12"/>
133129
<reloadPage stepKey="reload1"/>

dev/tests/verification/TestModule/Test/BasicFunctionalTest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
<moveMouseOver selector=".functionalTestSelector" stepKey="moveMouseOverKey1"/>
9090
<openNewTab stepKey="openNewTabKey1"/>
9191
<pauseExecution stepKey="pauseExecutionKey1"/>
92-
<performOn selector="#selector" function="function(\WebDriverElement $el) {return $el->isDisplayed();}" stepKey="performOnKey1"/>
9392
<pressKey selector="#page" userInput="a" stepKey="pressKey1"/>
9493
<pressKey selector="#page" parameterArray="[['ctrl','a'],'new']" stepKey="pressKey2"/>
9594
<pressKey selector="#page" parameterArray="[['shift','111'],'1','x']" stepKey="pressKey3"/>

dev/tests/verification/TestModule/Test/ExecuteInSeleniumTest.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.

dev/tests/verification/TestModule/Test/XmlDuplicateTest.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@
8282
<doubleClick selector="1" stepKey="dblclick2"/>
8383
<dragAndDrop selector1="1" selector2="2" stepKey="dragndrop1"/>
8484
<dragAndDrop selector1="1" selector2="2" stepKey="dragndrop2"/>
85-
<executeInSelenium function="1" stepKey="executeSelenium1"/>
86-
<executeInSelenium function="1" stepKey="executeSelenium2"/>
8785
<executeJS function="1" stepKey="execJS1"/>
8886
<executeJS function="1" stepKey="execJS2"/>
8987
<fillField stepKey="fill1"/>
@@ -130,8 +128,6 @@
130128
<parseFloat stepKey="parsefloat12"/>
131129
<pauseExecution stepKey="pause1"/>
132130
<pauseExecution stepKey="pause12"/>
133-
<performOn selector="1" function="1" stepKey="performon1"/>
134-
<performOn selector="1" function="1" stepKey="performon12"/>
135131
<pressKey selector="1" stepKey="press1"/>
136132
<pressKey selector="1" stepKey="press12"/>
137133
<reloadPage stepKey="reload1"/>
@@ -298,8 +294,6 @@
298294
<doubleClick selector="1" stepKey="dblclick2"/>
299295
<dragAndDrop selector1="1" selector2="2" stepKey="dragndrop1"/>
300296
<dragAndDrop selector1="1" selector2="2" stepKey="dragndrop2"/>
301-
<executeInSelenium function="1" stepKey="executeSelenium1"/>
302-
<executeInSelenium function="1" stepKey="executeSelenium2"/>
303297
<executeJS function="1" stepKey="execJS1"/>
304298
<executeJS function="1" stepKey="execJS2"/>
305299
<fillField stepKey="fill1"/>
@@ -346,8 +340,6 @@
346340
<parseFloat stepKey="parsefloat12"/>
347341
<pauseExecution stepKey="pause1"/>
348342
<pauseExecution stepKey="pause12"/>
349-
<performOn selector="1" function="1" stepKey="performon1"/>
350-
<performOn selector="1" function="1" stepKey="performon12"/>
351343
<pressKey selector="1" stepKey="press1"/>
352344
<pressKey selector="1" stepKey="press12"/>
353345
<reloadPage stepKey="reload1"/>
@@ -513,8 +505,6 @@
513505
<doubleClick selector="1" stepKey="dblclick2"/>
514506
<dragAndDrop selector1="1" selector2="2" stepKey="dragndrop1"/>
515507
<dragAndDrop selector1="1" selector2="2" stepKey="dragndrop2"/>
516-
<executeInSelenium function="1" stepKey="executeSelenium1"/>
517-
<executeInSelenium function="1" stepKey="executeSelenium2"/>
518508
<executeJS function="1" stepKey="execJS1"/>
519509
<executeJS function="1" stepKey="execJS2"/>
520510
<fillField stepKey="fill1"/>
@@ -561,8 +551,6 @@
561551
<parseFloat stepKey="parsefloat12"/>
562552
<pauseExecution stepKey="pause1"/>
563553
<pauseExecution stepKey="pause12"/>
564-
<performOn selector="1" function="1" stepKey="performon1"/>
565-
<performOn selector="1" function="1" stepKey="performon12"/>
566554
<pressKey selector="1" stepKey="press1"/>
567555
<pressKey selector="1" stepKey="press12"/>
568556
<reloadPage stepKey="reload1"/>

dev/tests/verification/Tests/ExecuteInSeleniumTest.php

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/test/actions.md

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -971,26 +971,6 @@ Attribute|Type|Use|Description
971971
<dragAndDrop selector1="#block1" selector2="#block2" x="50" y="50" stepKey="dragAndDrop"/>
972972
```
973973

974-
### executeInSelenium
975-
976-
#### NOTE: `executeInSelenium` action is DEPRECATED and will be removed in MFTF 3.0.0.
977-
978-
See [executeInSelenium docs on codeception.com](http://codeception.com/docs/modules/WebDriver#executeInSelenium).
979-
980-
Attribute|Type|Use|Description
981-
---|---|---|---
982-
`function`|string|optional| Name of Selenium function to run.
983-
`stepKey`|string|required| A unique identifier of the action.
984-
`before`|string|optional| `stepKey` of action that must be executed next.
985-
`after`|string|optional| `stepKey` of preceding action.
986-
987-
#### Example
988-
989-
```xml
990-
<!-- Execute the Selenium function `function(\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) {$webdriver->get('http://google.com');}`. -->
991-
<executeInSelenium function="function(\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) {$webdriver->get('http://google.com');}" stepKey="executeInSelenium"/>
992-
```
993-
994974
### executeJS
995975

996976
See [executeJS docs on codeception.com](http://codeception.com/docs/modules/WebDriver#executeJS).
@@ -1459,20 +1439,6 @@ Attribute|Type|Use|Description
14591439
<pauseExecution stepKey="pause"/>
14601440
```
14611441

1462-
### performOn
1463-
1464-
#### NOTE: `performOn` action is DEPRECATED and will be removed in MFTF 3.0.0.
1465-
1466-
See [performOn docs on codeception.com](http://codeception.com/docs/modules/WebDriver#performOn).
1467-
1468-
Attribute|Type|Use|Description
1469-
---|---|---|---
1470-
`selector`|string|optional| The selector identifying the corresponding HTML element.
1471-
`function`|string|optional| Function or actions to be taken on the selected element.
1472-
`stepKey`|string|required| A unique identifier of the action.
1473-
`before`|string|optional| `stepKey` of action that must be executed next.
1474-
`after`|string|optional| `stepKey` of preceding action.
1475-
14761442
### pressKey
14771443

14781444
See [pressKey docs on codeception.com](http://codeception.com/docs/modules/WebDriver#pressKey).

etc/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<!-- Entity value gets replaced in Dom.php before reading $xml -->
1010
<!DOCTYPE config [
11-
<!ENTITY commonTestActions "acceptPopup|actionGroup|amOnPage|amOnUrl|amOnSubdomain|appendField|assertArrayIsSorted|assertArraySubset|assertElementContainsAttribute|attachFile|cancelPopup|checkOption|clearField|click|clickWithLeftButton|clickWithRightButton|closeAdminNotification|closeTab|comment|conditionalClick|createData|deleteData|updateData|getData|dontSee|dontSeeJsError|dontSeeCheckboxIsChecked|dontSeeCookie|dontSeeCurrentUrlEquals|dontSeeCurrentUrlMatches|dontSeeElement|dontSeeElementInDOM|dontSeeInCurrentUrl|dontSeeInField|dontSeeInFormFields|dontSeeInPageSource|dontSeeInSource|dontSeeInTitle|dontSeeLink|dontSeeOptionIsSelected|doubleClick|dragAndDrop|entity|executeJS|executeInSelenium|fillField|formatMoney|generateDate|grabAttributeFrom|grabCookie|grabFromCurrentUrl|grabMultiple|grabPageSource|grabTextFrom|grabValueFrom|loadSessionSnapshot|loginAsAdmin|magentoCLI|magentoCron|makeScreenshot|maximizeWindow|moveBack|moveForward|moveMouseOver|mSetLocale|mResetLocale|openNewTab|pauseExecution|parseFloat|performOn|pressKey|reloadPage|resetCookie|submitForm|resizeWindow|saveSessionSnapshot|scrollTo|scrollToTopOfPage|searchAndMultiSelectOption|see|seeCheckboxIsChecked|seeCookie|seeCurrentUrlEquals|seeCurrentUrlMatches|seeElement|seeElementInDOM|seeInCurrentUrl|seeInField|seeInFormFields|seeInPageSource|seeInPopup|seeInSource|seeInTitle|seeLink|seeNumberOfElements|seeOptionIsSelected|selectOption|setCookie|submitForm|switchToIFrame|switchToNextTab|switchToPreviousTab|switchToWindow|typeInPopup|uncheckOption|unselectOption|wait|waitForAjaxLoad|waitForElement|waitForElementChange|waitForElementNotVisible|waitForElementVisible|waitForPwaElementNotVisible|waitForPwaElementVisible|waitForJS|waitForLoadingMaskToDisappear|waitForPageLoad|waitForText|assertArrayHasKey|assertArrayNotHasKey|assertArraySubset|assertContains|assertCount|assertEmpty|assertEquals|assertFalse|assertFileExists|assertFileNotExists|assertGreaterOrEquals|assertGreaterThan|assertGreaterThanOrEqual|assertInstanceOf|assertInternalType|assertIsEmpty|assertLessOrEquals|assertLessThan|assertLessThanOrEqual|assertNotContains|assertNotEmpty|assertNotEquals|assertNotInstanceOf|assertNotNull|assertNotRegExp|assertNotSame|assertNull|assertRegExp|assertSame|assertStringStartsNotWith|assertStringStartsWith|assertTrue|expectException|fail|dontSeeFullUrlEquals|dontSee|dontSeeFullUrlMatches|dontSeeInFullUrl|seeFullUrlEquals|seeFullUrlMatches|seeInFullUrl|grabFromFullUrl">
11+
<!ENTITY commonTestActions "acceptPopup|actionGroup|amOnPage|amOnUrl|amOnSubdomain|appendField|assertArrayIsSorted|assertArraySubset|assertElementContainsAttribute|attachFile|cancelPopup|checkOption|clearField|click|clickWithLeftButton|clickWithRightButton|closeAdminNotification|closeTab|comment|conditionalClick|createData|deleteData|updateData|getData|dontSee|dontSeeJsError|dontSeeCheckboxIsChecked|dontSeeCookie|dontSeeCurrentUrlEquals|dontSeeCurrentUrlMatches|dontSeeElement|dontSeeElementInDOM|dontSeeInCurrentUrl|dontSeeInField|dontSeeInFormFields|dontSeeInPageSource|dontSeeInSource|dontSeeInTitle|dontSeeLink|dontSeeOptionIsSelected|doubleClick|dragAndDrop|entity|executeJS|fillField|formatMoney|generateDate|grabAttributeFrom|grabCookie|grabFromCurrentUrl|grabMultiple|grabPageSource|grabTextFrom|grabValueFrom|loadSessionSnapshot|loginAsAdmin|magentoCLI|magentoCron|makeScreenshot|maximizeWindow|moveBack|moveForward|moveMouseOver|mSetLocale|mResetLocale|openNewTab|pauseExecution|parseFloat|pressKey|reloadPage|resetCookie|submitForm|resizeWindow|saveSessionSnapshot|scrollTo|scrollToTopOfPage|searchAndMultiSelectOption|see|seeCheckboxIsChecked|seeCookie|seeCurrentUrlEquals|seeCurrentUrlMatches|seeElement|seeElementInDOM|seeInCurrentUrl|seeInField|seeInFormFields|seeInPageSource|seeInPopup|seeInSource|seeInTitle|seeLink|seeNumberOfElements|seeOptionIsSelected|selectOption|setCookie|submitForm|switchToIFrame|switchToNextTab|switchToPreviousTab|switchToWindow|typeInPopup|uncheckOption|unselectOption|wait|waitForAjaxLoad|waitForElement|waitForElementChange|waitForElementNotVisible|waitForElementVisible|waitForPwaElementNotVisible|waitForPwaElementVisible|waitForJS|waitForLoadingMaskToDisappear|waitForPageLoad|waitForText|assertArrayHasKey|assertArrayNotHasKey|assertArraySubset|assertContains|assertCount|assertEmpty|assertEquals|assertFalse|assertFileExists|assertFileNotExists|assertGreaterOrEquals|assertGreaterThan|assertGreaterThanOrEqual|assertInstanceOf|assertInternalType|assertIsEmpty|assertLessOrEquals|assertLessThan|assertLessThanOrEqual|assertNotContains|assertNotEmpty|assertNotEquals|assertNotInstanceOf|assertNotNull|assertNotRegExp|assertNotSame|assertNull|assertRegExp|assertSame|assertStringStartsNotWith|assertStringStartsWith|assertTrue|expectException|fail|dontSeeFullUrlEquals|dontSee|dontSeeFullUrlMatches|dontSeeInFullUrl|seeFullUrlEquals|seeFullUrlMatches|seeInFullUrl|grabFromFullUrl">
1212
]>
1313

1414
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../src/Magento/FunctionalTestingFramework/ObjectManager/etc/config.xsd">

src/Magento/FunctionalTestingFramework/Console/BaseGenerateCommand.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,7 @@
2323

2424
class BaseGenerateCommand extends Command
2525
{
26-
const MFTF_3_O_0_DEPRECATION_MESSAGE = "MFTF NOTICES:\n"
27-
. "DEPRECATED ACTIONS: \"executeInSelenium\" and \"performOn\" actions will be removed in MFTF 3.0.0\n"
28-
. "DEPRECATED TEST PATH: support for \"dev/tests/acceptance/tests/functional/Magento/FunctionalTest will be "
29-
. "removed in MFTF 3.0.0\n"
30-
. "XSD schema change to only allow single entity per xml file for all entities except data and metadata in "
31-
. "MFTF 3.0.0\n";
26+
const MFTF_NOTICES = "Placeholder text for MFTF notices\n";
3227

3328
/**
3429
* Console output style
@@ -218,9 +213,9 @@ protected function setOutputStyle(InputInterface $input, OutputInterface $output
218213
protected function showMftfNotices(OutputInterface $output)
219214
{
220215
if (null !== $this->ioStyle) {
221-
$this->ioStyle->note(self::MFTF_3_O_0_DEPRECATION_MESSAGE);
216+
$this->ioStyle->note(self::MFTF_NOTICES);
222217
} else {
223-
$output->writeln(self::MFTF_3_O_0_DEPRECATION_MESSAGE);
218+
$output->writeln(self::MFTF_NOTICES);
224219
}
225220
}
226221
}

src/Magento/FunctionalTestingFramework/Console/GenerateSuiteCommand.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
5858
$allowSkipped
5959
);
6060

61-
$this->setOutputStyle($input, $output);
62-
$this->showMftfNotices($output);
63-
6461
// Remove previous GENERATED_DIR if --remove option is used
6562
if ($remove) {
6663
$this->removeGeneratedDirectory($output, $output->isVerbose());

src/Magento/FunctionalTestingFramework/Console/GenerateTestsCommand.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
8282
$allowSkipped
8383
);
8484

85-
$this->setOutputStyle($input, $output);
86-
$this->showMftfNotices($output);
87-
8885
if (!empty($tests)) {
8986
$json = $this->getTestAndSuiteConfiguration($tests);
9087
}

src/Magento/FunctionalTestingFramework/Console/RunTestCommand.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8484
$allowSkipped
8585
);
8686

87-
$this->setOutputStyle($input, $output);
88-
$this->showMftfNotices($output);
89-
9087
$testConfiguration = $this->getTestAndSuiteConfiguration($tests);
9188

9289
if (!$skipGeneration) {

src/Magento/FunctionalTestingFramework/Console/RunTestFailedCommand.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9696
$allowSkipped
9797
);
9898

99-
$this->setOutputStyle($input, $output);
100-
$this->showMftfNotices($output);
101-
10299
$testConfiguration = $this->getFailedTestList();
103100

104101
if ($testConfiguration === null) {

src/Magento/FunctionalTestingFramework/Console/RunTestGroupCommand.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7979
$allowSkipped
8080
);
8181

82-
$this->setOutputStyle($input, $output);
83-
$this->showMftfNotices($output);
84-
8582
if (!$skipGeneration) {
8683
$testConfiguration = $this->getGroupAndSuiteConfiguration($groups);
8784
$command = $this->getApplication()->find('generate:tests');

src/Magento/FunctionalTestingFramework/Test/Objects/ActionObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class ActionObject
6262
const ASSERTION_VALUE_ATTRIBUTE = "value";
6363
const DELETE_DATA_MUTUAL_EXCLUSIVE_ATTRIBUTES = ["url", "createDataKey"];
6464
const EXTERNAL_URL_AREA_INVALID_ACTIONS = ['amOnPage'];
65-
const FUNCTION_CLOSURE_ACTIONS = ['waitForElementChange', 'performOn', 'executeInSelenium'];
65+
const FUNCTION_CLOSURE_ACTIONS = ['waitForElementChange'];
6666
const COMMAND_ACTION_ATTRIBUTES = ['magentoCLI', 'magentoCLISecret'];
6767
const MERGE_ACTION_ORDER_AFTER = 'after';
6868
const MERGE_ACTION_ORDER_BEFORE = 'before';

0 commit comments

Comments
 (0)