Skip to content

Commit 01ba4bd

Browse files
committed
Resolved conflicts and restructured Action Groups to be reusable atomically.
1 parent d72dfd8 commit 01ba4bd

20 files changed

+220
-135
lines changed

app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/DeleteTermActionGroup.xml renamed to app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsDeleteTermByNameActionGroup.xml

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

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="DeleteTermActionGroup">
12-
<arguments>
13-
<argument name="term"/>
14-
</arguments>
15-
<amOnPage url="{{AdminTermsPage.url}}" stepKey="onTermGridPage"/>
16-
<waitForPageLoad stepKey="waitForAdminTermsGridPageLoad"/>
17-
<fillField selector="{{AdminTermGridSection.filterByTermName}}" userInput="{{term.name}}" stepKey="fillTermNameFilter"/>
18-
<click selector="{{AdminTermGridSection.searchButton}}" stepKey="clickSearchButton"/>
19-
<click selector="{{AdminTermGridSection.firstRowConditionId}}" stepKey="clickFirstRow"/>
20-
<waitForPageLoad stepKey="waitForEditTermPageLoad"/>
11+
<actionGroup name="AdminTermsConditionsDeleteTermByNameActionGroup">
2112
<click selector="{{AdminEditTermFormSection.delete}}" stepKey="clickDeleteButton"/>
2213
<waitForElementVisible selector="{{AdminEditTermFormSection.acceptPopupButton}}" stepKey="waitForElement"/>
2314
<click selector="{{AdminEditTermFormSection.acceptPopupButton}}" stepKey="clickDeleteOkButton"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminTermsConditionsEditTermByNameActionGroup" extends="AdminTermsConditionsFilterGridByNameActionGroup">
12+
<annotations>
13+
<description>Filters Terms and Conditions grid and opens the first result Edit page</description>
14+
</annotations>
15+
16+
<click selector="{{AdminTermGridSection.firstRowConditionId}}" stepKey="clickFirstRow"/>
17+
<waitForPageLoad stepKey="waitForEditTermPageLoad"/>
18+
</actionGroup>
19+
</actionGroups>

app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/CreateNewTermActionGroup.xml renamed to app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsFillTermEditFormActionGroup.xml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,17 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="CreateNewTermActionGroup">
11+
<actionGroup name="AdminTermsConditionsFillTermEditFormActionGroup">
1212
<arguments>
1313
<argument name="term"/>
1414
</arguments>
15-
<amOnPage url="{{AdminNewTermPage.url}}" stepKey="amOnNewTermPage"/>
16-
<waitForPageLoad stepKey="waitForAdminNewTermPageLoad"/>
15+
1716
<fillField selector="{{AdminNewTermFormSection.conditionName}}" userInput="{{term.name}}" stepKey="fillFieldConditionName"/>
1817
<selectOption selector="{{AdminNewTermFormSection.isActive}}" userInput="{{term.isActive}}" stepKey="selectOptionIsActive"/>
1918
<selectOption selector="{{AdminNewTermFormSection.isHtml}}" userInput="{{term.isHtml}}" stepKey="selectOptionIsHtml"/>
2019
<selectOption selector="{{AdminNewTermFormSection.mode}}" userInput="{{term.mode}}" stepKey="selectOptionMode"/>
2120
<selectOption selector="{{AdminNewTermFormSection.storeView}}" userInput="{{term.storeView}}" stepKey="selectOptionStoreView" />
2221
<fillField selector="{{AdminNewTermFormSection.checkboxText}}" userInput="{{term.checkboxText}}" stepKey="fillFieldCheckboxText"/>
2322
<fillField selector="{{AdminNewTermFormSection.content}}" userInput="{{term.content}}" stepKey="fillFieldContent"/>
24-
<click selector="{{AdminNewTermFormSection.save}}" stepKey="saveTerm"/>
25-
<see selector="{{AdminTermFormMessagesSection.successMessage}}" userInput="You saved the condition." stepKey="seeSuccessMessage"/>
2623
</actionGroup>
27-
</actionGroups>
24+
</actionGroups>

