Skip to content

Commit eec0387

Browse files
author
avattam
committed
MC-5518: Text Attribute
- added functional test to cover the bug fix
1 parent 4c46925 commit eec0387

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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="StorefrontDisplayAllCharactersOnTextSwatchTest" extends="StorefrontFilterByTextSwatchTest">
12+
<annotations>
13+
<features value="Swatches"/>
14+
<stories value="Create/configure swatches and check the display characters length"/>
15+
<title value="Admin can create product attribute with text swatch and view the display characters in full"/>
16+
<description value="Admin can create product attribute with text swatch and check the display characters in full"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-5518"/>
19+
<group value="Swatches"/>
20+
</annotations>
21+
22+
<!-- Create swatch #3 -->
23+
<click selector="{{AdminManageSwatchSection.addSwatchText}}" stepKey="clickAddSwatch2" after="fillDescription1"/>
24+
<fillField selector="{{AdminManageSwatchSection.swatchTextByIndex('2')}}" userInput="1234567890123456789012341234" stepKey="fillSwatch2" after="clickAddSwatch2"/>
25+
<fillField selector="{{AdminManageSwatchSection.swatchAdminDescriptionByIndex('2')}}" userInput="1234567890123456789012341234GreenD" stepKey="fillDescription2" after="fillSwatch2"/>
26+
27+
<click selector="{{AdminManageSwatchSection.addSwatchText}}" stepKey="clickAddSwatch3" after="fillDescription2"/>
28+
<fillField selector="{{AdminManageSwatchSection.swatchTextByIndex('3')}}" userInput="123456789012345678901" stepKey="fillSwatch3" after="clickAddSwatch3"/>
29+
<fillField selector="{{AdminManageSwatchSection.swatchAdminDescriptionByIndex('3')}}" userInput="123456789012345678901BrownD" stepKey="fillDescription3" after="fillSwatch3"/>
30+
31+
<see selector="{{StorefrontCategorySidebarSection.attributeNthOption(ProductAttributeFrontendLabel.label, '3')}}" userInput="123456789012345678901" stepKey="seeGreen" after="seeBlue"/>
32+
33+
<see selector="{{StorefrontCategorySidebarSection.attributeNthOption(ProductAttributeFrontendLabel.label, '4')}}" userInput="123456789012345678901" stepKey="seeBrown" after="seeGreen"/>
34+
35+
<!-- Go to the category page -->
36+
<amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage2"/>
37+
<waitForPageLoad stepKey="waitForCategoryPage2"/>
38+
39+
<!-- Verify swatch2 is present and shown in full display text characters on storefront in the layered navigation -->
40+
<see selector="{{StorefrontCategorySidebarSection.layeredFilterBlock}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="seeAttributeInLayeredNav2"/>
41+
<click selector="{{StorefrontCategorySidebarSection.filterOptionTitle(ProductAttributeFrontendLabel.label)}}" stepKey="expandAttribute2"/>
42+
<click selector="{{StorefrontCategorySidebarSection.attributeNthOption(ProductAttributeFrontendLabel.label, '2')}}" stepKey="filterBySwatch2"/>
43+
44+
<!-- Go to the category page -->
45+
<amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage3"/>
46+
<waitForPageLoad stepKey="waitForCategoryPage3"/>
47+
48+
<!-- Verify swatch3 is present and shown in full display text characters on storefront in the layered navigation -->
49+
<see selector="{{StorefrontCategorySidebarSection.layeredFilterBlock}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="seeAttributeInLayeredNav3"/>
50+
<click selector="{{StorefrontCategorySidebarSection.filterOptionTitle(ProductAttributeFrontendLabel.label)}}" stepKey="expandAttribute3"/>
51+
<click selector="{{StorefrontCategorySidebarSection.attributeNthOption(ProductAttributeFrontendLabel.label, '3')}}" stepKey="filterBySwatch3"/>
52+
53+
54+
<!-- Go to the category page -->
55+
<amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage4"/>
56+
<waitForPageLoad stepKey="waitForCategoryPage4"/>
57+
58+
<!-- Verify swatch4 is present and shown in full display text characters on storefront in the layered navigation -->
59+
<see selector="{{StorefrontCategorySidebarSection.layeredFilterBlock}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="seeAttributeInLayeredNav4"/>
60+
<click selector="{{StorefrontCategorySidebarSection.filterOptionTitle(ProductAttributeFrontendLabel.label)}}" stepKey="expandAttribute4"/>
61+
<click selector="{{StorefrontCategorySidebarSection.attributeNthOption(ProductAttributeFrontendLabel.label, '4')}}" stepKey="filterBySwatch4"/>
62+
63+
<!-- Deletes the created configurable product-->
64+
<actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteConfigurableProduct">
65+
<argument name="product" value="BaseConfigurableProduct"/>
66+
</actionGroup>
67+
68+
</test>
69+
70+
</tests>

0 commit comments

Comments
 (0)