Skip to content

Commit cfdd622

Browse files
ManjushaManjusha
authored andcommitted
ACQE-4784 : Admin checks if only one Quantity Configuration is displayed for Bundle product while creating an order
1 parent db21d29 commit cfdd622

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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="AdminChecksIfOnlyOneQuantityConfigurationIsDisplayedForBundleProductWhileCreatingAnOrderTest">
11+
<annotations>
12+
<features value="Bundle"/>
13+
<stories value="Create Admin checks if only one Quantity Configuration is displayed for Bundle product while creating an order"/>
14+
<title value="Admin checks if only one Quantity Configuration is displayed for Bundle product while creating an order"/>
15+
<description value="create Admin checks if only one Quantity Configuration is displayed for Bundle product "/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="AC-5237"/>
18+
</annotations>
19+
<before>
20+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
21+
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
22+
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
23+
<createData entity="Simple_US_Customer_NY" stepKey="createCustomer"/>
24+
</before>
25+
<after>
26+
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
27+
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
28+
<!--Delete customer-->
29+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
30+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
31+
</after>
32+
<!-- Go to bundle product creation page -->
33+
<amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage"/>
34+
<waitForPageLoad stepKey="waitForBundleProductCreationPage"/>
35+
<!-- Entering Bundle Product name,SKU, category, url key -->
36+
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillProductName"/>
37+
<!-- Create bundle product options -->
38+
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/>
39+
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption3"/>
40+
<waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleOptions"/>
41+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillOptionTitle"/>
42+
<selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectInputType"/>
43+
<waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProductsToBundle"/>
44+
<click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProductsToOption"/>
45+
<waitForPageLoad stepKey="waitForPageLoadAfterBundleProducts"/>
46+
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions">
47+
<argument name="product" value="$$simpleProduct1$$"/>
48+
</actionGroup>
49+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow"/>
50+
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions2">
51+
<argument name="product" value="$$simpleProduct2$$"/>
52+
</actionGroup>
53+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow2"/>
54+
<click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts"/>
55+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty1"/>
56+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty2"/>
57+
<!--Save the product-->
58+
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveButton"/>
59+
<!--Create new order-->
60+
<actionGroup ref="AdminNavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderWithExistingCustomer">
61+
<argument name="customer" value="Simple_US_Customer_NY"/>
62+
</actionGroup>
63+
<click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
64+
<click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearch"/>
65+
<scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/>
66+
<checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectProduct"/>
67+
<waitForPageLoad stepKey="waitForProductLoad"/>
68+
</test>
69+
</tests>

0 commit comments

Comments
 (0)