|
| 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="SpecialPriceBundleProductInCartTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Bundle"/> |
| 13 | + <stories value="Check that the cart total is correct when the bundle product with special price added to the cart"/> |
| 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 | + <group value="Bundle"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <actionGroup ref="LoginAsAdmin" stepKey="login"/> |
| 22 | + <createData entity="_defaultCategory" stepKey="category"/> |
| 23 | + <!-- Create simple product and add special price --> |
| 24 | + <createData entity="SimpleProductWithSpecialPrice" stepKey="simpleProduct"> |
| 25 | + <requiredEntity createDataKey="category"/> |
| 26 | + </createData> |
| 27 | + <amOnPage url="{{AdminProductEditPage.url($simpleProduct.id$)}}" stepKey="goToAdminProductPage"/> |
| 28 | + <waitForPageLoad stepKey="waitForAdminProductPage"/> |
| 29 | + <actionGroup ref="AddSpecialPriceToProductActionGroup" stepKey="addSpecialPrice"> |
| 30 | + <argument name="price" value="{{SimpleProductWithSpecialPrice.special_price}}"/> |
| 31 | + </actionGroup> |
| 32 | + <actionGroup ref="saveProductForm" stepKey="saveSimpleProduct"/> |
| 33 | + </before> |
| 34 | + <after> |
| 35 | + <!-- Delete the bundled product --> |
| 36 | + <actionGroup stepKey="deleteBundle" ref="deleteProductUsingProductGrid"> |
| 37 | + <argument name="product" value="BundleProduct"/> |
| 38 | + </actionGroup> |
| 39 | + <actionGroup ref="AdminClearFiltersActionGroup" stepKey="ClearFiltersAfter"/> |
| 40 | + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="logout"/> |
| 41 | + <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> |
| 42 | + <deleteData createDataKey="category" stepKey="deleteCategory"/> |
| 43 | + </after> |
| 44 | + <!--Go to bundle product creation page--> |
| 45 | + <amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage"/> |
| 46 | + <waitForPageLoad stepKey="waitForBundleProductCreatePageToLoad"/> |
| 47 | + <actionGroup ref="fillMainBundleProductForm" stepKey="fillMainFieldsForBundle"/> |
| 48 | + <!-- Add Option, a "Radio Buttons" type option --> |
| 49 | + <actionGroup ref="addBundleOptionWithOneProduct" stepKey="addBundleOptions"> |
| 50 | + <argument name="x" value="0"/> |
| 51 | + <argument name="n" value="1"/> |
| 52 | + <argument name="prodOneSku" value="$$simpleProduct.sku$$"/> |
| 53 | + <argument name="prodTwoSku" value=""/> |
| 54 | + <argument name="optionTitle" value="Option"/> |
| 55 | + <argument name="inputType" value="radio"/> |
| 56 | + </actionGroup> |
| 57 | + <checkOption selector="{{AdminProductFormBundleSection.userDefinedQuantity('0', '0')}}" stepKey="userDefinedQuantitiyOptionProduct"/> |
| 58 | + <actionGroup ref="saveProductForm" stepKey="saveBundleProduct"/> |
| 59 | + <!-- Go to storefront BundleProduct --> |
| 60 | + <amOnPage url="{{BundleProduct.sku}}.html" stepKey="goToStorefront"/> |
| 61 | + <waitForPageLoad stepKey="waitForStorefront"/> |
| 62 | + <actionGroup ref="StorefrontAddBundleProductFromProductToCartActionGroup" stepKey="addProductToCartFirstTime"> |
| 63 | + <argument name="productName" value="{{BundleProduct.name}}"/> |
| 64 | + </actionGroup> |
| 65 | + <actionGroup ref="StorefrontAddBundleProductFromProductToCartActionGroup" stepKey="addProductToCartSecondTime"> |
| 66 | + <argument name="productName" value="{{BundleProduct.name}}"/> |
| 67 | + </actionGroup> |
| 68 | + <click stepKey="openMiniCart" selector="{{StorefrontMinicartSection.showCart}}"/> |
| 69 | + <waitForPageLoad stepKey="waitForMiniCart"/> |
| 70 | + <see stepKey="seeCartSubtotal" userInput="$180.00"/> |
| 71 | + </test> |
| 72 | +</tests> |
0 commit comments