Skip to content

Commit 5e6fe4c

Browse files
committed
MC-31443: [FT] [MFTF] [2.4] Fix flaky test AdminReorderWithCatalogPriceTest (MC-16695)
1 parent e280215 commit 5e6fe4c

File tree

1 file changed

+16
-23
lines changed

1 file changed

+16
-23
lines changed

app/code/Magento/Sales/Test/Mftf/Test/AdminReorderWithCatalogPriceTest.xml renamed to app/code/Magento/Sales/Test/Mftf/Test/AdminReorderWithCatalogPriceRuleDiscountTest.xml

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,26 @@
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="AdminReorderWithCatalogPriceTest">
10+
<test name="AdminReorderWithCatalogPriceRuleDiscountTest">
1111
<annotations>
1212
<features value="Sales"/>
1313
<stories value="Admin create order"/>
1414
<title value="Reorder doesn't show discount price in Order Totals block"/>
1515
<description value="Reorder doesn't show discount price in Order Totals block"/>
1616
<severity value="CRITICAL"/>
17-
<testCaseId value="MC-16695"/>
17+
<testCaseId value="MC-28642"/>
1818
<useCaseId value="MAGETWO-99691"/>
1919
<group value="sales"/>
2020
<group value="catalogRule"/>
2121
</annotations>
22+
2223
<before>
23-
<!--Create the catalog price rule -->
24-
<createData entity="CatalogRuleToPercent" stepKey="createCatalogRule"/>
2524
<!--Create product-->
2625
<createData entity="SimpleProduct2" stepKey="createSimpleProductApi"/>
26+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
27+
<actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllCatalogPriceRule"/>
28+
<!--Create the catalog price rule -->
29+
<createData entity="CatalogRuleToPercent" stepKey="createCatalogRule"/>
2730
<!--Create order via API-->
2831
<createData entity="GuestCart" stepKey="createGuestCart"/>
2932
<createData entity="SimpleCartItem" stepKey="addCartItem">
@@ -36,39 +39,29 @@
3639
<updateData createDataKey="createGuestCart" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformation">
3740
<requiredEntity createDataKey="createGuestCart"/>
3841
</updateData>
39-
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
40-
<magentoCLI command="cache:flush" stepKey="flushCache"/>
4142
<!--END Create order via API-->
4243
</before>
44+
4345
<after>
4446
<deleteData createDataKey="createSimpleProductApi" stepKey="deleteSimpleProductApi"/>
45-
<!-- Delete the rule -->
46-
<actionGroup ref="RemoveCatalogPriceRuleActionGroup" stepKey="deletePriceRule">
47-
<argument name="ruleName" value="{{CatalogRuleToPercent.name}}" />
48-
</actionGroup>
49-
<!--Clear all filters in grid-->
50-
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="resetCatalogRuleGridFilters"/>
51-
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="onOrdersPage"/>
52-
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilter"/>
53-
<actionGroup ref="logout" stepKey="logout"/>
47+
<actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllCatalogPriceRule"/>
48+
<actionGroup ref="logout" stepKey="logoutFromAdmin"/>
5449
</after>
55-
<!-- Login as admin -->
56-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
57-
<!--Open order page by Id-->
50+
51+
<!--Open order by Id-->
5852
<amOnPage url="{{AdminOrderPage.url($createGuestCart.return$)}}" stepKey="navigateToOrderPage"/>
59-
<waitForPageLoad stepKey="waitForCreatedOrderPage"/>
6053
<!--Reorder-->
6154
<click selector="{{AdminOrderDetailsMainActionsSection.reorder}}" stepKey="clickReorder"/>
6255
<!--Verify order item row-->
6356
<waitForElementVisible selector="{{AdminOrderItemsOrderedSection.productPrice('2')}}" stepKey="waitOrderItemPriceToBeVisible"/>
64-
<see selector="{{AdminOrderItemsOrderedSection.productPrice('2')}}" userInput="${{AdminOrderSimpleProductWithCatalogRule.subtotal}}" stepKey="seeOrderItemPrice"/>
57+
<see selector="{{AdminOrderItemsOrderedSection.productPrice('2')}}" userInput="{{AdminOrderSimpleProductWithCatalogRule.subtotal}}" stepKey="seeOrderItemPrice"/>
6558
<!--Verify totals on Order page-->
6659
<scrollTo selector="{{AdminOrderFormTotalSection.grandTotal}}" stepKey="scrollToOrderGrandTotal"/>
6760
<waitForElementVisible selector="{{AdminOrderFormTotalSection.total('Subtotal')}}" stepKey="waitOrderSubtotalToBeVisible"/>
68-
<see selector="{{AdminOrderFormTotalSection.total('Subtotal')}}" userInput="${{AdminOrderSimpleProductWithCatalogRule.subtotal}}" stepKey="seeOrderSubTotal"/>
61+
<see selector="{{AdminOrderFormTotalSection.total('Subtotal')}}" userInput="{{AdminOrderSimpleProductWithCatalogRule.subtotal}}" stepKey="seeOrderSubTotal"/>
6962
<waitForElementVisible selector="{{AdminOrderFormTotalSection.total('Shipping')}}" stepKey="waitOrderShippingToBeVisible"/>
70-
<see selector="{{AdminOrderFormTotalSection.total('Shipping')}}" userInput="${{AdminOrderSimpleProductWithCatalogRule.shipping}}" stepKey="seeOrderShipping"/>
63+
<see selector="{{AdminOrderFormTotalSection.total('Shipping')}}" userInput="{{AdminOrderSimpleProductWithCatalogRule.shipping}}" stepKey="seeOrderShipping"/>
7164
<waitForElementVisible selector="{{AdminOrderFormTotalSection.grandTotal}}" stepKey="waitOrderGrandTotalToBeVisible"/>
72-
<see selector="{{AdminOrderFormTotalSection.grandTotal}}" userInput="${{AdminOrderSimpleProductWithCatalogRule.grandTotal}}" stepKey="seeCorrectGrandTotal"/>
65+
<see selector="{{AdminOrderFormTotalSection.grandTotal}}" userInput="{{AdminOrderSimpleProductWithCatalogRule.grandTotal}}" stepKey="seeCorrectGrandTotal"/>
7366
</test>
7467
</tests>

0 commit comments

Comments
 (0)