Skip to content

Commit 18c36a6

Browse files
MC-37097: Stores are not shown in "Login as Customer: Select Store" modal window on order view page - MFTF tests fix.
1 parent dd26af2 commit 18c36a6

File tree

4 files changed

+11
-43
lines changed

4 files changed

+11
-43
lines changed

app/code/Magento/LoginAsCustomer/Test/Mftf/ActionGroup/AdminLoginAsCustomerLoginFromOrderPageActionGroup.xml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,8 @@
1616
<argument name="orderId" type="string"/>
1717
</arguments>
1818

19-
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderGridPage"/>
20-
<waitForPageLoad stepKey="waitForOrdersPage"/>
21-
<conditionalClick selector="{{AdminOrdersGridSection.clearFilters}}" dependentSelector="{{AdminOrdersGridSection.clearFilters}}" visible="true" stepKey="clearExistingOrderFilters"/>
22-
<waitForPageLoad stepKey="waitForClearFilters"/>
23-
<click selector="{{AdminOrdersGridSection.filters}}" stepKey="openOrderGridFilters"/>
24-
<waitForPageLoad stepKey="waitForClickFilters"/>
25-
<fillField selector="{{AdminOrdersGridSection.idFilter}}" userInput="{{orderId}}" stepKey="fillOrderIdFilter"/>
26-
<click selector="{{AdminOrdersGridSection.applyFilters}}" stepKey="clickOrderApplyFilters"/>
27-
<waitForPageLoad stepKey="waitForApplyFilters"/>
28-
<click selector="{{AdminDataGridTableSection.firstRow}}" stepKey="clickOrderRow"/>
29-
<waitForPageLoad stepKey="waitForOrderPageOpened"/>
19+
<amOnPage url="{{AdminOrderPage.url(orderId)}}" stepKey="gotoOrderPage"/>
20+
<waitForPageLoad stepKey="waitForOrderPageLoad"/>
3021
<click selector="{{AdminOrderDetailsMainActionsSection.loginAsCustomer}}" stepKey="clickLoginAsCustomerLink"/>
3122
<see selector="{{AdminConfirmationModalSection.title}}" userInput="You are about to Login as Customer"
3223
stepKey="seeModal"/>

app/code/Magento/LoginAsCustomer/Test/Mftf/ActionGroup/AdminLoginAsCustomerLoginFromOrderPageManualChooseActionGroup.xml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,8 @@
1717
<argument name="storeName" type="string" defaultValue="default"/>
1818
</arguments>
1919

20-
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderGridPage"/>
21-
<waitForPageLoad stepKey="waitForOrdersPage"/>
22-
<conditionalClick selector="{{AdminOrdersGridSection.clearFilters}}" dependentSelector="{{AdminOrdersGridSection.clearFilters}}" visible="true" stepKey="clearExistingOrderFilters"/>
23-
<waitForPageLoad stepKey="waitForClearFilters"/>
24-
<click selector="{{AdminOrdersGridSection.filters}}" stepKey="openOrderGridFilters"/>
25-
<waitForPageLoad stepKey="waitForClickFilters"/>
26-
<fillField selector="{{AdminOrdersGridSection.idFilter}}" userInput="{{orderId}}" stepKey="fillOrderIdFilter"/>
27-
<click selector="{{AdminOrdersGridSection.applyFilters}}" stepKey="clickOrderApplyFilters"/>
28-
<waitForPageLoad stepKey="waitForApplyFilters"/>
29-
<click selector="{{AdminDataGridTableSection.firstRow}}" stepKey="clickOrderRow"/>
30-
<waitForPageLoad stepKey="waitForOrderPageOpened"/>
20+
<amOnPage url="{{AdminOrderPage.url(orderId)}}" stepKey="gotoOrderPage"/>
21+
<waitForPageLoad stepKey="waitForCustomerPageLoad"/>
3122
<click selector="{{AdminOrderDetailsMainActionsSection.loginAsCustomer}}" stepKey="clickLoginAsCustomerLink"/>
3223
<see selector="{{AdminConfirmationModalSection.title}}" userInput="Login as Customer: Select Store" stepKey="seeModal"/>
3324
<see selector="{{AdminConfirmationModalSection.message}}" userInput="Actions taken while in &quot;Login as Customer&quot; will affect actual customer data." stepKey="seeModalMessage"/>

app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerManualChooseFromOrderPageTest.xml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,26 +60,15 @@
6060
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
6161
</after>
6262

63-
<!-- Login as Customer from Customer page -->
64-
<actionGroup ref="AdminLoginAsCustomerLoginFromCustomerPageManualChooseActionGroup"
65-
stepKey="loginAsCustomerFromCustomerPage">
66-
<argument name="customerId" value="$$createCustomer.id$$"/>
67-
<argument name="storeName" value="{{customStoreGroup.name}}"/>
68-
</actionGroup>
69-
70-
<!-- Place Order as Customer -->
71-
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage">
72-
<argument name="productUrl" value="$$createProduct.sku$$"/>
73-
</actionGroup>
74-
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart">
63+
<!-- Create order -->
64+
<actionGroup ref="CreateOrderInStoreActionGroup" stepKey="createOrder">
7565
<argument name="product" value="$$createProduct$$"/>
76-
<argument name="productCount" value="1"/>
66+
<argument name="customer" value="$$createCustomer$$"/>
67+
<argument name="storeView" value="customStoreFR"/>
7768
</actionGroup>
78-
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="openCart"/>
79-
<actionGroup ref="PlaceOrderWithLoggedUserActionGroup" stepKey="placeOrder"/>
80-
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderId"/>
69+
<grabFromCurrentUrl regex="~/order_id/(\d+)/~" stepKey="grabOrderId"/>
8170

82-
<!-- Login as Customer from Customer page -->
71+
<!-- Login as Customer from Order page -->
8372
<actionGroup ref="AdminLoginAsCustomerLoginFromOrderPageManualChooseActionGroup"
8473
stepKey="loginAsCustomerFromOrderPage">
8574
<argument name="orderId" value="{$grabOrderId}"/>

app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminUIShownIfLoginAsCustomerEnabledTest.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@
5959
<argument name="product" value="$$createSimpleProduct$$"/>
6060
<argument name="customer" value="$$createCustomer$$"/>
6161
</actionGroup>
62-
<grabTextFrom selector="{{AdminOrderDetailsInformationSection.orderId}}" stepKey="grabOrderId"/>
63-
<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGridById">
64-
<argument name="orderId" value="$grabOrderId"/>
65-
</actionGroup>
62+
<grabFromCurrentUrl regex="~/order_id/(\d+)/~" stepKey="grabOrderId"/>
6663

6764
<!-- Verify Login as Customer Login action works correctly from Order page -->
6865
<actionGroup ref="AdminLoginAsCustomerLoginFromOrderPageActionGroup"

0 commit comments

Comments
 (0)