Skip to content

Commit 12b09cb

Browse files
committed
AC-233: Refactor core MFTF TinyMCE ActionGroup
1 parent 97096f9 commit 12b09cb

File tree

7 files changed

+12
-10
lines changed

7 files changed

+12
-10
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<features value="Catalog"/>
1414
<stories value="Create product Attribute"/>
1515
<title value="Admin create text editor product attribute test"/>
16-
<description value="Create text editor product attribute with TinyMCE4 enabled"/>
16+
<description value="Create text editor product attribute with TinyMCE enabled"/>
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MC-6338"/>
1919
<group value="catalog"/>
@@ -23,7 +23,9 @@
2323
<magentoCLI command="config:set {{EnableWYSIWYG.path}} {{EnableWYSIWYG.value}}" stepKey="enableWYSIWYG"/>
2424

2525
<!-- Enable TinyMCE 4 -->
26-
<magentoCLI command="config:set {{EnableTinyMCE4.path}} {{EnableTinyMCE4.value}}" stepKey="enableTinyMCE4"/>
26+
<actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="switchToTinyMCE" >
27+
<argument name="TinyMCEValue" value="{{TinyMCE.value}}"/>
28+
</actionGroup>
2729

2830
<!-- Login as admin -->
2931
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<click selector="{{AdminProductFormSection.contentTab}}" stepKey="clickContentTab"/>
3333
<waitForElementVisible selector="{{CatalogWYSIWYGSection.TinyMCE4}}" stepKey="waitForTinyMCE4" />
3434
<seeElement selector="{{CatalogWYSIWYGSection.ShowHideBtn}}" stepKey="seeShowHideBtn" />
35-
<actionGroup ref="VerifyTinyMCEActionGroup" stepKey="verifyTinyMCE4"/>
35+
<actionGroup ref="VerifyTinyMCEActionGroup" stepKey="verifyTinyMCE"/>
3636
<executeJS function="tinyMCE.get('category_form_description').setContent('Hello World!');" stepKey="executeJSFillContent"/>
3737
<click selector="{{CatalogWYSIWYGSection.ShowHideBtn}}" stepKey="clickShowHideBtn" />
3838
<waitForElementVisible selector="{{TinyMCESection.InsertImageBtn}}" stepKey="waitForInsertImage" />

app/code/Magento/Cms/Test/Mftf/ActionGroup/ClearWidgetsFromCMSContentActionGroup.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
<waitForElementNotVisible selector="{{CmsWYSIWYGSection.CheckIfTabExpand}}" stepKey="waitForTabExpand"/>
2020
<executeJS function="jQuery('[id=\'cms_page_form_content_ifr\']').attr('name', 'preview-iframe')" stepKey="setPreviewFrameName"/>
2121
<switchToIFrame selector="preview-iframe" stepKey="switchToIframe"/>
22-
<fillField selector="{{TinyMCESection.EditorContent}}" userInput="Hello TinyMCE4!" stepKey="clearWidgets"/>
22+
<fillField selector="{{TinyMCESection.EditorContent}}" userInput="Hello TinyMCE!" stepKey="clearWidgets"/>
2323
<switchToIFrame stepKey="switchOutFromIframe"/>
24-
<executeJS function="tinyMCE.activeEditor.setContent('Hello TinyMCE4!');" stepKey="executeJSFillContent1"/>
24+
<executeJS function="tinyMCE.activeEditor.setContent('Hello TinyMCE!');" stepKey="executeJSFillContent1"/>
2525
<click selector="{{InsertWidgetSection.save}}" stepKey="saveWidget"/>
2626
<waitForPageLoad stepKey="waitSaveToBeApplied"/>
2727
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the page." stepKey="seeSaveSuccess"/>

