|
| 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" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="StorefrontSpecialPriceBundleProductInCartTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Bundle"/> |
| 13 | + <stories value="Add bundle product to cart on storefront"/> |
| 14 | + <title value="Customer should not be able to add a Bundle Product to the cart when added a special price for associated products"/> |
| 15 | + <description value="Customer should not be able to add a Bundle Product to the cart when added a special price for associated products"/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="MC-19134"/> |
| 18 | + <useCaseId value="MC-18963"/> |
| 19 | + <group value="bundle"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <!-- Create the Simple product with Special price --> |
| 23 | + <createData entity="SimpleProduct2" stepKey="simpleProduct"/> |
| 24 | + <createData entity="specialProductPrice2" stepKey="specialPriceToSimpleProduct"> |
| 25 | + <requiredEntity createDataKey="simpleProduct"/> |
| 26 | + </createData> |
| 27 | + <!-- Create the bundle product --> |
| 28 | + <createData entity="ApiBundleProduct" stepKey="bundleProduct"/> |
| 29 | + <createData entity="RadioButtonsOption" stepKey="bundleOption"> |
| 30 | + <requiredEntity createDataKey="bundleProduct"/> |
| 31 | + <field key="required">true</field> |
| 32 | + </createData> |
| 33 | + <createData entity="ApiBundleLink" stepKey="linkOptionToProduct"> |
| 34 | + <requiredEntity createDataKey="bundleProduct"/> |
| 35 | + <requiredEntity createDataKey="bundleOption"/> |
| 36 | + <requiredEntity createDataKey="simpleProduct"/> |
| 37 | + </createData> |
| 38 | + <!-- Run reindex stock status --> |
| 39 | + <magentoCLI command="indexer:reindex" arguments="cataloginventory_stock" stepKey="reindex"/> |
| 40 | + </before> |
| 41 | + <after> |
| 42 | + <deleteData createDataKey="bundleProduct" stepKey="deleteBundleProduct"/> |
| 43 | + <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> |
| 44 | + </after> |
| 45 | + <!-- Go to storefront BundleProduct --> |
| 46 | + <amOnPage url="{{StorefrontProductPage.url($$bundleProduct.custom_attributes[url_key]$$)}}" stepKey="goToStorefront"/> |
| 47 | + <actionGroup ref="StorefrontAddBundleProductFromProductToCartActionGroup" stepKey="addProductToCartFirstTime"> |
| 48 | + <argument name="productName" value="$$bundleProduct.name$$"/> |
| 49 | + </actionGroup> |
| 50 | + <actionGroup ref="StorefrontAddBundleProductFromProductToCartActionGroup" stepKey="addProductToCartSecondTime"> |
| 51 | + <argument name="productName" value="$$bundleProduct.name$$"/> |
| 52 | + </actionGroup> |
| 53 | + <actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="openMiniCart"/> |
| 54 | + <actionGroup ref="AssertStorefrontMiniCartSubtotalActionGroup" stepKey="assertSubtotal"> |
| 55 | + <argument name="subtotal" value="$111.10"/> |
| 56 | + </actionGroup> |
| 57 | + </test> |
| 58 | +</tests> |
0 commit comments