Skip to content

Commit 867f3e3

Browse files
authored
Merge pull request #6932 from magento-trigger/AC-233-final
AC-233: Refactor core MFTF TinyMCE ActionGroup
2 parents 21d65a6 + d991d44 commit 867f3e3

File tree

50 files changed

+167
-136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+167
-136
lines changed

app/code/Magento/Catalog/Test/Mftf/Data/WYSIWYGConfigData.xml

Lines changed: 0 additions & 23 deletions
This file was deleted.

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
<before>
1212
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
1313
<actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/>
14-
<actionGroup ref="CliEnableTinyMCE4ActionGroup" stepKey="switchToTinyMCE4" />
14+
<actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE" >
15+
<argument name="TinyMCEValue" value="{{EnableTinyMCE.value}}"/>
16+
</actionGroup>
1517
</before>
1618
<annotations>
1719
<features value="Catalog"/>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
<before>
2222
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
2323
<actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/>
24-
<actionGroup ref="CliEnableTinyMCE4ActionGroup" stepKey="switchToTinyMCE4" />
24+
<actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE" >
25+
<argument name="TinyMCEValue" value="{{EnableTinyMCE.value}}"/>
26+
</actionGroup>
2527
</before>
2628

2729
<after>

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,19 @@
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"/>
2020
</annotations>
2121
<before>
2222
<!-- Enable WYSIWYG editor -->
23-
<magentoCLI command="config:set {{EnableWYSIWYG.path}} {{EnableWYSIWYG.value}}" stepKey="enableWYSIWYG"/>
23+
<actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/>
2424

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

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

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
<before>
2121
<actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/>
2222
<actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/>
23-
<actionGroup ref="CliEnableTinyMCE4ActionGroup" stepKey="switchToTinyMCE4" />
23+
<actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE" >
24+
<argument name="TinyMCEValue" value="{{EnableTinyMCE.value}}"/>
25+
</actionGroup>
2426
<createData stepKey="myProductAttributeCreation" entity="productAttributeWysiwyg"/>
2527
<createData stepKey="myProductAttributeSetAssign" entity="AddToDefaultSet">
2628
<requiredEntity createDataKey="myProductAttributeCreation"/>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
<before>
2121
<actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/>
2222
<actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/>
23-
<actionGroup ref="CliEnableTinyMCE4ActionGroup" stepKey="switchToTinyMCE4"/>
23+
<actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE">
24+
<argument name="TinyMCEValue" value="{{EnableTinyMCE.value}}"/>
25+
</actionGroup>
2426
</before>
2527
<amOnPage url="{{AdminProductCreatePage.url(AddToDefaultSet.attributeSetId, 'simple')}}" stepKey="navigateToProduct"/>
2628
<waitForPageLoad stepKey="wait"/>

app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest/VerifydefaultcontrolsonproductshortdescriptionTest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
<before>
2121
<actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/>
2222
<actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/>
23-
<actionGroup ref="CliEnableTinyMCE4ActionGroup" stepKey="switchToTinyMCE4"/>
23+
<actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE">
24+
<argument name="TinyMCEValue" value="{{EnableTinyMCE.value}}"/>
25+
</actionGroup>
2426
</before>
2527
<amOnPage url="{{AdminProductCreatePage.url(AddToDefaultSet.attributeSetId, 'simple')}}" stepKey="navigateToProduct"/>
2628
<waitForPageLoad stepKey="wait"/>

app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogTest.xml renamed to app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEIsNativeWYSIWYGOnCatalogTest.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,22 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogTest">
11+
<test name="VerifyTinyMCEIsNativeWYSIWYGOnCatalogTest">
1212
<annotations>
1313
<features value="Catalog"/>
1414
<stories value="MAGETWO-72137-Apply new WYSIWYG on Categories Page"/>
1515
<group value="Catalog"/>
16-
<title value="Admin should see TinyMCEv4.6 is the native WYSIWYG on Catalog Page"/>
17-
<description value="Admin should see TinyMCEv4.6 is the native WYSIWYG on Catalog Page"/>
16+
<title value="Admin should see TinyMCE is the native WYSIWYG on Catalog Page"/>
17+
<description value="Admin should see TinyMCE is the native WYSIWYG on Catalog Page"/>
1818
<severity value="CRITICAL"/>
1919
<testCaseId value="MAGETWO-82551"/>
2020
</annotations>
2121
<before>
2222
<actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/>
2323
<actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/>
24-
<actionGroup ref="CliEnableTinyMCE4ActionGroup" stepKey="switchToTinyMCE4" />
24+
<actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE" >
25+
<argument name="TinyMCEValue" value="{{EnableTinyMCE.value}}"/>
26+
</actionGroup>
2527
</before>
2628
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="navigateToNewCatalog"/>
2729
<waitForLoadingMaskToDisappear stepKey="wait2" />
@@ -30,7 +32,7 @@
3032
<click selector="{{AdminProductFormSection.contentTab}}" stepKey="clickContentTab"/>
3133
<waitForElementVisible selector="{{CatalogWYSIWYGSection.TinyMCE4}}" stepKey="waitForTinyMCE4" />
3234
<seeElement selector="{{CatalogWYSIWYGSection.ShowHideBtn}}" stepKey="seeShowHideBtn" />
33-
<actionGroup ref="VerifyTinyMCEActionGroup" stepKey="verifyTinyMCE4"/>
35+
<actionGroup ref="VerifyTinyMCEActionGroup" stepKey="verifyTinyMCE"/>
3436
<executeJS function="tinyMCE.get('category_form_description').setContent('Hello World!');" stepKey="executeJSFillContent"/>
3537
<click selector="{{CatalogWYSIWYGSection.ShowHideBtn}}" stepKey="clickShowHideBtn" />
3638
<waitForElementVisible selector="{{TinyMCESection.InsertImageBtn}}" stepKey="waitForInsertImage" />

app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnProductTest.xml renamed to app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEIsNativeWYSIWYGOnProductTest.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,22 @@
77
-->
88
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10-
<test name="VerifyTinyMCEv4IsNativeWYSIWYGOnProductTest">
10+
<test name="VerifyTinyMCEIsNativeWYSIWYGOnProductTest">
1111
<annotations>
1212
<features value="Catalog"/>
1313
<stories value="MAGETWO-72114-TinyMCE v4.6 as a native WYSIWYG editor"/>
1414
<group value="Catalog"/>
15-
<title value="Admin should see TinyMCEv4.6 is the native WYSIWYG on Product Page"/>
16-
<description value="Admin should see TinyMCEv4.6 is the native WYSIWYG on Product Page"/>
15+
<title value="Admin should see TinyMCE is the native WYSIWYG on Product Page"/>
16+
<description value="Admin should see TinyMCE is the native WYSIWYG on Product Page"/>
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MAGETWO-81819"/>
1919
</annotations>
2020
<before>
2121
<actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/>
2222
<actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/>
23-
<actionGroup ref="CliEnableTinyMCE4ActionGroup" stepKey="switchToTinyMCE4" />
23+
<actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE" >
24+
<argument name="TinyMCEValue" value="{{EnableTinyMCE.value}}"/>
25+
</actionGroup>
2426
</before>
2527
<amOnPage url="{{AdminProductCreatePage.url(AddToDefaultSet.attributeSetId, 'simple')}}" stepKey="navigateToNewProduct"/>
2628
<waitForPageLoad stepKey="wait1"/>

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"/>

0 commit comments

Comments
 (0)