Skip to content

Commit 511abb8

Browse files
ENGCOM-9271: [MFTF] StorefrontReorderAsGuestCustomerTest refactoring #33549
- Merge Pull Request #33549 from AnnaAPak/magento2:ref-StorefrontReorderAsGuestTest - Merged commits: 1. b92a769 2. cc23c74 3. 1d01842 4. 564f4af 5. 21c27b2 6. 7644bc5 7. 3c0e450
2 parents ac88ad9 + 3c0e450 commit 511abb8

7 files changed

+138
-2
lines changed

app/code/Magento/Customer/Test/Mftf/Data/CustomerData.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,4 +443,18 @@
443443
<requiredEntity type="address">UK_With_State_Default_Billing</requiredEntity>
444444
<requiredEntity type="address">US_Address_NY_Default_Shipping</requiredEntity>
445445
</entity>
446+
<entity name="Simple_USTX_Customer" type="customer">
447+
<data key="group_id">1</data>
448+
<data key="default_billing">true</data>
449+
<data key="default_shipping">true</data>
450+
<data key="email" unique="prefix">John.Doe@example.com</data>
451+
<data key="firstname">John</data>
452+
<data key="lastname">Buyer</data>
453+
<data key="fullname">John Buyer</data>
454+
<data key="password">pwdTest123!</data>
455+
<data key="store_id">0</data>
456+
<data key="website_id">0</data>
457+
<data key="group">General</data>
458+
<requiredEntity type="address">BillingAddressTX</requiredEntity>
459+
</entity>
446460
</entities>

app/code/Magento/Quote/Test/Mftf/Data/GuestCartData.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,8 @@
2525
<requiredEntity type="payment_method">PaymentMethodCheckMoneyOrder</requiredEntity>
2626
<requiredEntity type="billing_address">BillingAddressTX</requiredEntity>
2727
</entity>
28+
29+
<entity name="OrderId" type="orderId">
30+
<var key="order_id" entityKey="return" entityType="orderId"/>
31+
</entity>
2832
</entities>
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="StorefrontClickContinueOnOrdersAndReturnsPageActionGroup">
12+
<annotations>
13+
<description>Clicks the "Continue" button on the "Orders and Returns" page</description>
14+
</annotations>
15+
16+
<click selector="{{StorefrontGuestOrderSearchSection.continue}}" stepKey="clickContinue"/>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 19 additions & 0 deletions
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="StorefrontClickReorderOnGuestOrderViewPageActionGroup">
12+
<annotations>
13+
<description>Clicks the "Reorder" link on the Guest Order View page</description>
14+
</annotations>
15+
16+
<click selector="{{StorefrontGuestOrderViewSection.reorder}}" stepKey="clickReorderLink"/>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 19 additions & 0 deletions
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="StorefrontOpenOrdersAndReturnsPageActionGroup">
12+
<annotations>
13+
<description>Opens the "Orders and Returns" page</description>
14+
</annotations>
15+
16+
<amOnPage url="{{StorefrontGuestOrderSearchPage.url}}" stepKey="goToOrdersAndReturnsPage"/>
17+
<waitForPageLoad stepKey="waiForOrdersAndReturnsPage"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="StorefrontReorderAsGuestCustomerTest">
11+
<annotations>
12+
<stories value="Reorder"/>
13+
<title value="Make reorder as guest on Frontend1"/>
14+
<description value="Make reorder as guest on Frontend"/>
15+
<severity value="CRITICAL"/>
16+
<testCaseId value="MC-34465"/>
17+
<group value="sales"/>
18+
</annotations>
19+
<before>
20+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
21+
<createData entity="SimpleProduct" stepKey="createSimpleProduct">
22+
<requiredEntity createDataKey="createCategory"/>
23+
</createData>
24+
<createData entity="GuestCart" stepKey="createGuestCart"/>
25+
<createData entity="SimpleCartItem" stepKey="addCartItem">
26+
<requiredEntity createDataKey="createGuestCart"/>
27+
<requiredEntity createDataKey="createSimpleProduct"/>
28+
</createData>
29+
<createData entity="GuestAddressInformation" stepKey="addGuestOrderAddress">
30+
<requiredEntity createDataKey="createGuestCart"/>
31+
</createData>
32+
<updateData createDataKey="createGuestCart" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformation">
33+
<requiredEntity createDataKey="createGuestCart"/>
34+
</updateData>
35+
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
36+
</before>
37+
<after>
38+
<actionGroup ref="AdminLogoutActionGroup" stepKey="LogoutAsAdmin"/>
39+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
40+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
41+
</after>
42+
43+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="onOrderPage"/>
44+
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearFilters"/>
45+
<grabTextFrom selector="{{AdminOrdersGridSection.orderIdByIncrementId($createGuestCart.return$)}}" stepKey="getOrderId"/>
46+
47+
<actionGroup ref="StorefrontOpenOrdersAndReturnsPageActionGroup" stepKey="goToOrdersAndReturnsPage"/>
48+
<actionGroup ref="StorefrontFillOrdersAndReturnsFormTypeZipActionGroup" stepKey="fillOrder">
49+
<argument name="orderNumber" value="$getOrderId"/>
50+
<argument name="customer" value="Simple_USTX_Customer"/>
51+
<argument name="address" value="BillingAddressTX"/>
52+
</actionGroup>
53+
<actionGroup ref="StorefrontClickContinueOnOrdersAndReturnsPageActionGroup" stepKey="clickContinue"/>
54+
<actionGroup ref="StorefrontClickReorderOnGuestOrderViewPageActionGroup" stepKey="clickReorder"/>
55+
56+
<seeElement selector="{{CheckoutCartProductSection.ProductLinkByName($$createSimpleProduct.name$$)}}" stepKey="seeProductInCart"/>
57+
</test>
58+
</tests>

app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsGuestTest.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@
77
-->
88
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10-
<test name="StorefrontReorderAsGuestTest">
10+
<test name="StorefrontReorderAsGuestTest" deprecated="Use StorefrontReorderAsGuestCustomerTest instead">
1111
<annotations>
1212
<stories value="Reorder"/>
13-
<title value="Make reorder as guest on Frontend"/>
13+
<title value="DEPRECATED. Make reorder as guest on Frontend"/>
1414
<description value="Make reorder as guest on Frontend"/>
1515
<severity value="CRITICAL"/>
1616
<testCaseId value="MC-34465"/>
1717
<group value="sales"/>
18+
<skip>
19+
<issueId value="DEPRECATED">Use StorefrontReorderAsGuestCustomerTest instead</issueId>
20+
</skip>
1821
</annotations>
1922
<before>
2023
<!--Create simple product.-->

0 commit comments

Comments
 (0)