|
| 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 | +<!-- Test XML Example --> |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="AdminBundleProductPriceCalculationOnProductPageTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Bundle"/> |
| 13 | + <stories value="Create bundle product in Admin and calculate price on product page"/> |
| 14 | + <title value="Bundle product price calculation on product page"/> |
| 15 | + <description value="create bundle product calculate and Verify price on product page"/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="AC-4610"/> |
| 18 | + </annotations> |
| 19 | + <before> |
| 20 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 21 | + <createData entity="SimpleSubCategory" stepKey="createCategory"/> |
| 22 | + <createData entity="ImportProductSimple2_Bundle" stepKey="simpleProduct"> |
| 23 | + <field key="price">560</field> |
| 24 | + <requiredEntity createDataKey="createCategory"/> |
| 25 | + </createData> |
| 26 | + </before> |
| 27 | + <after> |
| 28 | + <!-- Delete bundle product --> |
| 29 | + <actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteBundleProduct"> |
| 30 | + <argument name="product" value="BundleProduct"/> |
| 31 | + </actionGroup> |
| 32 | + <!-- deleting category, simple products --> |
| 33 | + <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> |
| 34 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 35 | + <magentoCron groups="index" stepKey="reindex"/> |
| 36 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCache"> |
| 37 | + <argument name="tags" value="full_page"/> |
| 38 | + </actionGroup> |
| 39 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> |
| 40 | + </after> |
| 41 | + <!-- Create Bundle product via Admin --> |
| 42 | + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/> |
| 43 | + <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridColumnsInitial"/> |
| 44 | + <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct"> |
| 45 | + <argument name="product" value="BundleProduct"/> |
| 46 | + </actionGroup> |
| 47 | + <!-- Entering Bundle Product name,SKU, category, url key --> |
| 48 | + <fillField selector="{{AdminProductFormSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillProductName"/> |
| 49 | + <searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[$$createCategory.name$$]" stepKey="fillCategory"/> |
| 50 | + <!-- Add the bundle option to the product --> |
| 51 | + <actionGroup ref="AddBundleOptionWithOneProductActionGroup" stepKey="addBundleOption"> |
| 52 | + <argument name="x" value="0"/> |
| 53 | + <argument name="n" value="1"/> |
| 54 | + <argument name="prodOneSku" value="$$simpleProduct.sku$$"/> |
| 55 | + <argument name="prodTwoSku" value=""/> |
| 56 | + <argument name="optionTitle" value="{{BundleProduct.optionTitle1}}"/> |
| 57 | + <argument name="inputType" value="Drop-down"/> |
| 58 | + </actionGroup> |
| 59 | + <checkOption selector="{{AdminProductFormBundleSection.userDefinedQuantity('0', '0')}}" stepKey="userDefinedQuantity"/> |
| 60 | + <!-- Save the bundle product --> |
| 61 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/> |
| 62 | + <!-- go to product page --> |
| 63 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="GoToProductPage"> |
| 64 | + <argument name="productUrl" value="{{BundleProduct.urlKey}}"/> |
| 65 | + </actionGroup> |
| 66 | + <!-- update quantity and verify price --> |
| 67 | + <click selector="{{StorefrontBundledSection.addToCart}}" stepKey="clickCustomizeAndAddToCart"/> |
| 68 | + <wait stepKey="waitForClickOnCartButton" time="10"/> |
| 69 | + <fillField selector="{{StorefrontBundledSection.dropDrownOptionQuantity('$$simpleProduct.name$$')}}" userInput="3" stepKey="fillQuantity"/> |
| 70 | + <wait stepKey="waitForFillQuantityField" time="10"/> |
| 71 | + <click selector="{{StorefrontBundledSection.addToCartConfigured}}" stepKey="clickAddToCart"/> |
| 72 | + <!-- Storefront: Verify Updated Customization Price --> |
| 73 | + <see userInput="$1,680.00" selector="{{StorefrontBundledSection.bundleProductsPrice}}" stepKey="seeCustomizationPrice"/> |
| 74 | + </test> |
| 75 | +</tests> |
| 76 | + |
0 commit comments