Skip to content

Commit 81bf488

Browse files
committed
MC-6338: TinyMCE4 is applied as new WYSIWYG on Product Attribute
1 parent 3aa6190 commit 81bf488

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@
192192
</section>
193193
<section name="ProductDescriptionWysiwygSection">
194194
<element name="EditArea" type="text" selector="#editorproduct_form_description .mce-edit-area"/>
195+
<element name="attributeEditArea" type="textarea" selector="#product_form_{{attributeCode}}" parameterized="true" timeout="30"/>
195196
</section>
196197
<section name="ProductShortDescriptionWysiwygSection">
197198
<element name="EditArea" type="text" selector="#editorproduct_form_short_description .mce-edit-area"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateTextEditorProductAttributeTest.xml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<description value="Create text editor product attribute with TinyMCE4 enabled"/>
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MC-6338"/>
19-
<group value="Catalog"/>
19+
<group value="catalog"/>
2020
</annotations>
2121
<before>
2222
<!-- Enable WYSIWYG editor -->
@@ -93,27 +93,23 @@
9393
<seeElement selector="{{AdminProductFormSection.attributeLabelByText(productTextEditorAttribute.attribute_code)}}" stepKey="seeAttributeLabelInProductForm"/>
9494

9595
<!-- TinyMCE 4 is displayed in WYSIWYG content area -->
96-
<seeElement selector="{{TinyMCESection.TinyMCE4}}" stepKey="seeTinyMCE4" />
96+
<seeElement selector="{{TinyMCESection.TinyMCE4}}" stepKey="seeTinyMCE4"/>
9797

9898
<!-- Verify toolbar menu -->
9999
<actionGroup ref="VerifyTinyMCEActionGroup" stepKey="verifyToolbarMenu"/>
100100

101-
<!-- Add content into attribute -->
102-
<executeJS function="tinyMCE.get('product_form_{{productTextEditorAttribute.attribute_code}}').setContent('This content from product page');" stepKey="executeJSFillContent"/>
103-
104101
<!-- Click Show/Hide button and see Insert Image button -->
105102
<scrollToTopOfPage stepKey="scrollToTop"/>
106103
<click selector="{{ProductAttributeWYSIWYGSection.showHideBtn(productTextEditorAttribute.attribute_code)}}" stepKey="clickShowHideBtn"/>
107104
<waitForElementVisible selector="{{TinyMCESection.InsertImageBtn}}" stepKey="waitForInsertImageBtn"/>
108105

106+
<!-- Add content into attribute -->
107+
<fillField selector="{{ProductDescriptionWysiwygSection.attributeEditArea(productTextEditorAttribute.attribute_code)}}" userInput="This content from product page" stepKey="setContent"/>
108+
109109
<!-- Fill and save product form -->
110110
<actionGroup ref="fillMainProductForm" stepKey="fillProductForm"/>
111111
<actionGroup ref="saveProductForm" stepKey="saveProductForm"/>
112112

113-
<!--Run full reindex and clear caches -->
114-
<magentoCLI command="cache:flush" stepKey="flushCache"/>
115-
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
116-
117113
<!-- Assert product attribute on Storefront -->
118114
<actionGroup ref="OpenStorefrontProductPageByProductNameActionGroup" stepKey="openProductPage"/>
119115
<actionGroup ref="checkAttributeInMoreInformationTab" stepKey="checkAttributeInMoreInformationTab">

0 commit comments

Comments
 (0)