Skip to content

Commit 5cf7e8a

Browse files
authored
Merge pull request #183 from magento-obsessive-owls/MC-3812-text-banner-inline-focus
[Owls] MC-3812: Text/Banner - Stage Inline Editor becomes focused and editable after clicking Save button on Edit Form
2 parents 753559b + 01c8b93 commit 5cf7e8a

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderTextSection.xml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<element name="textareaPlaceholder" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]//textarea[contains(@class, 'inline-wysiwyg-textarea') and contains(@placeholder,'Edit Text')]" parameterized="true"/>
2424
<element name="textPlaceholder" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg}}]//*[contains(@class, 'placeholder-text') and text()='Edit Text']" parameterized="true"/>
2525
<element name="tinymce" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg}}]//div[contains(@class, 'inline-wysiwyg')]" parameterized="true"/>
26+
<element name="tinymceFocused" type="text" selector="(//div[contains(@class, 'pagebuilder-text') and contains(@class, 'pagebuilder-toolbar-active')])[{{arg}}]" parameterized="true"/>
2627
<element name="importantStyle" type="text" selector="//span[text()='Important']"/>
2728
<element name="textInImportantStyle" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]//div[contains(normalize-space(@class), 'cms-content-important') and text()='{{arg2}}']" parameterized="true"/>
2829
<element name="emptyTextInImportantStyle" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]//div[contains(normalize-space(@class), 'cms-content-important')]" parameterized="true"/>

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

+46
Original file line numberDiff line numberDiff line change
@@ -2609,4 +2609,50 @@
26092609
<waitForElementVisible selector="{{TextOnConfiguration.textArea}}" stepKey="waitForTextOnEditPanel" before="enterText"/>
26102610
<fillField selector="{{TextOnConfiguration.textArea}}" userInput="{{PageBuilderTextProperty.value}}" stepKey="enterText"/>
26112611
</test>
2612+
<test name="InlineTinyMceEditingIsNotFocusedOnEditSave">
2613+
<annotations>
2614+
<features value="PageBuilder"/>
2615+
<stories value="Text"/>
2616+
<title value="TinyMCE should not be incorrectly focused"/>
2617+
<description value="Verify the inline editing mode for TinyMCE isn't focused automatically when saving content within the edit panel"/>
2618+
<severity value="MAJOR"/>
2619+
<useCaseId value="MC-3812"/>
2620+
<testCaseId value="MC-5728"/>
2621+
<group value="pagebuilder"/>
2622+
<group value="pagebuilder-text"/>
2623+
</annotations>
2624+
<before>
2625+
<createData entity="_defaultCmsPage" stepKey="createCMSPage" />
2626+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2627+
<actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" />
2628+
</before>
2629+
<after>
2630+
<deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage" />
2631+
<actionGroup ref="logout" stepKey="logout"/>
2632+
</after>
2633+
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage1">
2634+
<argument name="CMSPage" value="$$createCMSPage$$"/>
2635+
</actionGroup>
2636+
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup1">
2637+
<argument name="group" value="PageBuilderTextContentType"/>
2638+
</actionGroup>
2639+
<actionGroup ref="dragContentTypeToStage" stepKey="dragTextOntoStage">
2640+
<argument name="contentType" value="PageBuilderTextContentType"/>
2641+
</actionGroup>
2642+
<!-- Drag text into stage -->
2643+
<comment userInput="Drag text into stage" stepKey="commentDragTextIntoStage"/>
2644+
<click selector="{{TextOnStage.tinymce('1')}}" stepKey="focusOnEditorArea"/>
2645+
<seeElement selector="{{TextOnStage.tinymceFocused('1')}}" stepKey="seeFocusedTinyMce"/>
2646+
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="lostFocusFromWYSIWYG1"/>
2647+
<dontSeeElement selector="{{TextOnStage.tinymceFocused('1')}}" stepKey="dontSeeFocusedTinyMce"/>
2648+
<!-- Open and save slide out panel -->
2649+
<comment userInput="Open and save slide out panel" stepKey="commentOpenAndSaveSlideOut"/>
2650+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
2651+
<argument name="contentType" value="PageBuilderTextContentType"/>
2652+
</actionGroup>
2653+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
2654+
<!-- Verify TinyMCE is not automatically focused -->
2655+
<comment userInput="Verify TinyMCE is not automatically focused" stepKey="commentVerifyNotFocused"/>
2656+
<dontSeeElement selector="{{TextOnStage.tinymceFocused('1')}}" stepKey="dontSeeTinyMceFocused"/>
2657+
</test>
26122658
</tests>

0 commit comments

Comments
 (0)