Skip to content

Commit

Permalink
ENGCOM-8601: [MFTF] Refactoring AdminPanelIsFrozenIfStorefrontIsOpene…
Browse files Browse the repository at this point in the history
…dViaCustomerViewTest #31502

 - Merge Pull Request #31502 from AnnaAPak/magento2:ref-AdminPanelIsFrozenIfStorefrontIsOpenedViaCustomerViewTes
 - Merged commits:
   1. e840a57
   2. 68cd8a8
  • Loading branch information
magento-engcom-team committed Jan 26, 2021
2 parents cd857f9 + 68cd8a8 commit eb1908c
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontClickPrintOrderLinkOnViewOrderPageActionGroup">
<annotations>
<description>Clicks the "Print Order" link on the My Account->My Orders->Order View page</description>
</annotations>

<click selector="{{StorefrontCustomerOrderViewSection.printOrderLink}}" stepKey="clickPrintOrderLink"/>
<waitForPageLoad stepKey="waitForPageLoaded"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontClickViewOrderLinkOnMyOrdersPageActionGroup">
<annotations>
<description>Clicks the top "View Order" link on the My Account->My Orders page</description>
</annotations>

<click selector="{{StorefrontCustomerOrderSection.viewOrder}}" stepKey="clickViewOrder"/>
<waitForPageLoad stepKey="waitForPageLoaded"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminPanelIsFrozenIfStorefrontIsOpenedViaCustomerViewTest">
<annotations>
<features value="Customer"/>
Expand All @@ -23,50 +24,53 @@
<createData entity="SimpleProduct" stepKey="createSimpleProduct">
<requiredEntity createDataKey="createSimpleCategory"/>
</createData>
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="login"/>
</before>
<after>
<deleteData createDataKey="createSimpleCategory" stepKey="deleteCategory"/>
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
<actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderPage">
<argument name="customer" value="$simpleCustomer$"/>
</actionGroup>
<actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addSecondProduct">
<argument name="product" value="$createSimpleProduct$"/>
</actionGroup>
<actionGroup ref="FillOrderCustomerInformationActionGroup" stepKey="fillCustomerInfo">
<argument name="customer" value="$simpleCustomer$"/>
<argument name="address" value="US_Address_TX"/>
</actionGroup>
<actionGroup ref="OrderSelectFlatRateShippingActionGroup" stepKey="selectFlatRate"/>
<actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/>
<grabTextFrom selector="|Order # (\d+)|" stepKey="getOrderId"/>

<actionGroup ref="StartCreateInvoiceFromOrderPageActionGroup" stepKey="startCreateInvoice"/>
<actionGroup ref="SubmitInvoiceActionGroup" stepKey="submitInvoice"/>
<actionGroup ref="GoToShipmentIntoOrderActionGroup" stepKey="goToShipment"/>
<actionGroup ref="SubmitShipmentIntoOrderActionGroup" stepKey="submitShipment"/>

<!--Create Credit Memo-->
<actionGroup ref="StartToCreateCreditMemoActionGroup" stepKey="startToCreateCreditMemo">
<argument name="orderId" value="{$getOrderId}"/>
</actionGroup>
<actionGroup ref="SubmitCreditMemoActionGroup" stepKey="submitCreditMemo"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="navigateToNewOrderPage"/>
<createData entity="CustomerCart" stepKey="createCustomerCart">
<requiredEntity createDataKey="simpleCustomer"/>
</createData>
<createData entity="CustomerCartItem" stepKey="addSecondProduct">
<requiredEntity createDataKey="createCustomerCart"/>
<requiredEntity createDataKey="createSimpleProduct"/>
</createData>
<createData entity="CustomerAddressInformation" stepKey="fillCustomerInfo">
<requiredEntity createDataKey="createCustomerCart"/>
</createData>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectFlatRate"/>
<updateData createDataKey="createCustomerCart" entity="CustomerOrderPaymentMethod" stepKey="submitOrder">
<requiredEntity createDataKey="createCustomerCart"/>
</updateData>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="getOrderId"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="startCreateInvoice"/>
<createData entity="Invoice" stepKey="submitInvoice">
<requiredEntity createDataKey="createCustomerCart"/>
</createData>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="goToShipment"/>
<createData entity="Shipment" stepKey="submitShipment">
<requiredEntity createDataKey="createCustomerCart"/>
</createData>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="startToCreateCreditMemo"/>
<createData entity="CreditMemo" stepKey="submitCreditMemo">
<requiredEntity createDataKey="createCustomerCart"/>
</createData>

<actionGroup ref="LoginToStorefrontActionGroup" stepKey="logInCustomer">
<argument name="Customer" value="$$simpleCustomer$$"/>
</actionGroup>
<actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="goToMyOrdersPage">
<argument name="menu" value="My Orders"/>
</actionGroup>
<click selector="{{StorefrontCustomerOrderSection.viewOrder}}" stepKey="clickViewOrder"/>
<click selector="{{StorefrontCustomerOrderViewSection.printOrderLink}}" stepKey="clickPrintOrderLink"/>
<waitForPageLoad stepKey="waitPageReload"/>
<actionGroup ref="StorefrontClickViewOrderLinkOnMyOrdersPageActionGroup" stepKey="clickViewOrder"/>
<actionGroup ref="StorefrontClickPrintOrderLinkOnViewOrderPageActionGroup" stepKey="clickPrintOrderLink"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitPageReload"/>
<switchToWindow stepKey="switchToWindow"/>
<switchToPreviousTab stepKey="switchToPreviousTab"/>

<actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="goToAddressBook">
<argument name="menu" value="Address Book"/>
</actionGroup>
Expand Down

0 comments on commit eb1908c

Please sign in to comment.