Skip to content

Commit e4062eb

Browse files
committed
Refactoring the Tests, Action Groups by removing the not needed Action Groups
1 parent 9e5f621 commit e4062eb

12 files changed

+270
-169
lines changed

app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertIsNotVisibleCartPagerTextActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
<argument name="text" type="string"/>
1313
</arguments>
1414
<waitForPageLoad stepKey="waitForCheckoutPageLoad"/>
15-
<dontSee userInput="{{text}}" stepKey="VerifyMissingPagerText"/>
15+
<dontSee userInput="{{text}}" selector="{{StorefrontCartToolbarSection.toolbarNumber}}" stepKey="VerifyMissingPagerText"/>
1616
</actionGroup>
1717
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertTextIsVisibleOnPageActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
<actionGroup name="AssertTextIsVisibleOnPageActionGroup">
1111
<arguments>
1212
<argument name="text" type="string"/>
13+
<argument name="selector" type="string"/>
1314
</arguments>
1415
<waitForPageLoad stepKey="waitForPageLoad"/>
15-
<see userInput="{{text}}" stepKey="VerifyPageText"/>
16+
<see userInput="{{text}}" selector="{{selector}}" stepKey="VerifyPageText"/>
1617
</actionGroup>
1718
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontAdd20ProductsToCartActionGroup.xml

Lines changed: 0 additions & 112 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="StorefrontRemoveCartItemActionGroup">
11+
<click selector="{{CheckoutCartProductSection.RemoveItem}}" stepKey="deleteProductFromCart"/>
12+
</actionGroup>
13+
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontDelete20ProductsActionGroup.xml

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="StorefrontOpenCartPageActionGroup">
11+
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="openCartPage" />
12+
<waitForPageLoad stepKey="waitForPageLoaded" />
13+
</actionGroup>
14+
</actionGroups>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="StorefrontRemoveCartItemActionGroup">
11+
<click selector="{{CheckoutCartProductSection.RemoveItem}}" stepKey="deleteProductFromCart"/>
12+
</actionGroup>
13+
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/Page/CheckoutCartPage.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
1111
<page name="CheckoutCartPage" url="/checkout/cart" module="Magento_Checkout" area="storefront">
12+
<section name="StorefrontCartToolbarSection"/>
1213
<section name="CheckoutCartProductSection"/>
1314
<section name="CheckoutCartSummarySection"/>
1415
<section name="CheckoutCartCrossSellSection"/>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="StorefrontCartToolbarSection">
12+
<element name="toolbarNumber" type="text" selector="div.toolbar > .pager > .toolbar-amount > .toolbar-number" />
13+
<element name="toolbarPager" type="text" selector="div.toolbar > .pager > .pages" />
14+
<element name="toolbarNextPage" type="text" selector="div.toolbar > .pager > .pages > .pages-item-next" />
15+
<element name="toolbarPreviousPage" type="text" selector="div.toolbar > .pager > .pages > .pages-item-previous" />
16+
</section>
17+
</sections>

0 commit comments

Comments
 (0)