app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminAssertTermInGridActionGroup.xml renamed to app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsFilterGridByNameActionGroup.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="AdminAssertTermInGridActionGroup">
11+
<actionGroup name="AdminTermsConditionsFilterGridByNameActionGroup">
12+
<annotations>
13+
<description>Filters Terms and Conditions grid for name</description>
14+
</annotations>
1215
<arguments>
1316
<argument name="termName" type="string"/>
1417
</arguments>
15-
<amOnPage url="{{AdminTermsPage.url}}" stepKey="onTermGridPage"/>
16-
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
1719
<fillField selector="{{AdminTermGridSection.filterByTermName}}" userInput="{{termName}}" stepKey="fillTermNameFilter"/>
1820
<click selector="{{AdminTermGridSection.searchButton}}" stepKey="clickSearchButton"/>
19-
<see selector="{{AdminTermGridSection.firstRowConditionName}}" userInput="{{termName}}" stepKey="assertTermInGrid"/>
2021
</actionGroup>
2122
</actionGroups>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminTermsConditionsOpenGridActionGroup">
12+
<amOnPage url="{{AdminTermsPage.url}}" stepKey="onTermGridPage"/>
13+
<waitForPageLoad stepKey="waitForPageLoad"/>
14+
</actionGroup>
15+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminTermsConditionsOpenNewTermPageActionGroup">
12+
<amOnPage url="{{AdminNewTermPage.url}}" stepKey="amOnNewTermPage"/>
13+
<waitForPageLoad stepKey="waitForAdminNewTermPageLoad"/>
14+
</actionGroup>
15+
</actionGroups>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminTermsConditionsSaveTermActionGroup">
12+
<click selector="{{AdminNewTermFormSection.save}}" stepKey="saveTerm"/>
13+
<see selector="{{AdminTermFormMessagesSection.successMessage}}" userInput="You saved the condition." stepKey="seeSuccessMessage"/>
14+
</actionGroup>
15+
</actionGroups>

app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/UpdateTermActionGroup.xml renamed to app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsUpdateTermActionGroup.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
<waitForPageLoad stepKey="waitForAdminTermsGridLoad"/>
1818
<fillField selector="{{AdminTermGridSection.filterByTermName}}" userInput="{{term.name}}" stepKey="fillTermNameFilter"/>
1919
<click selector="{{AdminTermGridSection.searchButton}}" stepKey="clickSearchButton"/>
20-
<click selector="{{AdminTermGridSection.firstRowConditionId}}" stepKey="clickFirstRow"/>
21-
<waitForPageLoad stepKey="waitForEditTermPageLoad"/>
20+
2221
<fillField selector="{{AdminNewTermFormSection.conditionName}}" userInput="{{updateTermData.name}}" stepKey="fillFieldConditionName"/>
2322
<selectOption selector="{{AdminNewTermFormSection.isActive}}" userInput="{{updateTermData.isActive}}" stepKey="selectOptionIsActive"/>
2423
<selectOption selector="{{AdminNewTermFormSection.isHtml}}" userInput="{{updateTermData.isHtml}}" stepKey="selectOptionIsHtml"/>
@@ -29,4 +28,4 @@
2928
<click selector="{{AdminNewTermFormSection.save}}" stepKey="saveTerm"/>
3029
<see selector="{{AdminTermFormMessagesSection.successMessage}}" userInput="You saved the condition." stepKey="seeSuccessMessage"/>
3130
</actionGroup>
32-
</actionGroups>
31+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertAdminTermsConditionsInGridActionGroup" extends="AdminTermsConditionsFilterGridByNameActionGroup">
12+
<see selector="{{AdminTermGridSection.firstRowConditionName}}" userInput="{{termName}}" stepKey="assertTermInGrid" after="clickSearchButton"/>
13+
</actionGroup>
14+
</actionGroups>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="StorefrontAssertTermAbsentInCheckoutActionGroup">
11+
<actionGroup name="AssertStorefrontTermAbsentInCheckoutActionGroup">
1212
<arguments>
1313
<argument name="termCheckboxText" type="string"/>
1414
</arguments>

0 commit comments

Comments
 (0)