Skip to content

Commit 08c21f8

Browse files
committed
MC-4137: TinyMCE Issues within inline WYSIWYG
- Improve copy and paste test
1 parent 698cf26 commit 08c21f8

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderTextTest.xml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2901,13 +2901,20 @@
29012901
<pressKey selector="{{TextOnStage.tinymce('1')}}" userInput="{{PageBuilderVariableWidgetText.value}}" stepKey="fillWysiwygField"/>
29022902
<waitForElementVisible selector="{{TextOnStage.text('1', PageBuilderVariableWidgetText.value)}}" stepKey="waitForTextOnStage"/>
29032903
<seeElement selector="{{TextOnStage.text('1', PageBuilderVariableWidgetText.value)}}" stepKey="seeTextOnStage" />
2904-
<pressKey selector="{{TextOnStage.tinymce('1')}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::COMMAND, 'a']" stepKey="selectAllText"/>
2904+
<executeJS function="document.execCommand('selectall', null, false);" stepKey="selectAllText"/>
29052905
<waitForPageLoad stepKey="waitForTextSelect"/>
2906-
<pressKey selector="{{TextOnStage.tinymce('1')}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::COMMAND, 'c']" stepKey="copyAllText"/>
2906+
<pressKey selector="{{TextOnStage.tinymce('1')}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::CONTROL, \Facebook\WebDriver\WebDriverKeys::INSERT]" stepKey="copyAllText"/>
29072907
<waitForPageLoad stepKey="waitForTextCopy"/>
2908-
<pressKey selector="{{TextOnStage.tinymce('1')}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::COMMAND, 'v']" stepKey="pasteAllText"/>
2908+
<pressKey selector="{{TextOnStage.tinymce('1')}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::ARROW_RIGHT, \Facebook\WebDriver\WebDriverKeys::ENTER]" stepKey="unSelectTextAndNewLine"/>
2909+
<waitForPageLoad stepKey="waitForUnselect"/>
2910+
<pressKey selector="{{TextOnStage.tinymce('1')}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::SHIFT, \Facebook\WebDriver\WebDriverKeys::INSERT]" stepKey="pasteAllText"/>
29092911
<waitForPageLoad stepKey="waitForTextPaste"/>
2910-
<seeNumberOfElements selector="{{TextOnStage.textParagraph('1')}}" userInput="1" stepKey="seeOnlyOneParagraph"/>
2912+
<seeNumberOfElements selector="{{TextOnStage.text('1', PageBuilderVariableWidgetText.value)}}" userInput="2" stepKey="seeTwoParagraphs"/>
2913+
<executeJS function="document.execCommand('selectall', null, false);" stepKey="selectAllText2"/>
2914+
<waitForPageLoad stepKey="waitForTextSelect2"/>
2915+
<pressKey selector="{{TextOnStage.tinymce('1')}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::SHIFT, \Facebook\WebDriver\WebDriverKeys::INSERT]" stepKey="pasteAllText2"/>
2916+
<waitForPageLoad stepKey="waitForTextPaste2"/>
2917+
<seeNumberOfElements selector="{{TextOnStage.text('1', PageBuilderVariableWidgetText.value)}}" userInput="1" stepKey="seeOnlyOneParagraph"/>
29112918
</test>
29122919
<test name="TextAddLinkToTextInlineWYSIWYG">
29132920
<annotations>

0 commit comments

Comments
 (0)