|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 9 | + <test name="StorefrontAddProductToCartVerifyThatErrorMessageShouldNotDisappearTest"> |
| 10 | + <annotations> |
| 11 | + <title value="Adding a product to cart from product detail page with higher quantity then available when synchronize widget products with backend storage enabled"/> |
| 12 | + <description value="Adding a product to cart from product detail page with higher quantity then available when synchronize widget products with backend storage enabled"/> |
| 13 | + <features value="Module/ Catalog"/> |
| 14 | + <severity value="AVERAGE"/> |
| 15 | + <testCaseId value="AC-1571"/> |
| 16 | + <useCaseId value="ACP2E-23"/> |
| 17 | + <stories value="[Magento Cloud] Error message in PDP disappearing quickly"/> |
| 18 | + <group value="customer"/> |
| 19 | + </annotations> |
| 20 | + |
| 21 | + <before> |
| 22 | + <!-- Set in Stores > Configuration > Catalog > Catalog > > Recently Viewed/Compared Products > Synchronize Widget Products With Backend Storage = "Yes" --> |
| 23 | + <magentoCLI command="config:set {{EnableSynchronizeWidgetProductsWithBackendStorage.path}} {{EnableSynchronizeWidgetProductsWithBackendStorage.value}}" stepKey="setEnableSynchronizeWidgetProductsWithBackendStorage"/> |
| 24 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 25 | + <createData entity="_defaultProduct" stepKey="createSimpleProduct"> |
| 26 | + <requiredEntity createDataKey="createCategory"/> |
| 27 | + </createData> |
| 28 | + <magentoCron stepKey="runCronReindex" groups="index"/> |
| 29 | + </before> |
| 30 | + <after> |
| 31 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> |
| 32 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 33 | + <magentoCLI command="config:set {{DisableSynchronizeWidgetProductsWithBackendStorage.path}} {{DisableSynchronizeWidgetProductsWithBackendStorage.value}}" stepKey="setDisableSynchronizeWidgetProductsWithBackendStorage"/> |
| 34 | + </after> |
| 35 | + |
| 36 | + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProductPage"> |
| 37 | + <argument name="product" value="$$createSimpleProduct$$"/> |
| 38 | + </actionGroup> |
| 39 | + |
| 40 | + <fillField selector="{{StorefrontProductInfoMainSection.qty}}" userInput="1001" stepKey="fillQuantity"/> |
| 41 | + |
| 42 | + <actionGroup ref="StorefrontProductPageAddSimpleProductToCartActionGroup" stepKey="addProductToCart"/> |
| 43 | + <!-- Check that error remains --> |
| 44 | + <see userInput="The requested qty is not available" stepKey="assertProductErrorRemains"/> |
| 45 | + </test> |
| 46 | +</tests> |
0 commit comments