Skip to content

MQE-1961 Remove deprecated actions #581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions dev/tests/verification/Resources/BasicFunctionalTest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use Yandex\Allure\Adapter\Annotation\TestCaseId;
/**
* @Title("[NO TESTCASEID]: A Functional Cest")
* @group functional
* @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>")
* @Description("<h3>Test files</h3>verification/TestModule/Test/BasicFunctionalTest.xml<br>")
*/
class BasicFunctionalTestCest
{
Expand Down Expand Up @@ -139,7 +139,6 @@ class BasicFunctionalTestCest
$I->moveMouseOver(".functionalTestSelector"); // stepKey: moveMouseOverKey1
$I->openNewTab(); // stepKey: openNewTabKey1
$I->pauseExecution(); // stepKey: pauseExecutionKey1
$I->performOn("#selector", function(\WebDriverElement $el) {return $el->isDisplayed();}, 10); // stepKey: performOnKey1
$I->pressKey("#page", "a"); // stepKey: pressKey1
$I->pressKey("#page", ['ctrl', 'a'],'new'); // stepKey: pressKey2
$I->pressKey("#page", ['shift', '111'],'1','x'); // stepKey: pressKey3
Expand Down
31 changes: 0 additions & 31 deletions dev/tests/verification/Resources/ExecuteInSeleniumTest.txt
Original file line number Diff line number Diff line change
@@ -1,31 +0,0 @@
<?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;

/**
* @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>")
*/
class ExecuteInSeleniumTestCest
{
/**
* @Features({"TestModule"})
* @Parameter(name = "AcceptanceTester", value="$I")
* @param AcceptanceTester $I
* @return void
* @throws \Exception
*/
public function ExecuteInSeleniumTest(AcceptanceTester $I)
{
$I->executeInSelenium(function ($webdriver) { return "Hello, World!"}); // stepKey: executeInSeleniumStep
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@
<doubleClick selector="1" stepKey="dblclick2"/>
<dragAndDrop selector1="1" selector2="2" stepKey="dragndrop1"/>
<dragAndDrop selector1="1" selector2="2" stepKey="dragndrop2"/>
<executeInSelenium function="1" stepKey="executeSelenium1"/>
<executeInSelenium function="1" stepKey="executeSelenium2"/>
<executeJS function="1" stepKey="execJS1"/>
<executeJS function="1" stepKey="execJS2"/>
<fillField stepKey="fill1"/>
Expand Down Expand Up @@ -126,8 +124,6 @@
<parseFloat stepKey="parsefloat12"/>
<pauseExecution stepKey="pause1"/>
<pauseExecution stepKey="pause12"/>
<performOn selector="1" function="1" stepKey="performon1"/>
<performOn selector="1" function="1" stepKey="performon12"/>
<pressKey selector="1" stepKey="press1"/>
<pressKey selector="1" stepKey="press12"/>
<reloadPage stepKey="reload1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
<moveMouseOver selector=".functionalTestSelector" stepKey="moveMouseOverKey1"/>
<openNewTab stepKey="openNewTabKey1"/>
<pauseExecution stepKey="pauseExecutionKey1"/>
<performOn selector="#selector" function="function(\WebDriverElement $el) {return $el->isDisplayed();}" stepKey="performOnKey1"/>
<pressKey selector="#page" userInput="a" stepKey="pressKey1"/>
<pressKey selector="#page" parameterArray="[['ctrl','a'],'new']" stepKey="pressKey2"/>
<pressKey selector="#page" parameterArray="[['shift','111'],'1','x']" stepKey="pressKey3"/>
Expand Down
14 changes: 0 additions & 14 deletions dev/tests/verification/TestModule/Test/ExecuteInSeleniumTest.xml

This file was deleted.

12 changes: 0 additions & 12 deletions dev/tests/verification/TestModule/Test/XmlDuplicateTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@
<doubleClick selector="1" stepKey="dblclick2"/>
<dragAndDrop selector1="1" selector2="2" stepKey="dragndrop1"/>
<dragAndDrop selector1="1" selector2="2" stepKey="dragndrop2"/>
<executeInSelenium function="1" stepKey="executeSelenium1"/>
<executeInSelenium function="1" stepKey="executeSelenium2"/>
<executeJS function="1" stepKey="execJS1"/>
<executeJS function="1" stepKey="execJS2"/>
<fillField stepKey="fill1"/>
Expand Down Expand Up @@ -130,8 +128,6 @@
<parseFloat stepKey="parsefloat12"/>
<pauseExecution stepKey="pause1"/>
<pauseExecution stepKey="pause12"/>
<performOn selector="1" function="1" stepKey="performon1"/>
<performOn selector="1" function="1" stepKey="performon12"/>
<pressKey selector="1" stepKey="press1"/>
<pressKey selector="1" stepKey="press12"/>
<reloadPage stepKey="reload1"/>
Expand Down Expand Up @@ -298,8 +294,6 @@
<doubleClick selector="1" stepKey="dblclick2"/>
<dragAndDrop selector1="1" selector2="2" stepKey="dragndrop1"/>
<dragAndDrop selector1="1" selector2="2" stepKey="dragndrop2"/>
<executeInSelenium function="1" stepKey="executeSelenium1"/>
<executeInSelenium function="1" stepKey="executeSelenium2"/>
<executeJS function="1" stepKey="execJS1"/>
<executeJS function="1" stepKey="execJS2"/>
<fillField stepKey="fill1"/>
Expand Down Expand Up @@ -346,8 +340,6 @@
<parseFloat stepKey="parsefloat12"/>
<pauseExecution stepKey="pause1"/>
<pauseExecution stepKey="pause12"/>
<performOn selector="1" function="1" stepKey="performon1"/>
<performOn selector="1" function="1" stepKey="performon12"/>
<pressKey selector="1" stepKey="press1"/>
<pressKey selector="1" stepKey="press12"/>
<reloadPage stepKey="reload1"/>
Expand Down Expand Up @@ -513,8 +505,6 @@
<doubleClick selector="1" stepKey="dblclick2"/>
<dragAndDrop selector1="1" selector2="2" stepKey="dragndrop1"/>
<dragAndDrop selector1="1" selector2="2" stepKey="dragndrop2"/>
<executeInSelenium function="1" stepKey="executeSelenium1"/>
<executeInSelenium function="1" stepKey="executeSelenium2"/>
<executeJS function="1" stepKey="execJS1"/>
<executeJS function="1" stepKey="execJS2"/>
<fillField stepKey="fill1"/>
Expand Down Expand Up @@ -561,8 +551,6 @@
<parseFloat stepKey="parsefloat12"/>
<pauseExecution stepKey="pause1"/>
<pauseExecution stepKey="pause12"/>
<performOn selector="1" function="1" stepKey="performon1"/>
<performOn selector="1" function="1" stepKey="performon12"/>
<pressKey selector="1" stepKey="press1"/>
<pressKey selector="1" stepKey="press12"/>
<reloadPage stepKey="reload1"/>
Expand Down
22 changes: 0 additions & 22 deletions dev/tests/verification/Tests/ExecuteInSeleniumTest.php

This file was deleted.

34 changes: 0 additions & 34 deletions docs/test/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -971,26 +971,6 @@ Attribute|Type|Use|Description
<dragAndDrop selector1="#block1" selector2="#block2" x="50" y="50" stepKey="dragAndDrop"/>
```

### executeInSelenium

#### NOTE: `executeInSelenium` action is DEPRECATED and will be removed in MFTF 3.0.0.

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

Attribute|Type|Use|Description
---|---|---|---
`function`|string|optional| Name of Selenium function to run.
`stepKey`|string|required| A unique identifier of the action.
`before`|string|optional| `stepKey` of action that must be executed next.
`after`|string|optional| `stepKey` of preceding action.

#### Example

```xml
<!-- Execute the Selenium function `function(\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) {$webdriver->get('http://google.com');}`. -->
<executeInSelenium function="function(\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) {$webdriver->get('http://google.com');}" stepKey="executeInSelenium"/>
```

### executeJS

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

### performOn

#### NOTE: `performOn` action is DEPRECATED and will be removed in MFTF 3.0.0.

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

Attribute|Type|Use|Description
---|---|---|---
`selector`|string|optional| The selector identifying the corresponding HTML element.
`function`|string|optional| Function or actions to be taken on the selected element.
`stepKey`|string|required| A unique identifier of the action.
`before`|string|optional| `stepKey` of action that must be executed next.
`after`|string|optional| `stepKey` of preceding action.

### pressKey

See [pressKey docs on codeception.com](http://codeception.com/docs/modules/WebDriver#pressKey).
Expand Down
2 changes: 1 addition & 1 deletion etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<!-- Entity value gets replaced in Dom.php before reading $xml -->
<!DOCTYPE config [
<!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">
<!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">
]>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../src/Magento/FunctionalTestingFramework/ObjectManager/etc/config.xsd">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,7 @@

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

/**
* Console output style
Expand Down Expand Up @@ -218,9 +213,9 @@ protected function setOutputStyle(InputInterface $input, OutputInterface $output
protected function showMftfNotices(OutputInterface $output)
{
if (null !== $this->ioStyle) {
$this->ioStyle->note(self::MFTF_3_O_0_DEPRECATION_MESSAGE);
$this->ioStyle->note(self::MFTF_NOTICES);
} else {
$output->writeln(self::MFTF_3_O_0_DEPRECATION_MESSAGE);
$output->writeln(self::MFTF_NOTICES);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
$allowSkipped
);

$this->setOutputStyle($input, $output);
$this->showMftfNotices($output);

// Remove previous GENERATED_DIR if --remove option is used
if ($remove) {
$this->removeGeneratedDirectory($output, $output->isVerbose());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
$allowSkipped
);

$this->setOutputStyle($input, $output);
$this->showMftfNotices($output);

if (!empty($tests)) {
$json = $this->getTestAndSuiteConfiguration($tests);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$allowSkipped
);

$this->setOutputStyle($input, $output);
$this->showMftfNotices($output);

$testConfiguration = $this->getTestAndSuiteConfiguration($tests);

if (!$skipGeneration) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$allowSkipped
);

$this->setOutputStyle($input, $output);
$this->showMftfNotices($output);

$testConfiguration = $this->getFailedTestList();

if ($testConfiguration === null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$allowSkipped
);

$this->setOutputStyle($input, $output);
$this->showMftfNotices($output);

if (!$skipGeneration) {
$testConfiguration = $this->getGroupAndSuiteConfiguration($groups);
$command = $this->getApplication()->find('generate:tests');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class ActionObject
const ASSERTION_VALUE_ATTRIBUTE = "value";
const DELETE_DATA_MUTUAL_EXCLUSIVE_ATTRIBUTES = ["url", "createDataKey"];
const EXTERNAL_URL_AREA_INVALID_ACTIONS = ['amOnPage'];
const FUNCTION_CLOSURE_ACTIONS = ['waitForElementChange', 'performOn', 'executeInSelenium'];
const FUNCTION_CLOSURE_ACTIONS = ['waitForElementChange'];
const COMMAND_ACTION_ATTRIBUTES = ['magentoCLI', 'magentoCLISecret'];
const MERGE_ACTION_ORDER_AFTER = 'after';
const MERGE_ACTION_ORDER_BEFORE = 'before';
Expand Down
Loading