Skip to content

Commit b38e9cc

Browse files
committed
MAGETWO-54438: Simple Product don't appear on Storefront after order cancelation with Bundle
- Changed actionGroup name - Added actionGroup argument - Changed comment stepKeys
1 parent ff7b120 commit b38e9cc

File tree

2 files changed

+42
-40
lines changed

2 files changed

+42
-40
lines changed

app/code/Magento/CatalogInventory/Test/Mftf/ActionGroup/StorefrontAssertProductStockStatusActionGroup.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="storefrontCheckProductStockStatus">
11+
<actionGroup name="StorefrontCheckProductStockStatus">
1212
<arguments>
1313
<argument name="productUrlKey" type="string"/>
1414
<argument name="productName" type="string"/>
15+
<argument name="stockStatus" type="string" defaultValue="IN STOCK"/>
1516
</arguments>
1617
<amOnPage url="{{StorefrontProductPage.url(productUrlKey)}}" stepKey="navigateToProductPage"/>
1718
<waitForPageLoad stepKey="waitForProductPageLoad"/>
1819
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{productName}}" stepKey="seeProductName"/>
19-
<see userInput="IN STOCK" stepKey="assertProductStockStatus"/>
20+
<see userInput="{{stockStatus}}" stepKey="assertProductStockStatus"/>
2021
</actionGroup>
2122
</actionGroups>
23+

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

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,26 @@
2121
<before>
2222
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2323
<!-- Set default flat rate shipping method settings -->
24-
<comment userInput="Set default flat rate shipping method settings" stepKey="SetDefaultFlatRateShippingMethodSetting"/>
24+
<comment userInput="Set default flat rate shipping method settings" stepKey="setDefaultFlatRateShippingMethodComment"/>
2525
<createData entity="FlatRateShippingMethodDefault" stepKey="setDefaultFlatRateShippingMethod"/>
2626
<!-- Create simple customer -->
27-
<comment userInput="Create simple customer" stepKey="CreateSimpleCustomer"/>
27+
<comment userInput="Create simple customer" stepKey="createSimpleCustomerComment"/>
2828
<createData entity="Simple_US_Customer_CA" stepKey="simpleCustomer"/>
2929
<!-- Create the category -->
30-
<comment userInput="Create the category" stepKey="CreateTheCategory"/>
30+
<comment userInput="Create the category" stepKey="createCategoryComment"/>
3131
<createData entity="ApiCategory" stepKey="createCategory"/>
3232
<!-- Create Virtual Product -->
33-
<comment userInput="Create Virtual Product" stepKey="CreateVirtualProduct"/>
33+
<comment userInput="Create Virtual Product" stepKey="createVirtualProductComment"/>
3434
<createData entity="VirtualProductPrice10Qty1" stepKey="virtualProduct">
3535
<requiredEntity createDataKey="createCategory"/>
3636
</createData>
3737
<!-- Create Simple Product -->
38-
<comment userInput="Create Simple Product" stepKey="CreateSimpleProduct"/>
38+
<comment userInput="Create Simple Product" stepKey="createSimpleProductComment"/>
3939
<createData entity="SimpleProductPrice10Qty1" stepKey="simpleProduct">
4040
<requiredEntity createDataKey="createCategory"/>
4141
</createData>
4242
<!-- Create Bundle product -->
43-
<comment userInput="Create Bundle Product" stepKey="CreateBundleProduct"/>
43+
<comment userInput="Create Bundle Product" stepKey="createBundleProductComment"/>
4444
<createData entity="SimpleProduct2Price10Qty1" stepKey="simpleProduct1"/>
4545
<createData entity="BundleProductPriceViewRange" stepKey="createBundleProduct">
4646
<requiredEntity createDataKey="createCategory"/>
@@ -55,41 +55,41 @@
5555
<requiredEntity createDataKey="simpleProduct1"/>
5656
</createData>
5757
<!-- Create configurable product and add it to the category -->
58-
<comment userInput="Create configurable product and add it to the category" stepKey="CreateConfigProduct"/>
58+
<comment userInput="Create configurable product and add it to the category" stepKey="createConfigProductComment"/>
5959
<createData entity="ConfigurableProductPrice10Qty1" stepKey="createConfigProduct">
6060
<requiredEntity createDataKey="createCategory"/>
6161
</createData>
6262
<!-- Create an attribute with two options to be used in the first child product -->
63-
<comment userInput="Create an attribute with two options to be used in the first child product" stepKey="CreateOptionsOfTheFirstChildProduct"/>
63+
<comment userInput="Create an attribute with two options to be used in the first child product" stepKey="createOptionsOfTheFirstChildProductComment"/>
6464
<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/>
6565
<createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1">
6666
<requiredEntity createDataKey="createConfigProductAttribute"/>
6767
</createData>
6868
<!-- Add the attribute we just created to default attribute set -->
69-
<comment userInput="Add the attribute we just created to default attribute set" stepKey="AddAttributeToDefaultAttrSet"/>
69+
<comment userInput="Add the attribute we just created to default attribute set" stepKey="addAttributeToDefaultAttrSetComment"/>
7070
<createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet">
7171
<requiredEntity createDataKey="createConfigProductAttribute"/>
7272
</createData>
7373
<!-- Get the option of the attribute we created -->
74-
<comment userInput="Get the option of the attribute we created" stepKey="GetAttributeOption"/>
74+
<comment userInput="Get the option of the attribute we created" stepKey="getAttributeOptionComment"/>
7575
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1">
7676
<requiredEntity createDataKey="createConfigProductAttribute"/>
7777
</getData>
7878
<!-- Create a simple product and give it the attribute with option -->
79-
<comment userInput="Create a simple product and give it the attribute with option" stepKey="CreateSimpleProductWithOptions"/>
79+
<comment userInput="Create a simple product and give it the attribute with option" stepKey="createSimpleProductWithOptionsComment"/>
8080
<createData entity="SimpleProduct3Price10Qty1" stepKey="createConfigChildProduct1">
8181
<requiredEntity createDataKey="createConfigProductAttribute"/>
8282
<requiredEntity createDataKey="getConfigAttributeOption1"/>
8383
</createData>
8484
<!-- Create the configurable product -->
85-
<comment userInput="Create the configurable product" stepKey="CreateTheConfigurableProduct"/>
85+
<comment userInput="Create the configurable product" stepKey="createConfigurableProductComment"/>
8686
<createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption">
8787
<requiredEntity createDataKey="createConfigProduct"/>
8888
<requiredEntity createDataKey="createConfigProductAttribute"/>
8989
<requiredEntity createDataKey="getConfigAttributeOption1"/>
9090
</createData>
9191
<!-- Add simple product to the configurable product -->
92-
<comment userInput="Add simple product to the configurable product" stepKey="AddSimpleProductToConfigurable"/>
92+
<comment userInput="Add simple product to the configurable product" stepKey="addSimpleProductToConfigurableComment"/>
9393
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1">
9494
<requiredEntity createDataKey="createConfigProduct"/>
9595
<requiredEntity createDataKey="createConfigChildProduct1"/>
@@ -110,48 +110,48 @@
110110
<actionGroup ref="logout" stepKey="logout"/>
111111
</after>
112112
<!-- Create new customer order -->
113-
<comment userInput="Create new customer order" stepKey="CreateNewCustomerOrder"/>
113+
<comment userInput="Create new customer order" stepKey="createNewCustomerOrderComment"/>
114114
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="navigateToNewOrderWithExistingCustomer">
115115
<argument name="customer" value="$$simpleCustomer$$"/>
116116
</actionGroup>
117117
<!-- Add bundle product to order and check product price in grid -->
118-
<comment userInput="Add bundle product to order and check product price in grid" stepKey="AddBundleProductToOrder"/>
118+
<comment userInput="Add bundle product to order and check product price in grid" stepKey="addBundleProductToOrderComment"/>
119119
<actionGroup ref="addBundleProductToOrder" stepKey="addBundleProductToOrder">
120120
<argument name="product" value="$$createBundleProduct$$"/>
121121
<argument name="quantity" value="1"/>
122122
</actionGroup>
123123
<!-- Add configurable product to order -->
124-
<comment userInput="Add configurable product to order" stepKey="AddConfigurableProductToOrder"/>
124+
<comment userInput="Add configurable product to order" stepKey="addConfigurableProductToOrderComment"/>
125125
<actionGroup ref="newAddConfigurableProductToOrder" stepKey="addConfigurableProductToOrder">
126126
<argument name="product" value="$$createConfigProduct$$"/>
127127
<argument name="attribute" value="$$createConfigProductAttribute$$"/>
128128
<argument name="option" value="$$getConfigAttributeOption1$$"/>
129129
</actionGroup>
130130
<!-- Add Simple product to order -->
131-
<comment userInput="Add Simple product to order" stepKey="AddSimpleProductToOrder"/>
131+
<comment userInput="Add Simple product to order" stepKey="addSimpleProductToOrderComment"/>
132132
<actionGroup ref="addSimpleProductToOrder" stepKey="addSimpleProductToTheOrder">
133133
<argument name="product" value="$$simpleProduct$$"/>
134134
</actionGroup>
135135
<!-- Add Virtual product to order -->
136-
<comment userInput="Add Virtual product to order" stepKey="AddVirtualProductToOrder"/>
136+
<comment userInput="Add Virtual product to order" stepKey="addVirtualProductToOrderComment"/>
137137
<actionGroup ref="addSimpleProductToOrder" stepKey="addVirtualProductToTheOrder">
138138
<argument name="product" value="$$virtualProduct$$"/>
139139
</actionGroup>
140140
<!-- Select FlatRate shipping method -->
141-
<comment userInput="Select FlatRate shipping method" stepKey="SelectFlatRateShippingMethod"/>
141+
<comment userInput="Select FlatRate shipping method" stepKey="selectFlatRateShippingMethodComment"/>
142142
<actionGroup ref="AdminSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/>
143143
<!-- Submit order -->
144-
<comment userInput="Submit order" stepKey="SubmitOrder"/>
144+
<comment userInput="Submit order" stepKey="submitOrderComment"/>
145145
<click selector="{{AdminOrderFormActionSection.SubmitOrder}}" stepKey="submitOrder"/>
146146
<!-- Verify order information -->
147-
<comment userInput="Verify order information" stepKey="VerifyOrderInformation"/>
147+
<comment userInput="Verify order information" stepKey="verifyOrderInformationComment"/>
148148
<actionGroup ref="verifyCreatedOrderInformation" stepKey="verifyCreatedOrderInformation"/>
149149
<grabTextFrom selector="|Order # (\d+)|" stepKey="orderId"/>
150150
<!-- Cancel the Order -->
151-
<comment userInput="Cancel the Order" stepKey="CancelTheOrder"/>
151+
<comment userInput="Cancel the Order" stepKey="cancelTheOrder"/>
152152
<actionGroup ref="cancelPendingOrder" stepKey="cancelPendingOrder"/>
153153
<!-- Assert Simple Product Quantity in backend after order Canceled -->
154-
<comment userInput="Assert Simple Product Quantity in backend after order Canceled" stepKey="AssertSimpleProductQuantityAfterOrderCanceled"/>
154+
<comment userInput="Assert Simple Product Quantity in backend after order Canceled" stepKey="assertSimpleProductQuantityAfterOrderCanceledComment"/>
155155
<actionGroup ref="filterAndSelectProduct" stepKey="filterAndSelectTheProduct">
156156
<argument name="productSku" value="$$simpleProduct.sku$$"/>
157157
</actionGroup>
@@ -160,13 +160,13 @@
160160
<seeInField selector="{{AdminProductFormSection.productQuantity}}" userInput="1" stepKey="seeProductQuantity"/>
161161
<seeInField selector="{{AdminProductFormSection.productStockStatus}}" userInput="In Stock" stepKey="seeProductStockStatus"/>
162162
<!-- Assert Simple Product Stock Status in frontend after order canceled -->
163-
<comment userInput="Assert Simple Product Stock Status in frontend after order Canceled" stepKey="AssertSimpleProductStockStatus"/>
164-
<actionGroup ref="storefrontCheckProductStockStatus" stepKey="checkProductQtyOfSimpleProduct">
163+
<comment userInput="Assert Simple Product Stock Status in frontend after order Canceled" stepKey="assertSimpleProductStockStatusComment"/>
164+
<actionGroup ref="StorefrontCheckProductStockStatus" stepKey="checkProductQtyOfSimpleProduct">
165165
<argument name="productUrlKey" value="$$simpleProduct.custom_attributes[url_key]$$"/>
166166
<argument name="productName" value="$$simpleProduct.name$$"/>
167167
</actionGroup>
168168
<!-- Assert Virtual Product Quantity in backend after order canceled -->
169-
<comment userInput="Assert Virtual Product Quantity in backend after order canceled" stepKey="AssertVirtualProductQuantityAfterOrderCanceled"/>
169+
<comment userInput="Assert Virtual Product Quantity in backend after order canceled" stepKey="assertVirtualProductQuantityAfterOrderCanceledComment"/>
170170
<actionGroup ref="filterAndSelectProduct" stepKey="filterAndSelectTheVirtualProduct">
171171
<argument name="productSku" value="$$virtualProduct.sku$$"/>
172172
</actionGroup>
@@ -175,13 +175,13 @@
175175
<seeInField selector="{{AdminProductFormSection.productQuantity}}" userInput="1" stepKey="seeVirtualProductQuantity"/>
176176
<seeInField selector="{{AdminProductFormSection.productStockStatus}}" userInput="In Stock" stepKey="seeVirtualProductStockStatus"/>
177177
<!-- Assert Virtual Product Stock Status in frontend after order canceled -->
178-
<comment userInput="Assert Virtual Product Stock Status in frontend after order Canceled" stepKey="AssertVirtualProductStockStatus"/>
179-
<actionGroup ref="storefrontCheckProductStockStatus" stepKey="checkProductQtyOfVirtualProduct">
178+
<comment userInput="Assert Virtual Product Stock Status in frontend after order Canceled" stepKey="assertVirtualProductStockStatusComment"/>
179+
<actionGroup ref="StorefrontCheckProductStockStatus" stepKey="checkProductQtyOfVirtualProduct">
180180
<argument name="productUrlKey" value="$$virtualProduct.custom_attributes[url_key]$$"/>
181181
<argument name="productName" value="$$virtualProduct.name$$"/>
182182
</actionGroup>
183183
<!-- Assert Bundle Product Quantity in backend after order canceled -->
184-
<comment userInput="Assert Bundle Product Quantity in backend after order canceled" stepKey="AssertBundleProductQuantityAfterOrderCanceled"/>
184+
<comment userInput="Assert Bundle Product Quantity in backend after order canceled" stepKey="assertBundleProductQuantityAfterOrderCanceledComment"/>
185185
<actionGroup ref="filterAndSelectProduct" stepKey="filterAndSelectTheBundleProduct">
186186
<argument name="productSku" value="$$simpleProduct1.sku$$"/>
187187
</actionGroup>
@@ -190,13 +190,13 @@
190190
<seeInField selector="{{AdminProductFormSection.productQuantity}}" userInput="1" stepKey="seeBundleProductQuantity"/>
191191
<seeInField selector="{{AdminProductFormSection.productStockStatus}}" userInput="In Stock" stepKey="seeBundleProductStockStatus"/>
192192
<!-- Assert Bundle Product Stock Status in frontend after order canceled -->
193-
<comment userInput="Assert Bundle Product Stock Status in frontend after order Canceled" stepKey="AssertBundleProductStockStatus"/>
194-
<actionGroup ref="storefrontCheckProductStockStatus" stepKey="checkProductQtyOfBundleProduct">
193+
<comment userInput="Assert Bundle Product Stock Status in frontend after order Canceled" stepKey="assertBundleProductStockStatusComment"/>
194+
<actionGroup ref="StorefrontCheckProductStockStatus" stepKey="checkProductQtyOfBundleProduct">
195195
<argument name="productUrlKey" value="$$createBundleProduct.custom_attributes[url_key]$$"/>
196196
<argument name="productName" value="$$createBundleProduct.name$$"/>
197197
</actionGroup>
198198
<!-- Assert Configurable Product Quantity in backend after order canceled -->
199-
<comment userInput="Assert Configurable Product quantity in backend after order canceled" stepKey="AssertConfigurableProductQuantityAfterOrderCanceled"/>
199+
<comment userInput="Assert Configurable Product quantity in backend after order canceled" stepKey="assertConfigurableProductQuantityAfterOrderCanceledComment"/>
200200
<actionGroup ref="filterAndSelectProduct" stepKey="filterAndSelectTheConfigProduct">
201201
<argument name="productSku" value="$$createConfigChildProduct1.sku$$"/>
202202
</actionGroup>
@@ -205,29 +205,29 @@
205205
<seeInField selector="{{AdminProductFormSection.productQuantity}}" userInput="1" stepKey="seeConfigProductQuantity"/>
206206
<seeInField selector="{{AdminProductFormSection.productStockStatus}}" userInput="In Stock" stepKey="seeConfigProductStockStatus"/>
207207
<!-- Assert Configurable Product Stock Status in frontend after order canceled -->
208-
<comment userInput="Assert Configurable Product Stock Status in frontend after order Canceled" stepKey="AssertConfigurableProductStockStatus"/>
209-
<actionGroup ref="storefrontCheckProductStockStatus" stepKey="checkProductQtyOfConfigProductInFrontend">
208+
<comment userInput="Assert Configurable Product Stock Status in frontend after order Canceled" stepKey="assertConfigurableProductStockStatusComment"/>
209+
<actionGroup ref="StorefrontCheckProductStockStatus" stepKey="checkProductQtyOfConfigProductInFrontend">
210210
<argument name="productUrlKey" value="$$createConfigProduct.custom_attributes[url_key]$$"/>
211211
<argument name="productName" value="$$createConfigProduct.name$$"/>
212212
</actionGroup>
213213
<!-- Open Order Index Page -->
214-
<comment userInput="Open Order Index Page" stepKey="OpenOrderIndexPage"/>
214+
<comment userInput="Open Order Index Page" stepKey="openOrderIndexPageComemnt"/>
215215
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="goToOrders"/>
216216
<waitForPageLoad stepKey="waitForPageLoad5"/>
217217
<!-- Filter order using orderId -->
218-
<comment userInput="Filter order using orderId" stepKey="FilterOrderUsingOrderId"/>
218+
<comment userInput="Filter order using orderId" stepKey="filterOrderUsingOrderIdComment"/>
219219
<actionGroup ref="filterOrderGridById" stepKey="filterOrderGridById">
220220
<argument name="orderId" value="$orderId"/>
221221
</actionGroup>
222222
<see selector="{{AdminOrdersGridSection.firstRow}}" userInput="$orderId" stepKey="seeOrderIdInGrid"/>
223223
<see selector="{{AdminOrdersGridSection.firstRow}}" userInput="Canceled" stepKey="seeStatusInGrid"/>
224224
<!-- Log in to Storefront as Customer -->
225-
<comment userInput="Log in to Storefront as Customer" stepKey="LogInAsCustomer"/>
225+
<comment userInput="Log in to Storefront as Customer" stepKey="logInAsCustomerComment"/>
226226
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="signUp">
227227
<argument name="Customer" value="$$simpleCustomer$$"/>
228228
</actionGroup>
229229
<!-- Assert Order status in frontend order grid -->
230-
<comment userInput="Assert Order status in frontend order grid " stepKey="AssertOrderStatusInFrontend"/>
230+
<comment userInput="Assert Order status in frontend order grid " stepKey="assertOrderStatusInFrontendComment"/>
231231
<click selector="{{StorefrontCustomerSidebarSection.sidebarCurrentTab('My Orders')}}" stepKey="clickOnMyOrders"/>
232232
<waitForPageLoad stepKey="waitForOrderDetailsToLoad"/>
233233
<seeElement selector="{{StorefrontCustomerOrderViewSection.orderStatusInGrid('$orderId', 'Canceled')}}" stepKey="seeOrderStatusInGrid"/>

0 commit comments

Comments
 (0)