Skip to content

Commit e0ae403

Browse files
committed
MAGETWO-98522: Adding out of stock items to comparison shows success message but fails
- Updated automated test script.
1 parent 5c5ebc0 commit e0ae403

File tree

4 files changed

+11
-60
lines changed

4 files changed

+11
-60
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/AddOutOfStockProductToCompareListTest.xml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,19 @@
2020
</annotations>
2121
<before>
2222
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
23-
<createData entity="DisableDisplayOutOfStock" stepKey="displayOutOfStockNo"/>
23+
<magentoCLI command="config:set cataloginventory/options/show_out_of_stock 0" stepKey="displayOutOfStockNo"/>
2424
<magentoCLI command="cache:flush" stepKey="flushCache"/>
2525
<createData entity="SimpleSubCategory" stepKey="category"/>
2626
<createData entity="SimpleProduct4" stepKey="product">
2727
<requiredEntity createDataKey="category"/>
2828
</createData>
2929
</before>
3030
<after>
31-
<actionGroup ref="setAsDefaultOutOfStockProduct" stepKey="setAsDefaultOutOfStockProduct"/>
31+
<magentoCLI command="config:set cataloginventory/options/show_out_of_stock 0" stepKey="displayOutOfStockNo2"/>
3232
<magentoCLI command="cache:flush" stepKey="flushCache"/>
3333
<deleteData createDataKey="product" stepKey="deleteProduct"/>
3434
<deleteData createDataKey="category" stepKey="deleteCategory"/>
3535
<actionGroup ref="logout" stepKey="logout"/>
36-
3736
</after>
3837
<!--Open product page-->
3938
<comment userInput="Open product page" stepKey="openProdPage"/>
@@ -44,7 +43,7 @@
4443
<dontSeeElement selector="{{StorefrontProductInfoMainSection.productAddToCompare}}" stepKey="dontSeeAddToCompareLink"/>
4544
<!--Turn on 'out on stock' config-->
4645
<comment userInput="Turn on 'out of stock' config" stepKey="onOutOfStockConfig"/>
47-
<createData entity="EnableDisplayOutOfStock" stepKey="displayOutOfStockYes"/>
46+
<magentoCLI command="config:set cataloginventory/options/show_out_of_stock 1" stepKey="displayOutOfStockYes"/>
4847
<!--Clear cache and reindex-->
4948
<comment userInput="Clear cache and reindex" stepKey="cleanCache"/>
5049
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
@@ -66,10 +65,16 @@
6665
<amOnPage url="{{StorefrontProductComparePage.url}}" stepKey="navigateToComparePage"/>
6766
<waitForPageLoad stepKey="waitForStorefrontProductComparePageLoad"/>
6867
<seeElement selector="{{StorefrontProductCompareMainSection.ProductLinkByName($product.name$)}}" stepKey="seeProductInCompareList"/>
69-
<!--Add product to compare list fom Category page-->
70-
<comment userInput="Add product to compare list fom Category page" stepKey="addToCmpFromCategPage"/>
68+
<!--Go to Category page and delete product from comparison list-->
69+
<comment userInput="Go to Category page and delete prduct from comparison list" stepKey="deletProdFromCmpList"/>
7170
<amOnPage url="{{StorefrontCategoryPage.url($$category.name$$)}}" stepKey="onCategoryPage"/>
7271
<waitForPageLoad time="30" stepKey="waitForPageLoad1"/>
72+
<click selector="{{StorefrontComparisonSidebarSection.ClearAll}}" stepKey="clickClearAll"/>
73+
<waitForPageLoad time="30" stepKey="waitForConfirmPageLoad"/>
74+
<click selector="{{AdminDeleteRoleSection.confirm}}" stepKey="confirmProdDelate"/>
75+
<waitForPageLoad time="30" stepKey="waitForConfirmLoad"/>
76+
<!--Add product to compare list from Category page-->
77+
<comment userInput="Add product to compare list fom Category page" stepKey="addToCmpFromCategPage"/>
7378
<moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverOverProduct"/>
7479
<click selector="{{StorefrontProductInfoMainSection.productAddToCompare}}" stepKey="clickAddToCompare"/>
7580
<waitForPageLoad stepKey="waitProdAddingToCmpList"/>

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,4 @@
2626
<selectOption selector="{{InventoryConfigSection.DisplayOutOfStockDropdown}}" userInput="No" stepKey="switchToNo" />
2727
<click selector="{{ContentManagementSection.Save}}" stepKey="clickSaveConfig" />
2828
</actionGroup>
29-
<actionGroup name="setAsDefaultOutOfStockProduct">
30-
<amOnPage url="{{InventoryConfigurationPage.url}}" stepKey="navigateToInventoryConfigurationPage"/>
31-
<waitForPageLoad time="30" stepKey="waitForConfigPageToLoad"/>
32-
<conditionalClick selector="{{InventoryConfigSection.ProductStockOptionsTab}}" dependentSelector="{{InventoryConfigSection.DisplayOutOfStockSystemValue}}" visible="false" stepKey="expandStockOptions"/>
33-
<waitForElementVisible selector="{{InventoryConfigSection.DisplayOutOfStockSystemValue}}" time="30" stepKey="waitForCheckBoxVisible"/>
34-
<checkOption selector="{{InventoryConfigSection.DisplayOutOfStockSystemValue}}" stepKey="uncheckUseSystemValue"/>
35-
<click selector="{{ContentManagementSection.Save}}" stepKey="clickSaveConfig"/>
36-
<waitForPageLoad time="30" stepKey="waitForConfigPageToLoad2"/>
37-
</actionGroup>
3829
</actionGroups>

app/code/Magento/Config/Test/Mftf/Data/InventoryConfigData.xml

Lines changed: 0 additions & 23 deletions
This file was deleted.

app/code/Magento/Config/Test/Mftf/Metadata/inventory_config-meta.xml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)