|
| 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="StorefrontAssertFixedCartDiscountAmountForBundleProductTest"> |
| 11 | + <annotations> |
| 12 | + <features value="SalesRule"/> |
| 13 | + <stories value="Fixed Amount Cart Price Rule"/> |
| 14 | + <title value="Checking Fixed Amount Cart Price Rule is correctly applied to bundle products"/> |
| 15 | + <description value="Checking Fixed Amount Cart Price Rule is correctly applied to bundle products"/> |
| 16 | + <severity value="AVERAGE"/> |
| 17 | + <group value="SalesRule"/> |
| 18 | + </annotations> |
| 19 | + <before> |
| 20 | + <createData entity="SalesRuleNoCouponWithFixedDiscountWholeCart" stepKey="createSalesRule"/> |
| 21 | + <actionGroup ref="AdminCreateApiDynamicBundleProductAllOptionTypesActionGroup" stepKey="createBundleProduct"/> |
| 22 | + </before> |
| 23 | + <after> |
| 24 | + <deleteData createDataKey="createSalesRule" stepKey="deleteSalesRule"/> |
| 25 | + <deleteData createDataKey="createBundleProductCreateBundleProduct" stepKey="deleteBundleProduct"/> |
| 26 | + <deleteData createDataKey="simpleProduct1CreateBundleProduct" stepKey="deleteSimpleProduct1"/> |
| 27 | + </after> |
| 28 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> |
| 29 | + <argument name="productUrl" value="$$createBundleProductCreateBundleProduct.custom_attributes[url_key]$$"/> |
| 30 | + </actionGroup> |
| 31 | + <click selector="{{StorefrontBundledSection.addToCart}}" stepKey="clickCustomize"/> |
| 32 | + <selectOption selector="{{StorefrontBundledSection.dropDownOptionOneProducts('Drop-down Option')}}" userInput="$$simpleProduct2CreateBundleProduct.sku$$ +$$$simpleProduct2CreateBundleProduct.price$$.00" stepKey="selectOption0Product1"/> |
| 33 | + <seeOptionIsSelected selector="{{StorefrontBundledSection.dropDownOptionOneProducts('Drop-down Option')}}" userInput="$$simpleProduct2CreateBundleProduct.sku$$ +$$$simpleProduct2CreateBundleProduct.price$$.00" stepKey="checkOption0Product1"/> |
| 34 | + <checkOption selector="{{StorefrontBundledSection.radioButtonOptionTwoProducts('Radio Buttons Option', '1')}}" stepKey="selectOption1Product0"/> |
| 35 | + <seeCheckboxIsChecked selector="{{StorefrontBundledSection.radioButtonOptionTwoProducts('Radio Buttons Option', '1')}}" stepKey="checkOption1Product0"/> |
| 36 | + <checkOption selector="{{StorefrontBundledSection.checkboxOptionThreeProducts('Checkbox Option', '1')}}" stepKey="selectOption2Product0"/> |
| 37 | + <seeCheckboxIsChecked selector="{{StorefrontBundledSection.checkboxOptionThreeProducts('Checkbox Option', '1')}}" stepKey="checkOption2Product0"/> |
| 38 | + <checkOption selector="{{StorefrontBundledSection.checkboxOptionThreeProducts('Checkbox Option', '2')}}" stepKey="selectOption2Product1"/> |
| 39 | + <seeCheckboxIsChecked selector="{{StorefrontBundledSection.checkboxOptionThreeProducts('Checkbox Option', '1')}}" stepKey="checkOption2Product1"/> |
| 40 | + <actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityAndAddToTheCart"> |
| 41 | + <argument name="quantity" value="1"/> |
| 42 | + </actionGroup> |
| 43 | + <actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="openShoppingCartPage"/> |
| 44 | + <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssert" after="openShoppingCartPage"> |
| 45 | + <argument name="subtotal" value="60.00"/> |
| 46 | + <argument name="shipping" value="5.00"/> |
| 47 | + <argument name="shippingMethod" value="Flat Rate - Fixed"/> |
| 48 | + <argument name="total" value="15.00"/> |
| 49 | + </actionGroup> |
| 50 | + </test> |
| 51 | +</tests> |
0 commit comments