|
8 | 8 |
|
9 | 9 | <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
10 | 10 | xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
|
| 11 | + <test name="TextDataConsistencyBetweenTextEditor"> |
| 12 | + <annotations> |
| 13 | + <features value="PageBuilder"/> |
| 14 | + <stories value="Text"/> |
| 15 | + <title value="Data consistency between TextArea, TinyMCE4, TinyMCE4 in PageBuilder stage"/> |
| 16 | + <description value="Verify data consistent when switching between TinyMCE versions and TextArea"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <useCaseId value="MC-1438"/> |
| 19 | + <testCaseId value="MC-3741"/> |
| 20 | + <group value="pagebuilder"/> |
| 21 | + <group value="pagebuilder-text"/> |
| 22 | + </annotations> |
| 23 | + <before> |
| 24 | + <createData entity="_defaultCmsPage" stepKey="createCMSPage" /> |
| 25 | + <createData entity="_defaultCmsPage" stepKey="createCMSPageB" /> |
| 26 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 27 | + <actionGroup ref="DisabledWYSIWYG" stepKey="disableWYSIWYG"/> |
| 28 | + </before> |
| 29 | + <after> |
| 30 | + <deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage" /> |
| 31 | + <deleteData createDataKey="createCMSPageB" stepKey="deletePreReqCMSPageB" /> |
| 32 | + <actionGroup ref="logout" stepKey="logout"/> |
| 33 | + </after> |
| 34 | + <actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage1"> |
| 35 | + <argument name="CMSPage" value="$$createCMSPage$$"/> |
| 36 | + </actionGroup> |
| 37 | + <actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup1"> |
| 38 | + <argument name="group" value="PageBuilderTextContentType"/> |
| 39 | + </actionGroup> |
| 40 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragButtonsOntoStage"> |
| 41 | + <argument name="contentType" value="PageBuilderTextContentType"/> |
| 42 | + </actionGroup> |
| 43 | + <click selector="{{TextOnStage.textareaPlaceholder('1')}}" stepKey="focusOnEditorArea"/> |
| 44 | + <fillField selector="{{TextOnStage.textareaPlaceholder('1')}}" userInput="{{PageBuilderTextProperty.value}}" stepKey="fillTextToTextarea"/> |
| 45 | + <click selector="{{PageBuilderPanel.searchPanel}}" stepKey="lostFocusFromTextarea"/> |
| 46 | + <actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage2"/> |
| 47 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage2"/> |
| 48 | + <!--Verify Text Content Type on stage after saving cms page--> |
| 49 | + <comment userInput="Verify text content type on stage" stepKey="commentVerifyTextOnStage"/> |
| 50 | + <waitForElementVisible selector="{{TextOnStage.textArea('1')}}" stepKey="waitForTextStage2"/> |
| 51 | + <executeJS function="return document.evaluate("{{TextOnStage.textArea('1')}}", document.body).iterateNext().value" stepKey="textareaValueAfterSaving"/> |
| 52 | + <assertEquals stepKey="assertTextValueAfterSaving"> |
| 53 | + <expectedResult type="string">{{PageBuilderTextProperty.value}}</expectedResult> |
| 54 | + <actualResult type="variable">textareaValueAfterSaving</actualResult> |
| 55 | + </assertEquals> |
| 56 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage"> |
| 57 | + <argument name="contentType" value="PageBuilderTextContentType"/> |
| 58 | + </actionGroup> |
| 59 | + <!-- Add image to TextArea --> |
| 60 | + <comment userInput="Add image to TextArea" stepKey="comment1"/> |
| 61 | + <waitForElementVisible selector="{{TextOnConfiguration.insertImageButton}}" stepKey="waitForInsertImage"/> |
| 62 | + <click selector="{{TextOnConfiguration.insertImageButton}}" stepKey="clickInsertImage"/> |
| 63 | + <actionGroup ref="CreateImageFolder" stepKey="CreateImageFolder"> |
| 64 | + <argument name="ImageFolder" value="ImageFolder"/> |
| 65 | + </actionGroup> |
| 66 | + <actionGroup ref="attachImage" stepKey="attachImage1"> |
| 67 | + <argument name="Image" value="ImageUpload3"/> |
| 68 | + </actionGroup> |
| 69 | + <actionGroup ref="saveImage" stepKey="insertImage"/> |
| 70 | + <!-- Add widget to TextArea --> |
| 71 | + <comment userInput="Add widget to TextArea" stepKey="comment2"/> |
| 72 | + <actionGroup ref="addPageLinkWidgetWYSIWYGDisabled" stepKey="addPageLinkWidgetWYSIWYGDisabled"> |
| 73 | + <argument name="widget" value="PageBuilderTextArea_WidgetCMSPageLink"/> |
| 74 | + <argument name="page" value="$$createCMSPageB.identifier$$"/> |
| 75 | + </actionGroup> |
| 76 | + <!-- Add variable to TextArea --> |
| 77 | + <comment userInput="Add variable to TextArea" stepKey="comment3"/> |
| 78 | + <actionGroup ref="addPageLinkVariableWYSIWYGDisabled" stepKey="addPageLinkVariableWYSIWYGDisabled"> |
| 79 | + <argument name="variable" value="PageBuilderTextArea_VariableBaseURL"/> |
| 80 | + </actionGroup> |
| 81 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/> |
| 82 | + <actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage3"/> |
| 83 | + <!-- Switch to TinyMCE4 --> |
| 84 | + <comment userInput="Switch to TinyMCE4 " stepKey="comment4"/> |
| 85 | + <magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG"/> |
| 86 | + <magentoCLI command="config:set cms/wysiwyg/editor mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter" stepKey="enableTinyMCE4"/> |
| 87 | + <!-- Verify data on TinyMCE4 --> |
| 88 | + <comment userInput="Verify data on TinyMCE4" stepKey="comment5"/> |
| 89 | + <reloadPage stepKey="reloadPage"/> |
| 90 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage3"/> |
| 91 | + <waitForElementVisible selector="{{TextOnStage.tinymce('1')}}" stepKey="waitforTinyMCE4"/> |
| 92 | + <waitForElementVisible selector="//*[contains(@class, 'pagebuilder-text')]//*[text()='{{PageBuilderTextProperty.value}}']" stepKey="waitForText"/> |
| 93 | + <waitForElementVisible selector="{{TextOnStage.tinymce('1')}}{{CmsWYSIWYGSection.imageSource(ImageUpload3.fileName)}}" stepKey="assertMediaSourceOnStage2"/> |
| 94 | + <waitForElementVisible selector="{{TextOnStage.text('1', TinyMCEVariableBaseURL.editPanelValue)}}" stepKey="waitForVariabBaseURL"/> |
| 95 | + <waitForElementVisible selector="{{TextOnStage.variablePlaceholder('1')}}" stepKey="waitForVariablePlaceholder"/> |
| 96 | + <waitForElementVisible selector="{{TextOnStage.text('1', TinyMCEWidgetCMSPageLink.editPanelValue)}}" stepKey="waitForWidgetValue"/> |
| 97 | + <waitForElementVisible selector="{{TextOnStage.widgetPlaceholder('1')}}" stepKey="waitForWidgetPlaceholder"/> |
| 98 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings1"/> |
| 99 | + <!-- Switch to TinyMCE3 --> |
| 100 | + <comment userInput="Switch to TinyMCE3" stepKey="comment6"/> |
| 101 | + <magentoCLI command="config:set cms/wysiwyg/editor Magento_Tinymce3/tinymce3Adapter" stepKey="enableTinyMCE3"/> |
| 102 | + <reloadPage stepKey="reloadPage1"/> |
| 103 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage4"/> |
| 104 | + <executeJS function="return document.evaluate("{{TextOnStage.textArea('1')}}", document.body).iterateNext().value" stepKey="textareaValue"/> |
| 105 | + <assertEquals stepKey="assertTextValue"> |
| 106 | + <expectedResult type="string">{{PageBuilderTextProperty.value}}{{CmsWYSIWYGSection.imageSource(ImageUpload3.fileName)}}{{TinyMCEVariableBaseURL.editPanelValue}}{{TinyMCEWidgetCMSPageLink.editPanelValue}}</expectedResult> |
| 107 | + <actualResult type="variable">textareaValue</actualResult> |
| 108 | + </assertEquals> |
| 109 | + |
| 110 | + </test> |
11 | 111 | <test name="TextAreaInitalStatus">
|
12 | 112 | <annotations>
|
13 | 113 | <features value="PageBuilder"/>
|
|
147 | 247 | <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
|
148 | 248 | </before>
|
149 | 249 | <after>
|
150 |
| - <magentoCLI command="config:set config:set cms/wysiwyg/editor mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter" stepKey="enableTinyMCE4"/> |
| 250 | + <magentoCLI command="config:set cms/wysiwyg/editor mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter" stepKey="enableTinyMCE4"/> |
151 | 251 | <actionGroup ref="logout" stepKey="logout"/>
|
152 | 252 | </after>
|
153 | 253 | <actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle">
|
|
1522 | 1622 | <actionGroup ref="DeleteImageFromStorageActionGroup" stepKey="DeleteImageFromStorage2">
|
1523 | 1623 | <argument name="Image" value="PageBuilderImageProperty_JPG2"/>
|
1524 | 1624 | </actionGroup>
|
| 1625 | + <actionGroup ref="EnabledWYSIWYG" stepKey="enabledWYSIWYG"/> |
1525 | 1626 | <actionGroup ref="logout" stepKey="logout"/>
|
1526 | 1627 | </after>
|
1527 | 1628 | <actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup">
|
|
0 commit comments