|
| 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="CheckNotVisibleProductInMinicartTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Checkout"/> |
| 14 | + <stories value="MAGETWO-96422: Hidden Products are absent in Storefront Mini-Cart" /> |
| 15 | + <title value="Not visible individually product in mini-shopping cart."/> |
| 16 | + <description value="To be sure that product in mini-shopping cart remains visible after admin makes it not visible individually"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <group value="checkout"/> |
| 19 | + </annotations> |
| 20 | + |
| 21 | + <!--Create simple product1 and simple product2--> |
| 22 | + <createData entity="SimpleTwo" stepKey="createSimpleProduct1"/> |
| 23 | + <createData entity="SimpleTwo" stepKey="createSimpleProduct2"/> |
| 24 | + |
| 25 | + <!--Go to simple product1 page--> |
| 26 | + <amOnPage url="$$createSimpleProduct1.custom_attributes[url_key]$$.html" stepKey="navigateToSimpleProductPage1"/> |
| 27 | + <waitForPageLoad stepKey="waitForCatalogPageLoad"/> |
| 28 | + |
| 29 | + <!--Add simple product1 to Shopping Cart--> |
| 30 | + <actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProductPage1"> |
| 31 | + <argument name="productName" value="$$createSimpleProduct1.name$$"/> |
| 32 | + </actionGroup> |
| 33 | + |
| 34 | + <!--Check simple product1 in minicart--> |
| 35 | + <comment userInput="Check simple product 1 in minicart" stepKey="commentCheckSimpleProduct1InMinicart" after="addToCartFromStorefrontProductPage1"/> |
| 36 | + <actionGroup ref="assertOneProductNameInMiniCart" stepKey="assertProduct1NameInMiniCart"> |
| 37 | + <argument name="productName" value="$$createSimpleProduct1.name$$"/> |
| 38 | + </actionGroup> |
| 39 | + |
| 40 | + <!--Make simple product1 not visible individually--> |
| 41 | + <updateData entity="SetProductVisibilityHidden" createDataKey="createSimpleProduct1" stepKey="updateSimpleProduct1"> |
| 42 | + <requiredEntity createDataKey="createSimpleProduct1"/> |
| 43 | + </updateData> |
| 44 | + |
| 45 | + <!--Go to simple product2 page--> |
| 46 | + <amOnPage url="$$createSimpleProduct2.custom_attributes[url_key]$$.html" stepKey="navigateToSimpleProductPage2"/> |
| 47 | + <waitForPageLoad stepKey="waitForCatalogPageLoad2"/> |
| 48 | + |
| 49 | + <!--Add simple product2 to Shopping Cart for updating cart items--> |
| 50 | + <actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProductPage2"> |
| 51 | + <argument name="productName" value="$$createSimpleProduct2.name$$"/> |
| 52 | + </actionGroup> |
| 53 | + |
| 54 | + <!--Check simple product1 in minicart--> |
| 55 | + <comment userInput="Check hidden simple product 1 in minicart" stepKey="commentCheckHiddenSimpleProduct1InMinicart" after="addToCartFromStorefrontProductPage2"/> |
| 56 | + <actionGroup ref="assertOneProductNameInMiniCart" stepKey="assertHiddenProduct1NameInMiniCart"> |
| 57 | + <argument name="productName" value="$$createSimpleProduct1.name$$"/> |
| 58 | + </actionGroup> |
| 59 | + |
| 60 | + <!--Check simple product2 in minicart--> |
| 61 | + <comment userInput="Check hidden simple product 2 in minicart" stepKey="commentCheckSimpleProduct2InMinicart" after="addToCartFromStorefrontProductPage2"/> |
| 62 | + <actionGroup ref="assertOneProductNameInMiniCart" stepKey="assertProduct2NameInMiniCart"> |
| 63 | + <argument name="productName" value="$$createSimpleProduct2.name$$"/> |
| 64 | + </actionGroup> |
| 65 | + |
| 66 | + <!--Delete simple product1 and simple product2--> |
| 67 | + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteProduct1"/> |
| 68 | + <deleteData createDataKey="createSimpleProduct2" stepKey="deleteProduct2"/> |
| 69 | + </test> |
| 70 | +</tests> |
0 commit comments