Skip to content

Commit 01419cc

Browse files
committed
MAGETWO-64282: Out of stock associated products to configurable are not full page cache cleaned
- Update automation test
1 parent ee75a79 commit 01419cc

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

app/code/Magento/CatalogInventory/Test/Mftf/Test/AssociatedProductToConfigurableOutOfStockTest.xml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,19 @@
2626
<createData entity="ApiConfigurableProduct" stepKey="createConfigProduct">
2727
<requiredEntity createDataKey="simplecategory"/>
2828
</createData>
29+
2930
<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/>
3031
<createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1">
3132
<requiredEntity createDataKey="createConfigProductAttribute"/>
3233
</createData>
3334
<createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2">
3435
<requiredEntity createDataKey="createConfigProductAttribute"/>
3536
</createData>
37+
3638
<createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet">
3739
<requiredEntity createDataKey="createConfigProductAttribute"/>
3840
</createData>
41+
3942
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1">
4043
<requiredEntity createDataKey="createConfigProductAttribute"/>
4144
</getData>
@@ -53,12 +56,14 @@
5356
<requiredEntity createDataKey="createConfigProductAttribute"/>
5457
<requiredEntity createDataKey="getConfigAttributeOption2"/>
5558
</createData>
59+
5660
<createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption">
5761
<requiredEntity createDataKey="createConfigProduct"/>
5862
<requiredEntity createDataKey="createConfigProductAttribute"/>
5963
<requiredEntity createDataKey="getConfigAttributeOption1"/>
6064
<requiredEntity createDataKey="getConfigAttributeOption2"/>
6165
</createData>
66+
6267
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1">
6368
<requiredEntity createDataKey="createConfigProduct"/>
6469
<requiredEntity createDataKey="createConfigChildProduct1"/>
@@ -87,11 +92,8 @@
8792
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="signUpNewUser">
8893
<argument name="Customer" value="$$createSimpleUsCustomer$$"/>
8994
</actionGroup>
90-
95+
<amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage"/>
9196
<!-- Go to configurable product page -->
92-
<click userInput="$$simplecategory.name$$" stepKey="clickOnCategoryName"/>
93-
<waitForPageLoad stepKey="waitForCategoryPageLoad"/>
94-
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createConfigProduct.name$$)}}" stepKey="browseClickCategoryConfigProductView" after="clickOnCategoryName"/>
9597
<waitForPageLoad stepKey="waitForProductPageLoad"/>
9698

9799
<!-- Order product with single quantity -->
@@ -103,19 +105,34 @@
103105
<waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" stepKey="waitForNextButton"/>
104106
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext"/>
105107
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/>
106-
108+
<waitForPageLoad stepKey="waitForOrderSuccessPage1"/>
109+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
107110
<actionGroup ref="StorefrontSignOutActionGroup" stepKey="StorefrontSignOutActionGroup"/>
111+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/>
108112

109-
<amOnPage url="{{StorefrontCategoryPage.url($$simplecategory.name$$)}}" stepKey="onCategoryPage"/>
110-
<waitForPageLoad stepKey="waitForCategoryLoad"/>
113+
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="onOrdersPage"/>
114+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask3"/>
115+
<fillField selector="{{AdminOrdersGridSection.search}}" userInput="{$grabOrderNumber}" stepKey="searchOrderNum"/>
116+
<click selector="{{AdminOrdersGridSection.submitSearch}}" stepKey="submitSearch"/>
117+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask4"/>
111118

119+
<click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/>
120+
<click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoice"/>
121+
<click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="clickSubmitInvoice"/>
122+
<see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="seeSuccessMessage"/>
123+
<click selector="{{AdminOrderDetailsMainActionsSection.ship}}" stepKey="clickShip"/>
124+
<waitForLoadingMaskToDisappear stepKey="waitForShipLoadingMask"/>
125+
<click selector="{{AdminShipmentMainActionsSection.submitShipment}}" stepKey="submitShipment"/>
126+
<waitForPageLoad stepKey="waitShipmentCreated"/>
127+
<actionGroup ref="logout" stepKey="logout"/>
112128
<magentoCLI stepKey="runCron" command="cron:run --group='index'"/>
113129

114130
<!-- Wait till cron job runs for schedule updates -->
115131
<wait time="60" stepKey="waitForUpdateStarts"/>
116132

117133
<!-- Assert that product with single quantity is not available for order -->
118-
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createConfigProduct.name$$)}}" stepKey="browseClickCategoryConfigProductView2" />
134+
<amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage2"/>
135+
<waitForPageLoad stepKey="waitForProductPageLoad2"/>
119136
<dontSee userInput="$$createConfigProductAttributeOption1.option[store_labels][1][label]$$" selector="{{StorefrontProductInfoMainSection.optionByAttributeId($$createConfigProductAttribute.attribute_id$$)}}" stepKey="assertOptionNotAvailable" />
120137
</test>
121138
</tests>

0 commit comments

Comments
 (0)