Skip to content

Commit 6da08a8

Browse files
Manjusha.SManjusha.S
authored andcommitted
Merge branch 'AC-5245' into functional-testing-automation-version2
2 parents a9768f2 + e34846b commit 6da08a8

File tree

5 files changed

+105
-4
lines changed

5 files changed

+105
-4
lines changed

app/code/Magento/CatalogInventory/Test/Mftf/Data/CatalogInventoryConfigData.xml

100644100755
File mode changed.
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="DisabledInventoryBackOrdersTest">
12+
<annotations>
13+
<features value="[Disabled Inventory Check] Onepage Checkout and Enabled Backorders"/>
14+
<stories value="[Disabled Inventory Check] Onepage Checkout and Enabled Backorders"/>
15+
<title value="OnePageCheckoutAndEnabledBackOrders"/>
16+
<description value="[Disabled Inventory Check] Onepage Checkout and Enabled Backorders"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="AC-5245"/>
19+
</annotations>
20+
21+
<before>
22+
<!-- Enable Back Orders-->
23+
<magentoCLI command="config:set cataloginventory/item_options/backorders 1" stepKey="EnableBackorders"/>
24+
<!--Create Category-->
25+
<createData entity="_defaultCategory" stepKey="testCategory"/>
26+
<!-- Create SimpleProductwithPrice100 -->
27+
<createData entity="SimpleProduct_100" stepKey="simpleProductOne">
28+
<requiredEntity createDataKey="testCategory"/>
29+
</createData>
30+
<!-- Assign SimpleProductOne to Category -->
31+
<createData entity="AssignProductToCategory" stepKey="assignSimpleProductOneToTestCategory">
32+
<requiredEntity createDataKey="testCategory"/>
33+
<requiredEntity createDataKey="simpleProductOne"/>
34+
</createData>
35+
<!--Set Enable Inventory Check On Cart Load = No-->
36+
<magentoCLI command="config:set {{DisableInventoryCheckOnCartLoad.path}} {{DisableInventoryCheckOnCartLoad.value}}" stepKey="disableCartLoad"/>
37+
<!-- Cache Flush-->
38+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushConfigCache">
39+
<argument name="tags" value="config"/>
40+
</actionGroup>
41+
</before>
42+
<!--Delete Category, Product and Set Enable Inventory Check On Cart Load = Yes-->
43+
<after>
44+
<magentoCLI command="config:set {{EnableInventoryCheckOnCartLoad.path}} {{EnableInventoryCheckOnCartLoad.value}}" stepKey="enableCartLoad"/>
45+
<magentoCLI command="config:set cataloginventory/item_options/backorders 0" stepKey="EnableBackorders"/>
46+
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
47+
<deleteData createDataKey="simpleProductOne" stepKey="deleteProduct"/>
48+
<deleteData createDataKey="testCategory" stepKey="deleteTestCategory"/>
49+
</after>
50+
<!--Go to product page-->
51+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductFromCategory">
52+
<argument name="productUrlKey" value="$simpleProductOne.custom_attributes[url_key]$"/>
53+
</actionGroup>
54+
<!--Add Product to Shopping Cart-->
55+
<actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPageActionGroup" stepKey="addProductToCart">
56+
<argument name="productName" value="$$simpleProductOne.name$$"/>
57+
<argument name="productQty" value="2"/>
58+
</actionGroup>
59+
<actionGroup ref="StorefrontOpenMiniCartActionGroup" stepKey="openViewAndEditCart"/>
60+
<!--Go to Checkout-->
61+
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="gotocheckout"/>
62+
<!--Filling shipping information and click next-->
63+
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping">
64+
<argument name="shippingMethod" value="Flat Rate"/>
65+
<argument name="customerVar" value="Simple_US_Customer_NY"/>
66+
<argument name="customerAddressVar" value="US_Address_NY"/>
67+
</actionGroup>
68+
<!--Select Payment Method-->
69+
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectPaymentMethod"/>
70+
<!-- Open and switch to a new browser tab. -->
71+
<openNewTab stepKey="openNewTab"/>
72+
<!-- Open Product From AdminPage-->
73+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
74+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openProductEditPageinNewTab">
75+
<argument name="productId" value="$simpleProductOne.id$"/>
76+
</actionGroup>
77+
<actionGroup ref="AdminFillProductQtyOnProductFormActionGroup" stepKey="fillVirtualProductQuantity">
78+
<argument name="productQty" value="1"/>
79+
</actionGroup>
80+
<actionGroup ref="SaveProductFormActionGroup" stepKey="clicksaveProduct"/>
81+
<!-- Switch to Previous tab and Check Error message There are no source items with the in stock status* is displayed -->
82+
<switchToPreviousTab stepKey="switchToPreviousTab"/>
83+
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/>
84+
<waitForPageLoad stepKey="waitForSuccessMessage"/>
85+
<!--See success messages-->
86+
<see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="seeSuccessTitle"/>
87+
<see selector="{{CheckoutSuccessMainSection.orderNumberText}}" userInput="Your order # is: " stepKey="seeOrderNumber"/>
88+
89+
<actionGroup ref="AdminOpenCatalogProductPageActionGroup" stepKey="goToCatalogPage"/>
90+
<!--Apply Name Filter-->
91+
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions">
92+
<argument name="product" value="$$simpleProductOne$$"/>
93+
</actionGroup>
94+
<!--Check Simple qty changed to negative value "-1"-->
95+
<see selector="{{AdminProductGridSection.productSalableQty('1', _defaultStock.name)}}" userInput="-1" stepKey="checkSalableQtyAfterPlaceOrder"/>
96+
</test>
97+
</tests>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</annotations>
2020

2121
<before>
22-
22+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
2323
<!--Create Product via API-->
2424
<createData entity="SimpleProduct2" stepKey="Product"/>
2525

@@ -106,6 +106,7 @@
106106
</before>
107107

108108
<after>
109+
<magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/>
109110
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
110111
<deleteData createDataKey="Product" stepKey="deleteProduct"/>
111112
<deleteData createDataKey="Customer" stepKey="deleteCustomer"/>

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
</annotations>
2121
<before>
2222
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="LoginAsAdmin"/>
23-
23+
<!-- Enable Flat rate-->
24+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
2425
<createData entity="_defaultCategory" stepKey="createCategory"/>
2526
<createData entity="SimpleProduct" stepKey="createProduct01">
2627
<requiredEntity createDataKey="createCategory"/>
@@ -92,7 +93,7 @@
9293
<comment userInput="Adding the comment to replace CliCacheFlushActionGroup action group ('cache:flush' command) for preserving Backward Compatibility" stepKey="flushCache"/>
9394
</before>
9495
<after>
95-
96+
<magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/>
9697
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
9798
<deleteData createDataKey="createProduct01" stepKey="deleteProduct1"/>
9899
<deleteData createDataKey="createProduct02" stepKey="deleteProduct2"/>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
</annotations>
2121
<before>
2222
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="LoginAsAdmin"/>
23-
23+
<!-- Enable Flat rate-->
24+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
2425
<createData entity="_defaultCategory" stepKey="createCategory"/>
2526
<createData entity="SimpleProduct" stepKey="createProduct01">
2627
<requiredEntity createDataKey="createCategory"/>
@@ -87,6 +88,7 @@
8788

8889
</before>
8990
<after>
91+
<magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/>
9092
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
9193
<deleteData createDataKey="createProduct01" stepKey="deleteProduct1"/>
9294
<deleteData createDataKey="createProduct02" stepKey="deleteProduct2"/>

0 commit comments

Comments
 (0)