Skip to content

Commit 2085841

Browse files
ENGCOM-8601: [MFTF] Refactoring AdminPanelIsFrozenIfStorefrontIsOpenedViaCustomerViewTest #31502
2 parents 771b42a + eb1908c commit 2085841

File tree

3 files changed

+72
-30
lines changed

3 files changed

+72
-30
lines changed
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="StorefrontClickPrintOrderLinkOnViewOrderPageActionGroup">
12+
<annotations>
13+
<description>Clicks the "Print Order" link on the My Account->My Orders->Order View page</description>
14+
</annotations>
15+
16+
<click selector="{{StorefrontCustomerOrderViewSection.printOrderLink}}" stepKey="clickPrintOrderLink"/>
17+
<waitForPageLoad stepKey="waitForPageLoaded"/>
18+
</actionGroup>
19+
</actionGroups>
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="StorefrontClickViewOrderLinkOnMyOrdersPageActionGroup">
12+
<annotations>
13+
<description>Clicks the top "View Order" link on the My Account->My Orders page</description>
14+
</annotations>
15+
16+
<click selector="{{StorefrontCustomerOrderSection.viewOrder}}" stepKey="clickViewOrder"/>
17+
<waitForPageLoad stepKey="waitForPageLoaded"/>
18+
</actionGroup>
19+
</actionGroups>

app/code/Magento/Customer/Test/Mftf/Test/AdminPanelIsFrozenIfStorefrontIsOpenedViaCustomerViewTest.xml

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
*/
77
-->
88

9-
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1011
<test name="AdminPanelIsFrozenIfStorefrontIsOpenedViaCustomerViewTest">
1112
<annotations>
1213
<features value="Customer"/>
@@ -23,50 +24,53 @@
2324
<createData entity="SimpleProduct" stepKey="createSimpleProduct">
2425
<requiredEntity createDataKey="createSimpleCategory"/>
2526
</createData>
26-
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
27+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="login"/>
2728
</before>
2829
<after>
2930
<deleteData createDataKey="createSimpleCategory" stepKey="deleteCategory"/>
3031
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
3132
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
3233
</after>
33-
<actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderPage">
34-
<argument name="customer" value="$simpleCustomer$"/>
35-
</actionGroup>
36-
<actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addSecondProduct">
37-
<argument name="product" value="$createSimpleProduct$"/>
38-
</actionGroup>
39-
<actionGroup ref="FillOrderCustomerInformationActionGroup" stepKey="fillCustomerInfo">
40-
<argument name="customer" value="$simpleCustomer$"/>
41-
<argument name="address" value="US_Address_TX"/>
42-
</actionGroup>
43-
<actionGroup ref="OrderSelectFlatRateShippingActionGroup" stepKey="selectFlatRate"/>
44-
<actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/>
45-
<grabTextFrom selector="|Order # (\d+)|" stepKey="getOrderId"/>
46-
47-
<actionGroup ref="StartCreateInvoiceFromOrderPageActionGroup" stepKey="startCreateInvoice"/>
48-
<actionGroup ref="SubmitInvoiceActionGroup" stepKey="submitInvoice"/>
49-
<actionGroup ref="GoToShipmentIntoOrderActionGroup" stepKey="goToShipment"/>
50-
<actionGroup ref="SubmitShipmentIntoOrderActionGroup" stepKey="submitShipment"/>
51-
52-
<!--Create Credit Memo-->
53-
<actionGroup ref="StartToCreateCreditMemoActionGroup" stepKey="startToCreateCreditMemo">
54-
<argument name="orderId" value="{$getOrderId}"/>
55-
</actionGroup>
56-
<actionGroup ref="SubmitCreditMemoActionGroup" stepKey="submitCreditMemo"/>
34+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="navigateToNewOrderPage"/>
35+
<createData entity="CustomerCart" stepKey="createCustomerCart">
36+
<requiredEntity createDataKey="simpleCustomer"/>
37+
</createData>
38+
<createData entity="CustomerCartItem" stepKey="addSecondProduct">
39+
<requiredEntity createDataKey="createCustomerCart"/>
40+
<requiredEntity createDataKey="createSimpleProduct"/>
41+
</createData>
42+
<createData entity="CustomerAddressInformation" stepKey="fillCustomerInfo">
43+
<requiredEntity createDataKey="createCustomerCart"/>
44+
</createData>
45+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectFlatRate"/>
46+
<updateData createDataKey="createCustomerCart" entity="CustomerOrderPaymentMethod" stepKey="submitOrder">
47+
<requiredEntity createDataKey="createCustomerCart"/>
48+
</updateData>
49+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="getOrderId"/>
50+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="startCreateInvoice"/>
51+
<createData entity="Invoice" stepKey="submitInvoice">
52+
<requiredEntity createDataKey="createCustomerCart"/>
53+
</createData>
54+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="goToShipment"/>
55+
<createData entity="Shipment" stepKey="submitShipment">
56+
<requiredEntity createDataKey="createCustomerCart"/>
57+
</createData>
58+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="startToCreateCreditMemo"/>
59+
<createData entity="CreditMemo" stepKey="submitCreditMemo">
60+
<requiredEntity createDataKey="createCustomerCart"/>
61+
</createData>
5762

5863
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="logInCustomer">
5964
<argument name="Customer" value="$$simpleCustomer$$"/>
6065
</actionGroup>
6166
<actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="goToMyOrdersPage">
6267
<argument name="menu" value="My Orders"/>
6368
</actionGroup>
64-
<click selector="{{StorefrontCustomerOrderSection.viewOrder}}" stepKey="clickViewOrder"/>
65-
<click selector="{{StorefrontCustomerOrderViewSection.printOrderLink}}" stepKey="clickPrintOrderLink"/>
66-
<waitForPageLoad stepKey="waitPageReload"/>
69+
<actionGroup ref="StorefrontClickViewOrderLinkOnMyOrdersPageActionGroup" stepKey="clickViewOrder"/>
70+
<actionGroup ref="StorefrontClickPrintOrderLinkOnViewOrderPageActionGroup" stepKey="clickPrintOrderLink"/>
71+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitPageReload"/>
6772
<switchToWindow stepKey="switchToWindow"/>
6873
<switchToPreviousTab stepKey="switchToPreviousTab"/>
69-
7074
<actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="goToAddressBook">
7175
<argument name="menu" value="Address Book"/>
7276
</actionGroup>

0 commit comments

Comments
 (0)