Skip to content

Commit 2b3a5b3

Browse files
committed
PB-266: Video background for Slide
- Adding tests for slide and banner upload images and tinymce inline editor
1 parent 1af3f58 commit 2b3a5b3

File tree

5 files changed

+388
-8
lines changed

5 files changed

+388
-8
lines changed

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/StageActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
<argument name="index" defaultValue="1" type="string"/>
111111
</arguments>
112112
<attachFile userInput="{{property.value}}" selector="{{section.uploadImageInput(index)}}" stepKey="attachImageFromLocalToStage"/>
113-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
113+
<waitForPageLoad stepKey="waitForLoadingMaskToDisappear"/>
114114
<waitForElementVisible selector="{{section.imageSourceByIndex(index, property.fileName)}}" stepKey="waitForMainImageSource1"/>
115115
</actionGroup>
116116
<actionGroup name="verifyUploadImageButtons">

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/WYSIWYGActionGroup.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,18 @@
255255
</annotations>
256256
<doubleClick selector="{{PageBuilderStage.inlineWYSIWYGEditor(contentType.role, index)}}" stepKey="focusOnEditorArea0" before="focusOnEditorArea"/>
257257
</actionGroup>
258+
<actionGroup name="openInlineWYSIWYGEditorOnStage">
259+
<annotations>
260+
<description>Opens the inline wysiwyg editor on the stage in a content type</description>
261+
</annotations>
262+
<arguments>
263+
<argument name="contentType"/>
264+
<argument name="index" defaultValue="1" type="string"/>
265+
</arguments>
266+
<waitForElement selector="{{PageBuilderStage.inlineWYSIWYGEditor(contentType.role, index)}}" stepKey="waitForEditor"/>
267+
<click selector="{{PageBuilderStage.inlineWYSIWYGEditor(contentType.role, index)}}" stepKey="clickEditor"/>
268+
<waitForElementVisible selector="{{PageBuilderStage.inlineWYSIWYGEditorPanel(contentType.role, index)}}" stepKey="waitForEditorPanelVisible"/>
269+
</actionGroup>
258270
<actionGroup name="inlineEditTextAreaFromStage">
259271
<arguments>
260272
<argument name="contentType"/>
@@ -367,4 +379,11 @@
367379
<waitForPageLoad stepKey="waitForPageLoad"/>
368380
<waitForElementVisible selector="{{section.tinymceInFocus(index)}}" stepKey="waitForTinyMCEInFocus"/>
369381
</actionGroup>
382+
<actionGroup name="verifyInlineTinyMCEEditorNotUnderOtherElements">
383+
<annotations>
384+
<description>Validates that the inline TinyMCE Editor is not hidden under another element.</description>
385+
</annotations>
386+
<waitForElementVisible selector="{{WYSIWYGOnPageBuilderInline.underline}}" stepKey="waitForUnderlineVisible"/>
387+
<click selector="{{WYSIWYGOnPageBuilderInline.underline}}" stepKey="clickUnderline"/>
388+
</actionGroup>
370389
</actionGroups>

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,25 @@
3434
<element name="notCss" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline)"/>
3535
<element name="undo" type="button" selector=".mce-tinymce-inline div[aria-label='Undo']"/>
3636
<element name="redo" type="button" selector=".mce-tinymce-inline div[aria-label='Redo']"/>
37+
<element name="formatSelector" type="button" selector="//div[contains(@class, 'mce-tinymce')]//span[text()='Formats']"/>
3738
<element name="fontSize" type="button" selector=".mce-tinymce-inline div[aria-label='Font Sizes']"/>
3839
<element name="lineHeight" type="button" selector=".mce-tinymce-inline div[aria-label='Line Height']"/>
3940
<element name="textColor" type="button" selector=".mce-tinymce-inline div[aria-label='Text color']"/>
4041
<element name="backgroundColor" type="button" selector=".mce-tinymce-inline div[aria-label='Background color']"/>
41-
<element name="formatSelector" type="button" selector="//div[contains(@class, 'mce-tinymce')]//span[text()='Formats']"/>
42+
<element name="bold" type="button" selector=".mce-tinymce-inline div[aria-label='Bold']"/>
43+
<element name="italic" type="button" selector=".mce-tinymce-inline div[aria-label='Italic']"/>
44+
<element name="underline" type="button" selector=".mce-tinymce-inline div[aria-label='Underline']"/>
45+
<element name="alignLeft" type="button" selector=".mce-tinymce-inline div[aria-label='Align left']"/>
46+
<element name="alignCenter" type="button" selector=".mce-tinymce-inline div[aria-label='Align center']"/>
47+
<element name="alignRight" type="button" selector=".mce-tinymce-inline div[aria-label='Align right']"/>
48+
<element name="numberedList" type="button" selector=".mce-tinymce-inline div[aria-label='Numbered list']"/>
49+
<element name="bulletList" type="button" selector=".mce-tinymce-inline div[aria-label='Bullet list']"/>
50+
<element name="insertLink" type="button" selector=".mce-tinymce-inline div[aria-label='Insert/edit link']"/>
4251
<element name="imageSelector" type="button" selector=".mce-tinymce-inline div[aria-label='Insert/edit image']"/>
52+
<element name="table" type="button" selector=".mce-tinymce-inline div[aria-label='Table']"/>
53+
<element name="specialCharacter" type="button" selector=".mce-tinymce-inline div[aria-label='Special character']"/>
54+
<element name="insertWidget" type="button" selector=".mce-tinymce-inline div[aria-label='Insert Widget']"/>
55+
<element name="insertVariable" type="button" selector=".mce-tinymce-inline div[aria-label='Insert Variable']"/>
4356
<element name="imageSelectorBrowse" type="button" selector="div[aria-label='Insert/edit image'] i.mce-i-browse"/>
4457
<element name="imageSelectorOk" type="button" selector="//div[contains(@aria-label, 'Insert/edit image')]//span[contains(@class, 'mce-txt')][text()='Ok']"/>
4558
<element name="formatOption" type="text" selector="//div[contains(@class, 'mce-menu')]//span[contains(@class, 'mce-text') and text()='{{label}}']" parameterized="true"/>

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

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3489,4 +3489,177 @@
34893489
<argument name="index" value="4"/>
34903490
</actionGroup>
34913491
</test>
3492+
<test name="BannerTinyMCEMenuOpensInFrontOfVideoBackground">
3493+
<annotations>
3494+
<features value="PageBuilder"/>
3495+
<stories value="Banner"/>
3496+
<title value="Banner: Verify TinyMCE Menu Opens In Front of Video Background"/>
3497+
<description value="Validate that the TinyMCE menu opens in front of a banner's video background."/>
3498+
<severity value="AVERAGE"/>
3499+
<useCaseId value="PB-265"/>
3500+
<testCaseId value="MC-32035"/>
3501+
<group value="pagebuilder"/>
3502+
<group value="pagebuilder-banner"/>
3503+
<group value="pagebuilder-backgroundForm"/>
3504+
<group value="pagebuilder-video-background"/>
3505+
</annotations>
3506+
<before>
3507+
<createData entity="_emptyCmsPage" stepKey="createCMSPage"/>
3508+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
3509+
<actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage">
3510+
<argument name="CMSPage" value="$$createCMSPage$$"/>
3511+
</actionGroup>
3512+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
3513+
</before>
3514+
<after>
3515+
<deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/>
3516+
<actionGroup ref="logout" stepKey="logout"/>
3517+
</after>
3518+
<!-- Add Column and Banner to Stage -->
3519+
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSectionColumn">
3520+
<argument name="contentType" value="PageBuilderColumnContentType"/>
3521+
</actionGroup>
3522+
<actionGroup ref="dragContentTypeToStage" stepKey="dragColumnToStage">
3523+
<argument name="contentType" value="PageBuilderColumnContentType"/>
3524+
</actionGroup>
3525+
<actionGroup ref="duplicateContentType" stepKey="duplicateColumn">
3526+
<argument name="contentType" value="PageBuilderColumnContentType"/>
3527+
<argument name="targetIndex" value="1"/>
3528+
</actionGroup>
3529+
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSectionBanner">
3530+
<argument name="contentType" value="PageBuilderBannerContentType"/>
3531+
</actionGroup>
3532+
<actionGroup ref="dragContentTypeToContainer" stepKey="dragBannerToColumn">
3533+
<argument name="contentType" value="PageBuilderBannerContentType"/>
3534+
<argument name="containerTargetType" value="PageBuilderColumnContentType"/>
3535+
<argument name="containerTargetIndex" value="1"/>
3536+
<argument name="contentTypeIndex" value="1"/>
3537+
</actionGroup>
3538+
<!-- Add Video Background -->
3539+
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditPanel">
3540+
<argument name="contentType" value="PageBuilderBannerContentType"/>
3541+
</actionGroup>
3542+
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterMinHeightProperty">
3543+
<argument name="property" value="PageBuilderMinHeightProperty_300px"/>
3544+
</actionGroup>
3545+
<actionGroup ref="chooseVisualSelectOption" stepKey="setBackgroundType">
3546+
<argument name="property" value="PageBuilderBackgroundType_Video"/>
3547+
</actionGroup>
3548+
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterVideoUrl">
3549+
<argument name="property" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
3550+
</actionGroup>
3551+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
3552+
<!-- Create Banners Beside One Another -->
3553+
<actionGroup ref="duplicateContentType" stepKey="duplicateBanner">
3554+
<argument name="contentType" value="PageBuilderBannerContentType"/>
3555+
<argument name="targetIndex" value="1"/>
3556+
</actionGroup>
3557+
<actionGroup ref="moveContentTypeToContainer" stepKey="moveBannerToSecondColumn">
3558+
<argument name="contentType" value="PageBuilderBannerContentType"/>
3559+
<argument name="contentTypeIndex" value="2"/>
3560+
<argument name="containerTargetType" value="PageBuilderColumnContentType"/>
3561+
<argument name="containerTargetIndex" value="2"/>
3562+
</actionGroup>
3563+
<actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage"/>
3564+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage2"/>
3565+
<!-- Wait For Videos to Start -->
3566+
<actionGroup ref="validateVideoBackgroundPlaying" stepKey="validateVideoPlaying1">
3567+
<argument name="section" value="BannerOnBackend"/>
3568+
<argument name="videoUrl" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
3569+
<argument name="index" value="1"/>
3570+
</actionGroup>
3571+
<actionGroup ref="validateVideoBackgroundPlaying" stepKey="validateVideoPlaying2">
3572+
<argument name="section" value="BannerOnBackend"/>
3573+
<argument name="videoUrl" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
3574+
<argument name="index" value="2"/>
3575+
</actionGroup>
3576+
<!-- Open Editor For Banner 1 and Verify -->
3577+
<actionGroup ref="openInlineWYSIWYGEditorOnStage" stepKey="openInlineWYSIWYGEditorOnStage">
3578+
<argument name="contentType" value="PageBuilderBannerContentType"/>
3579+
</actionGroup>
3580+
<actionGroup ref="verifyInlineTinyMCEEditorNotUnderOtherElements" stepKey="VerifyTinyMCEEditorButtonsActionGroup"/>
3581+
</test>
3582+
<test name="BannerVerifyStageUploadImageButtonsWorkWithVideoBackground">
3583+
<annotations>
3584+
<features value="PageBuilder"/>
3585+
<stories value="Banner"/>
3586+
<title value="Banner: Verify Stage Upload Image Buttons Work With Video Background"/>
3587+
<description value="Verify that the on hover upload image buttons work for banners with video backgrounds"/>
3588+
<severity value="AVERAGE"/>
3589+
<useCaseId value="PB-265"/>
3590+
<testCaseId value="MC-32036"/>
3591+
<group value="pagebuilder"/>
3592+
<group value="pagebuilder-banner"/>
3593+
<group value="pagebuilder-backgroundForm"/>
3594+
<group value="pagebuilder-video-background"/>
3595+
</annotations>
3596+
<before>
3597+
<createData entity="_emptyCmsPage" stepKey="createCMSPage"/>
3598+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
3599+
<actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage">
3600+
<argument name="CMSPage" value="$$createCMSPage$$"/>
3601+
</actionGroup>
3602+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
3603+
</before>
3604+
<after>
3605+
<deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/>
3606+
<actionGroup ref="NavigateToMediaGalleryActionGroup" stepKey="navigateToMediaGallery"/>
3607+
<actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToFallbackImageFolder">
3608+
<argument name="FolderName" value="{{PageBuilderBackgroundImage_JPG.path}}"/>
3609+
</actionGroup>
3610+
<actionGroup ref="DeleteImageFromStorageActionGroup" stepKey="deleteBackgroundImage1">
3611+
<argument name="Image" value="PageBuilderBackgroundImage_JPG"/>
3612+
</actionGroup>
3613+
<actionGroup ref="logout" stepKey="logout"/>
3614+
</after>
3615+
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSection">
3616+
<argument name="contentType" value="PageBuilderBannerContentType"/>
3617+
</actionGroup>
3618+
<actionGroup ref="dragContentTypeToStage" stepKey="dragBannerOntoStage">
3619+
<argument name="contentType" value="PageBuilderBannerContentType"/>
3620+
</actionGroup>
3621+
<!-- Add Video Background -->
3622+
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditPanel">
3623+
<argument name="contentType" value="PageBuilderBannerContentType"/>
3624+
</actionGroup>
3625+
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterMinHeightProperty">
3626+
<argument name="property" value="PageBuilderMinHeightProperty_300px"/>
3627+
</actionGroup>
3628+
<actionGroup ref="chooseVisualSelectOption" stepKey="setBackgroundType">
3629+
<argument name="property" value="PageBuilderBackgroundType_Video"/>
3630+
</actionGroup>
3631+
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterVideoUrl">
3632+
<argument name="property" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
3633+
</actionGroup>
3634+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
3635+
<actionGroup ref="validateVideoBackgroundPlaying" stepKey="validateVideoPlaying">
3636+
<argument name="section" value="BannerOnBackend"/>
3637+
<argument name="videoUrl" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
3638+
</actionGroup>
3639+
<!-- Verify Upload Image Buttons -->
3640+
<actionGroup ref="verifyUploadImageButtons" stepKey="verifyUploadImageButtons">
3641+
<argument name="contentType" value="PageBuilderBannerContentType"/>
3642+
</actionGroup>
3643+
<actionGroup ref="verifySelectFromGalleryButtonWorks" stepKey="verifySelectFromGalleryButtonWorks">
3644+
<argument name="contentType" value="PageBuilderBannerContentType"/>
3645+
</actionGroup>
3646+
<actionGroup ref="uploadImageToContentTypeFromStage" stepKey="uploadImageToBanner">
3647+
<argument name="property" value="PageBuilderImageProperty_JPG"/>
3648+
<argument name="section" value="BannerOnBackend"/>
3649+
</actionGroup>
3650+
<actionGroup ref="validateBackgroundImage" stepKey="validateBackgroundImageStage">
3651+
<argument name="section" value="BannerOnBackend"/>
3652+
<argument name="backgroundImage" value="PageBuilderBackgroundImage_JPG"/>
3653+
</actionGroup>
3654+
<!-- Verify Edit Panel -->
3655+
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditPanel2">
3656+
<argument name="contentType" value="PageBuilderBannerContentType"/>
3657+
</actionGroup>
3658+
<actionGroup ref="seeOptionIsSelectedSlideOutProperty" stepKey="validateBackgroundType">
3659+
<argument name="property" value="PageBuilderBackgroundType_Image"/>
3660+
</actionGroup>
3661+
<actionGroup ref="seeImageUploadedOnSlideOut" stepKey="seeImageOnSlideOut">
3662+
<argument name="property" value="PageBuilderBackgroundImage_JPG"/>
3663+
</actionGroup>
3664+
</test>
34923665
</tests>

0 commit comments

Comments
 (0)