app/code/Magento/Cms/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<fillField selector="{{BlockNewPageBasicFieldsSection.identifier}}" userInput="{{_defaultBlock.identifier}}" stepKey="fillFieldIdentifier"/>
3333
<selectOption selector="{{BlockNewPageBasicFieldsSection.storeView}}" userInput="All Store View" stepKey="selectAllStoreView" />
3434
<waitForElementVisible selector="{{TinyMCESection.TinyMCE4}}" stepKey="waitForTinyMCE" />
35-
<actionGroup ref="VerifyTinyMCEActionGroup" stepKey="verifyTinyMCE4"/>
35+
<actionGroup ref="VerifyTinyMCEActionGroup" stepKey="verifyTinyMCE"/>
3636
<actionGroup ref="VerifyMagentoEntityActionGroup" stepKey="verifyMagentoEntities"/>
3737
<executeJS function="tinyMCE.get('cms_block_form_content').setContent('Hello Block Page!');" stepKey="executeJSFillContent"/>
3838
<click selector="{{BlockWYSIWYGSection.ShowHideBtn}}" stepKey="clickShowHideBtn1" />

app/code/Magento/Cms/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContent"/>
3333
<fillField selector="{{CmsNewPagePageContentSection.contentHeading}}" userInput="{{_defaultCmsPage.content_heading}}" stepKey="fillFieldContentHeading"/>
3434
<waitForElementVisible selector="{{TinyMCESection.TinyMCE4}}" stepKey="waitForTinyMCE" />
35-
<actionGroup ref="VerifyTinyMCEActionGroup" stepKey="verifyTinyMCE4"/>
35+
<actionGroup ref="VerifyTinyMCEActionGroup" stepKey="verifyTinyMCE"/>
3636
<actionGroup ref="VerifyMagentoEntityActionGroup" stepKey="verifyMagentoEntities"/>
3737
<executeJS function="tinyMCE.get('cms_page_form_content').setContent('Hello World!');" stepKey="executeJSFillContent"/>
3838
<click selector="{{CmsWYSIWYGSection.ShowHideBtn}}" stepKey="clickShowHideBtn" />

app/code/Magento/Config/Test/Mftf/ActionGroup/SwitcherActionGroup.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="SwitchToVersion4ActionGroup">
11+
<actionGroup name="SwitchToVersionActionGroup">
1212
<annotations>
13-
<description>DEPRECATED. Use CliEnableTinyMCE4 instead. Goes to the 'Configuration' page for 'Content Management'. Sets the 'WYSIWYG Editor' to 'TinyMCE 4'. Clicks on the Save button. PLEASE NOTE: The value is Hardcoded.</description>
13+
<description>DEPRECATED. Use CliEnableTinyMCE instead. Goes to the 'Configuration' page for 'Content Management'. Sets the 'WYSIWYG Editor' to 'TinyMCE 4'. Clicks on the Save button. PLEASE NOTE: The value is Hardcoded.</description>
1414
</annotations>
1515

1616
<amOnPage url="{{ConfigurationStoresPage.url}}" stepKey="navigateToWYSIWYGConfigPage1"/>

app/code/Magento/Newsletter/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<fillField selector="{{BasicFieldNewsletterSection.senderEmail}}" userInput="{{_defaultNewsletter.senderEmail}}" stepKey="fillSenderEmail" />
3333
<conditionalClick selector="#toggletext" dependentSelector=".mce-tinymce" visible="false" stepKey="clickBtnIfTinyMCEHidden"/>
3434
<waitForPageLoad stepKey="waitForTinyMce"/>
35-
<actionGroup ref="VerifyTinyMCEActionGroup" stepKey="verifyTinyMCE4"/>
35+
<actionGroup ref="VerifyTinyMCEActionGroup" stepKey="verifyTinyMCE"/>
3636
<actionGroup ref="VerifyMagentoEntityActionGroup" stepKey="verifyMagentoEntities"/>
3737
<executeJS function="tinyMCE.get('text').setContent('Hello World From Newsletter Template!');" stepKey="executeJSFillContent"/>
3838
<click selector="{{NewsletterWYSIWYGSection.ShowHideBtn}}" stepKey="clickShowHideBtn2" />

0 commit comments

Comments
 (0)