Skip to content

Commit ef5320f

Browse files
Manjusha.SManjusha.S
authored andcommitted
Merge branch 'AC-4610' into functional-testing-automation
2 parents b64821c + 776b754 commit ef5320f

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed

app/code/Magento/Bundle/Test/Mftf/Section/StorefrontBundledSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,6 @@
5050
<element name="validationMessageBox" type="block" selector="#validation-message-box"/>
5151
<element name="dropDownQuantityValidation" type="input" selector="//span[contains(text(), '{{productName}}')]/../..//input/following-sibling::div[@class='mage-error']" parameterized="true"/>
5252
<element name="radioButtonQuantityValidation" type="input" selector="//label//span[contains(text(), '{{productName}}')]/../..//div[@class='control']//div[@class='field qty qty-holder']//input/following-sibling::div[@class='mage-error']" parameterized="true"/>
53+
<element name="dropDrownOptionQuantity" type="input" selector="//span[contains(text(), '{{productName}}')]/../..//input/following-sibling::div//div//div//input" parameterized="true"/>
5354
</section>
5455
</sections>
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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

Comments
 (0)