Skip to content

Commit 135ad9c

Browse files
committed
ACP2E-64: Bundle Products Special Price Column in Grid should have % sign not currency sign
- Added the MFTF test coverage.
1 parent aba18c7 commit 135ad9c

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminValidateSpecialPricePercentageSymbolInCatalogProductGridTest">
12+
<annotations>
13+
<features value="Bundle"/>
14+
<stories value="Bundle Products Special Price Column in admin Grid should have % sign not currency sign"/>
15+
<title value="Admin to validate the bundle products special price column in grid should display percentage symbol instead of currency sign"/>
16+
<description value="Admin to validate the bundle products special price column in grid should display percentage symbol instead of currency sign"/>
17+
<severity value="AVERAGE"/>
18+
<testCaseId value="AC-1378"/>
19+
<useCaseId value="ACP2E-64"/>
20+
<group value="Bundle"/>
21+
</annotations>
22+
<before>
23+
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
24+
<!--Admin login-->
25+
<actionGroup stepKey="loginToAdminPanel" ref="AdminLoginActionGroup"/>
26+
</before>
27+
<after>
28+
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
29+
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndexPage"/>
30+
<actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteAllProducts"/>
31+
<!--Logging out-->
32+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
33+
</after>
34+
<!--Go to bundle product creation page-->
35+
<amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage"/>
36+
<waitForPageLoad stepKey="waitForBundleProductCreatePageToLoad"/>
37+
<actionGroup ref="AddSpecialPriceToProductActionGroup" stepKey="addSpecialPrice">
38+
<argument name="price" value="{{SimpleProductWithSpecialPrice.special_price}}"/>
39+
</actionGroup>
40+
<!-- Add single bundle item -->
41+
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/>
42+
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption3"/>
43+
<waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleOptions"/>
44+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillOptionTitle"/>
45+
<selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectInputType"/>
46+
<actionGroup ref="AdminClickAddProductToOptionActionGroup" stepKey="clickAddProductsToOption"/>
47+
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions">
48+
<argument name="product" value="$$simpleProduct1$$"/>
49+
</actionGroup>
50+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow"/>
51+
<click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts"/>
52+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty1"/>
53+
54+
<!--Create a bundle product with ancillary data-->
55+
<actionGroup ref="CreateBasicBundleProductActionGroup" stepKey="createBundledProduct">
56+
<argument name="bundleProduct" value="BundleProduct"/>
57+
</actionGroup>
58+
59+
<!--save the product/published by default-->
60+
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/>
61+
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown"/>
62+
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndexPage"/>
63+
64+
<click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="openColumnsDropdownToReset"/>
65+
<click selector="{{AdminProductGridFilterSection.resetGridColumns}}" stepKey="resetProductGridColumns"/>
66+
<click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="closeColumnsDropdownAfterReset"/>
67+
68+
<!--Reload the catalog product page -->
69+
<reloadPage stepKey="reloadCatalogProductPage"/>
70+
<waitForPageLoad stepKey="waitForPageLoaded"/>
71+
72+
<!--Add Special Price column-->
73+
<dontSeeElement selector="{{AdminProductGridSection.columnHeader('Special Price')}}" stepKey="dontSeeSpecialPriceColumn"/>
74+
<click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="openColumnsDropdownSpecialPrice"/>
75+
<checkOption selector="{{AdminProductGridFilterSection.viewColumnOption('Special Price')}}" stepKey="showSpecialPriceColumn"/>
76+
<click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="closeColumnsDropdownSpecialPrice"/>
77+
78+
<actionGroup ref="FilterProductGridBySku2ActionGroup" stepKey="filterBundleProductGridBySku">
79+
<argument name="sku" value="{{BundleProduct.sku}}"/>
80+
</actionGroup>
81+
82+
<seeElement selector="{{AdminProductGridSection.columnHeader('Special Price')}}" stepKey="seeSpecialPriceColumn"/>
83+
<grabTextFrom selector="{{AdminProductGridSection.productGridCell('1', 'Special Price')}}" stepKey="getSpecialPrice"/>
84+
85+
<assertStringContainsString stepKey="assertSpecialPricePercentageSymbol">
86+
<expectedResult type="string">%</expectedResult>
87+
<actualResult type="variable">$getSpecialPrice</actualResult>
88+
</assertStringContainsString>
89+
</test>
90+
</tests>

0 commit comments

Comments
 (0)