|
| 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="StorefrontValidateMiniCartEmptyAfterClearingSessionTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Customer"/> |
| 14 | + <stories value="Customer data in Local Storage not reset when session file lost"/> |
| 15 | + <title value="Validate minicart is empty when customer session file lost."/> |
| 16 | + <description value="Validate minicart is empty when customer session file lost."/> |
| 17 | + <severity value="AVERAGE"/> |
| 18 | + <testCaseId value="AC-7590"/> |
| 19 | + <useCaseId value="ACP2E-1445"/> |
| 20 | + <group value="customer"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <!-- Create customer --> |
| 24 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 25 | + |
| 26 | + <!-- Create product --> |
| 27 | + <createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> |
| 28 | + </before> |
| 29 | + <after> |
| 30 | + <!-- Delete customer --> |
| 31 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 32 | + |
| 33 | + <!-- Delete product --> |
| 34 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 35 | + </after> |
| 36 | + <!-- Login to Frontend --> |
| 37 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> |
| 38 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 39 | + </actionGroup> |
| 40 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductStorefront"> |
| 41 | + <argument name="productUrl" value="$$createSimpleProduct.custom_attributes[url_key]$$"/> |
| 42 | + </actionGroup> |
| 43 | + <actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/> |
| 44 | + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="deleteDirectory" stepKey="deleteLocalCacheDirectory"> |
| 45 | + <argument name="path">var/session</argument> |
| 46 | + </helper> |
| 47 | + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> |
| 48 | + <argument name="tags" value=""/> |
| 49 | + </actionGroup> |
| 50 | + <actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/> |
| 51 | + <actionGroup ref="StorefrontCheckThatCartIsEmptyActionGroup" stepKey="checkThatCartIsEmpty"/> |
| 52 | + </test> |
| 53 | +</tests> |
0 commit comments