Skip to content

Commit 51013a1

Browse files
author
Joan He
committed
Merge remote-tracking branch 'trigger/MC-5518-Text' into BugFixPR
2 parents 203709d + 217b128 commit 51013a1

File tree

2 files changed

+69
-2
lines changed

2 files changed

+69
-2
lines changed
Lines changed: 69 additions & 0 deletions
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+
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="AVERAGE"/>
18+
<testCaseId value="MC-5975"/>
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+
<!-- Create swatch #4 -->
28+
<click selector="{{AdminManageSwatchSection.addSwatchText}}" stepKey="clickAddSwatch3" after="fillDescription2"/>
29+
<fillField selector="{{AdminManageSwatchSection.swatchTextByIndex('3')}}" userInput="123456789012345678901" stepKey="fillSwatch3" after="clickAddSwatch3"/>
30+
<fillField selector="{{AdminManageSwatchSection.swatchAdminDescriptionByIndex('3')}}" userInput="123456789012345678901BrownD" stepKey="fillDescription3" after="fillSwatch3"/>
31+
32+
<see selector="{{StorefrontCategorySidebarSection.attributeNthOption(ProductAttributeFrontendLabel.label, '3')}}" userInput="123456789012345678901" stepKey="seeGreen" after="seeBlue"/>
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+
<!-- Go to the category page -->
54+
<amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage4"/>
55+
<waitForPageLoad stepKey="waitForCategoryPage4"/>
56+
57+
<!-- Verify swatch4 is present and shown in full display text characters on storefront in the layered navigation -->
58+
<see selector="{{StorefrontCategorySidebarSection.layeredFilterBlock}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="seeAttributeInLayeredNav4"/>
59+
<click selector="{{StorefrontCategorySidebarSection.filterOptionTitle(ProductAttributeFrontendLabel.label)}}" stepKey="expandAttribute4"/>
60+
<click selector="{{StorefrontCategorySidebarSection.attributeNthOption(ProductAttributeFrontendLabel.label, '4')}}" stepKey="filterBySwatch4"/>
61+
62+
<!-- Deletes the created configurable product-->
63+
<actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteConfigurableProduct">
64+
<argument name="product" value="BaseConfigurableProduct"/>
65+
</actionGroup>
66+
67+
</test>
68+
69+
</tests>

app/design/frontend/Magento/blank/Magento_Swatches/web/css/source/_module.less

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@
214214
.lib-css(color, @swatch-option-tooltip__color);
215215
display: none;
216216
max-height: 100%;
217-
max-width: 140px;
218217
min-height: 20px;
219218
min-width: 20px;
220219
padding: @indent__xs;
@@ -279,7 +278,6 @@
279278
.lib-css(color, @swatch-option-tooltip-title__color);
280279
display: block;
281280
max-height: 200px;
282-
max-width: 140px;
283281
min-height: 20px;
284282
overflow: hidden;
285283
text-align: center;

0 commit comments

Comments
 (0)