Skip to content

Commit 826ba9d

Browse files
committed
Merge branch 'issue/626-delete-checkout-agreements' of https://github.com/mmularski/magento-functional-tests-migration into 2.4-develop-community
2 parents a1f84c0 + 22418e9 commit 826ba9d

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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="AdminAssertTermAbsentInGridActionGroup">
12+
<arguments>
13+
<argument name="termName" type="string"/>
14+
</arguments>
15+
<amOnPage url="{{AdminTermsPage.url}}" stepKey="onTermGridPage"/>
16+
<waitForPageLoad stepKey="waitForPageLoad"/>
17+
<fillField selector="{{AdminTermGridSection.filterByTermName}}" userInput="{{termName}}" stepKey="fillTermNameFilter"/>
18+
<click selector="{{AdminTermGridSection.searchButton}}" stepKey="clickSearchButton"/>
19+
<dontSee selector="{{AdminTermGridSection.firstRowConditionName}}" userInput="{{termName}}" stepKey="assertTermAbsentInGrid"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminDeleteActiveTextTermEntityTest">
12+
<annotations>
13+
<features value="CheckoutAgreements"/>
14+
<stories value="Checkout agreements"/>
15+
<title value="Delete active text checkout agreement"/>
16+
<description value="Admin should be able to delete active text checkout agreement"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value=""/>
19+
<group value="checkoutAgreements"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<magentoCLI command="config:set checkout/options/enable_agreements 1" stepKey="setEnableTermsOnCheckout"/>
24+
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin" />
25+
<createData entity="SimpleTwo" stepKey="createdProduct"/>
26+
<actionGroup ref="CreateNewTermActionGroup" stepKey="createTerm">
27+
<argument name="term" value="activeTextTerm"/>
28+
</actionGroup>
29+
</before>
30+
<after>
31+
<magentoCLI command="config:set checkout/options/enable_agreements 0" stepKey="setDisableTermsOnCheckout"/>
32+
<deleteData createDataKey="createdProduct" stepKey="deletedProduct"/>
33+
<actionGroup ref="logout" stepKey="logout"/>
34+
</after>
35+
36+
<actionGroup ref="DeleteTermActionGroup" stepKey="deleteTerm">
37+
<argument name="term" value="activeTextTerm"/>
38+
</actionGroup>
39+
<actionGroup ref="AdminAssertTermAbsentInGridActionGroup" stepKey="assertTermAbsentInGrid">
40+
<argument name="termName" value="{{activeTextTerm.name}}"/>
41+
</actionGroup>
42+
<actionGroup ref="AddSimpleProductToCart" stepKey="addProductToTheCart">
43+
<argument name="product" value="$$createdProduct$$"/>
44+
</actionGroup>
45+
<actionGroup ref="StorefrontProcessCheckoutToPaymentActionGroup" stepKey="processCheckoutToThePaymentMethodsPage"/>
46+
<actionGroup ref="StorefrontAssertTermAbsentInCheckoutActionGroup" stepKey="assertTermAbsentInCheckout">
47+
<argument name="termCheckboxText" value="{{activeTextTerm.checkboxText}}"/>
48+
</actionGroup>
49+
</test>
50+
</tests>

0 commit comments

Comments
 (0)