Skip to content

Commit e81b81a

Browse files
committed
MC-4329: Convert AddProductsToCartBySkuFromBackendTest to MFTF
fix MC-16768
1 parent 924a101 commit e81b81a

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderGridActionGroup.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<!--Filter order grid by order id field-->
1212
<actionGroup name="filterOrderGridById">
1313
<arguments>
@@ -27,4 +27,16 @@
2727
<click selector="{{AdminDataGridTableSection.firstRow}}" after="clickOrderApplyFilters" stepKey="openOrderViewPage"/>
2828
<waitForPageLoad after="openOrderViewPage" stepKey="waitForOrderViewPageOpened"/>
2929
</actionGroup>
30+
31+
<actionGroup name="OpenOrderByName" extends="filterOrderGridById">
32+
<arguments>
33+
<argument name="orderName" type="string"/>
34+
</arguments>
35+
<remove keyForRemoval="openOrderGridFilters"/>
36+
<remove keyForRemoval="fillOrderIdFilter"/>
37+
<remove keyForRemoval="clickOrderApplyFilters"/>
38+
39+
<click selector="{{AdminDataGridTableSection.rowTemplate(orderName)}}" stepKey="openOrderViewPage"/>
40+
<waitForPageLoad after="openOrderViewPage" stepKey="waitForOrderViewPageOpened"/>
41+
</actionGroup>
3042
</actionGroups>

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@
5252
</after>
5353
<!-- Login as admin -->
5454
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
55-
<!--Open order by Id-->
56-
<actionGroup ref="OpenOrderById" stepKey="openOrderById">
55+
56+
<actionGroup ref="OpenOrderByName" stepKey="openOrderById">
5757
<argument name="orderId" value="$createGuestCart.return$"/>
58+
<argument name="orderName" value="{{ShippingAddressTX.fullname}}"/>
5859
</actionGroup>
5960
<!--Reorder-->
6061
<click selector="{{AdminOrderDetailsMainActionsSection.reorder}}" stepKey="clickReorder"/>
@@ -63,7 +64,7 @@
6364
<see selector="{{AdminOrderItemsOrderedSection.productPrice('2')}}" userInput="${{AdminOrderSimpleProductWithCatalogRule.subtotal}}" stepKey="seeOrderItemPrice"/>
6465
<!--Verify totals on Order page-->
6566
<scrollTo selector="{{AdminOrderFormTotalSection.grandTotal}}" stepKey="scrollToOrderGrandTotal"/>
66-
<waitForElementVisible selector="{{AdminOrderFormTotalSection.total('Subtotal')}}" stepKey="waitOrderSubtotalToBeVisible"/>
67+
<waitForElementVisible selector="{{AdminOrderFormTotalSection.total( 'Subtotal')}}" stepKey="waitOrderSubtotalToBeVisible"/>
6768
<see selector="{{AdminOrderFormTotalSection.total('Subtotal')}}" userInput="${{AdminOrderSimpleProductWithCatalogRule.subtotal}}" stepKey="seeOrderSubTotal"/>
6869
<waitForElementVisible selector="{{AdminOrderFormTotalSection.total('Shipping')}}" stepKey="waitOrderShippingToBeVisible"/>
6970
<see selector="{{AdminOrderFormTotalSection.total('Shipping')}}" userInput="${{AdminOrderSimpleProductWithCatalogRule.shipping}}" stepKey="seeOrderShipping"/>

0 commit comments

Comments
 (0)