|
79 | 79 | <argument name="text" value="\u{1F600}"/>
|
80 | 80 | </actionGroup>
|
81 | 81 |
|
| 82 | + <click selector="{{EditPanelForm.editFormSave}}" stepKey="savePageBuilderTextContentType"/> |
| 83 | + <waitForElementVisible selector="{{TextOnConfiguration.textAreaError}}" stepKey="waitForPageBuilderTextContentTypeError"/> |
| 84 | + <grabTextFrom selector="{{TextOnConfiguration.textAreaError}}" stepKey="grabTextFromPageBuilderTextContentTypeError"/> |
| 85 | + <assertStringContainsString stepKey="assertErrorMessageForPageBuilderTextContentType"> |
| 86 | + <expectedResult type="string">Please remove invalid characters</expectedResult> |
| 87 | + <actualResult type="variable">grabTextFromPageBuilderTextContentTypeError</actualResult> |
| 88 | + </assertStringContainsString> |
| 89 | + <actionGroup ref="removeTextFromHtmlCodeWYSIWYGActionGroup" stepKey="removeTheInvalidCharacterFromPageBuilderTextContentType"> |
| 90 | + <argument name="selector" value="//textarea[@id="{{TextOnConfiguration.textAreaId}}"][1]"/> |
| 91 | + <argument name="text" value="\u{1F600}"/> |
| 92 | + </actionGroup> |
82 | 93 | <actionGroup ref="saveEditPanelSettingsFullScreen" stepKey="saveTextEditPanelSettings"/>
|
83 | 94 |
|
84 | 95 | <!-- Validate Stage -->
|
|
90 | 101 | <expectedResult type="string">{{PageBuilderHtmlPropertyButton.value}}</expectedResult>
|
91 | 102 | <actualResult type="variable">actualTextFromHtmlCode</actualResult>
|
92 | 103 | </assertStringContainsString>
|
| 104 | + |
| 105 | + <!-- Add the invalid character in the text element on stage --> |
| 106 | + <click selector="{{TextOnStage.textareaPlaceholder('1')}}" stepKey="focusOnEditorArea"/> |
| 107 | + <actionGroup ref="addTextToHtmlCodeWYSIWYGActionGroup" stepKey="enterWrongTextContentOnStage"> |
| 108 | + <argument name="selector" value="{{TextOnStage.textAreaForExecuteJS('1')}}"/> |
| 109 | + <argument name="text" value="\u{1F600}"/> |
| 110 | + </actionGroup> |
| 111 | + <!-- Trigger keyup to dispatch changes --> |
| 112 | + <pressKey selector="{{TextOnStage.textareaPlaceholder('1')}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::END]" stepKey="pressEndKey"/> |
| 113 | + <click selector="{{PageBuilderPanel.searchPanel}}" stepKey="lostFocusFromTextarea"/> |
93 | 114 | <actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen"/>
|
94 | 115 |
|
95 | 116 | <!-- Cannot save invalid text-->
|
|
0 commit comments