Skip to content

Commit cf982f6

Browse files
committed
Merge branch 'issue/627-mftf-update-checkout-agreements' of https://github.com/mmularski/magento-functional-tests-migration into 2.4-develop-community
2 parents 7f3b585 + f421fba commit cf982f6

21 files changed

+363
-75
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>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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="UpdateTermActionGroup">
12+
<arguments>
13+
<argument name="term" />
14+
<argument name="updateTermData" />
15+
</arguments>
16+
<amOnPage url="{{AdminTermsPage.url}}" stepKey="onTermGridPage"/>
17+
<waitForPageLoad stepKey="waitForAdminTermsGridLoad"/>
18+
<fillField selector="{{AdminTermGridSection.filterByTermName}}" userInput="{{term.name}}" stepKey="fillTermNameFilter"/>
19+
<click selector="{{AdminTermGridSection.searchButton}}" stepKey="clickSearchButton"/>
20+
21+
<fillField selector="{{AdminNewTermFormSection.conditionName}}" userInput="{{updateTermData.name}}" stepKey="fillFieldConditionName"/>
22+
<selectOption selector="{{AdminNewTermFormSection.isActive}}" userInput="{{updateTermData.isActive}}" stepKey="selectOptionIsActive"/>
23+
<selectOption selector="{{AdminNewTermFormSection.isHtml}}" userInput="{{updateTermData.isHtml}}" stepKey="selectOptionIsHtml"/>
24+
<selectOption selector="{{AdminNewTermFormSection.mode}}" userInput="{{updateTermData.mode}}" stepKey="selectOptionMode"/>
25+
<selectOption selector="{{AdminNewTermFormSection.storeView}}" userInput="{{updateTermData.storeView}}" stepKey="selectOptionStoreView" />
26+
<fillField selector="{{AdminNewTermFormSection.checkboxText}}" userInput="{{updateTermData.checkboxText}}" stepKey="fillFieldCheckboxText"/>
27+
<fillField selector="{{AdminNewTermFormSection.content}}" userInput="{{updateTermData.content}}" stepKey="fillFieldContent"/>
28+
<click selector="{{AdminNewTermFormSection.save}}" stepKey="saveTerm"/>
29+
<see selector="{{AdminTermFormMessagesSection.successMessage}}" userInput="You saved the condition." stepKey="seeSuccessMessage"/>
30+
</actionGroup>
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)