Skip to content

Commit b586c7a

Browse files
committed
PB-266: Video background for Slide
- Adding tests
1 parent f77f769 commit b586c7a

6 files changed

+621
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
<element name="minimumHeight" type="text" selector="(//div[@data-content-type='slide'])[{{arg1}}]//div[@data-element='wrapper'][contains(@style,'min-height: {{arg2}}px;')]" parameterized="true"/>
8787
<!-- Background Configuration -->
8888
<element name="backgroundType" type="text" parameterized="true" selector="(//div[@data-content-type='slide'])[{{arg1}}]//div[@data-element='wrapper' and @data-background-type='{{backgroundType}}']"/>
89+
<element name="backgroundColorElement" type="button" parameterized="true" selector="(//div[@data-content-type='slide'])[{{arg1}}]//div[@data-element='wrapper'][contains(@style,'background-color:')]"/>
8990
<element name="backgroundColor" type="text" selector="(//div[@data-content-type='slide'])[{{arg1}}]//div[@data-element='wrapper'][contains(@style,'background-color: {{arg2}};')]" parameterized="true"/>
9091
<element name="noBackgroundColor" type="button" selector="(//div[@data-content-type='slide'])[{{arg1}}]//div[@data-element='wrapper'][not(contains(@style,'background-color:'))]" parameterized="true"/>
9192
<element name="backgroundImage" type="text" selector="(//div[@data-content-type='slide'])[{{arg1}}]//div[@data-element='wrapper'][contains(@style,'background-image: url(') and contains(@style,'{{arg2}}')]" parameterized="true"/>

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

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,4 +699,57 @@
699699
<executeJS function="return Math.abs(Math.round({$overlayRightPositionAfterSave}-{$buttonRightPositionAfterSave}-30))" stepKey="overlayMinusButtonMinusPaddingAfterSave"/>
700700
<executeJS function="return Math.abs(Math.round({$overlayRightPositionStoreFront}-{$buttonRightPositionStoreFront}-30))" stepKey="overlayMinusButtonMinusPaddingStoreFront"/>
701701
</test>
702+
<test name="SliderCollageCenterVideoBackgroundNoFallbackImageDisabledLoopAndPlayWhenVisibleAndLazyLoad" extends="SliderPosterVideoBackgroundNoFallbackImageDisabledLoopAndPlayWhenVisibleAndLazyLoad">
703+
<annotations>
704+
<features value="PageBuilder"/>
705+
<stories value="Slider"/>
706+
<title value="Validate Collage Center Slide with No Fallback Image, Disabled Infinite Loop, Disabled Play Only When Visible, and Disabled Lazy Load"/>
707+
<description value="Validate video background with no fallback image, disabled infinite loop, disabled play only when visible, and disabled lazy load."/>
708+
<severity value="MAJOR"/>
709+
<useCaseId value="PB-266"/>
710+
<testCaseId value="MC-31835"/>
711+
<group value="pagebuilder"/>
712+
<group value="pagebuilder-slide"/>
713+
<group value="pagebuilder-sliderCollageCenter"/>
714+
<group value="pagebuilder-video-background"/>
715+
</annotations>
716+
<actionGroup ref="chooseVisualSelectOption" stepKey="setAppearance">
717+
<argument name="property" value="PageBuilderAppearance_CollageCentered"/>
718+
</actionGroup>
719+
<actionGroup ref="validateVideoBackgroundWithOnlyVideoUrl" stepKey="validateStorefront">
720+
<argument name="section" value="SlideOnFrontend"/>
721+
<argument name="videoUrl" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
722+
<argument name="infiniteLoop" value="PageBuilderVideoBackgroundInfiniteLoop_Disabled"/>
723+
<argument name="lazyLoad" value="PageBuilderVideoBackgroundLazyLoad_Disabled"/>
724+
<argument name="playOnlyWhenVisible" value="PageBuilderVideoBackgroundPlayOnlyWhenVisible_Disabled"/>
725+
</actionGroup>
726+
</test>
727+
<test name="SliderCollageCenterValidateVideoBackground" extends="SliderPosterValidateVideoBackground">
728+
<annotations>
729+
<features value="PageBuilder"/>
730+
<stories value="Slider"/>
731+
<title value="Validate Video Background in Collage Center Slide"/>
732+
<description value="Set all video background attributes for a Collage Center Slide and validate on stage and storefront."/>
733+
<severity value="CRITICAL"/>
734+
<useCaseId value="PB-266"/>
735+
<testCaseId value="MC-31839"/>
736+
<group value="pagebuilder"/>
737+
<group value="pagebuilder-slide"/>
738+
<group value="pagebuilder-sliderCollageCenter"/>
739+
<group value="pagebuilder-video-background"/>
740+
</annotations>
741+
<actionGroup ref="chooseVisualSelectOption" stepKey="setAppearance">
742+
<argument name="property" value="PageBuilderAppearance_CollageCentered"/>
743+
</actionGroup>
744+
<actionGroup ref="validateVideoBackgroundWithAllAttributes" stepKey="validateStorefront">
745+
<argument name="section" value="SlideOnFrontend"/>
746+
<argument name="backgroundColor" value="{{PageBuilderBackgroundColor_Pink.rgb}}"/>
747+
<argument name="videoUrl" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
748+
<argument name="overlayColor" value="{{PageBuilderVideoBackgroundOverlayColor_Hex_Grey.rgba}}"/>
749+
<argument name="infiniteLoop" value="PageBuilderVideoBackgroundInfiniteLoop_Enabled"/>
750+
<argument name="lazyLoad" value="PageBuilderVideoBackgroundLazyLoad_Enabled"/>
751+
<argument name="playOnlyWhenVisible" value="PageBuilderVideoBackgroundPlayOnlyWhenVisible_Enabled"/>
752+
<argument name="fallbackImage" value="PageBuilderVideoBackgroundFallbackImage_JPG"/>
753+
</actionGroup>
754+
</test>
702755
</tests>

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

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,4 +576,57 @@
576576
<executeJS function="return Math.abs(Math.round({$overlayRightPositionAfterSave}-{$buttonRightPositionAfterSave}-30))" stepKey="overlayMinusButtonMinusPaddingAfterSave"/>
577577
<executeJS function="return Math.abs(Math.round({$overlayRightPositionStoreFront}-{$buttonRightPositionStoreFront}-30))" stepKey="overlayMinusButtonMinusPaddingStoreFront"/>
578578
</test>
579+
<test name="SliderCollageLeftVideoBackgroundNoFallbackImageDisabledLoopAndPlayWhenVisibleAndLazyLoad" extends="SliderPosterVideoBackgroundNoFallbackImageDisabledLoopAndPlayWhenVisibleAndLazyLoad">
580+
<annotations>
581+
<features value="PageBuilder"/>
582+
<stories value="Slider"/>
583+
<title value="Validate Collage Left Slide with No Fallback Image, Disabled Infinite Loop, Disabled Play Only When Visible, and Disabled Lazy Load"/>
584+
<description value="Validate video background with no fallback image, disabled infinite loop, disabled play only when visible, and disabled lazy load."/>
585+
<severity value="MAJOR"/>
586+
<useCaseId value="PB-266"/>
587+
<testCaseId value="MC-31834"/>
588+
<group value="pagebuilder"/>
589+
<group value="pagebuilder-slide"/>
590+
<group value="pagebuilder-sliderCollageLeft"/>
591+
<group value="pagebuilder-video-background"/>
592+
</annotations>
593+
<actionGroup ref="chooseVisualSelectOption" stepKey="setAppearance">
594+
<argument name="property" value="PageBuilderAppearance_CollageLeft"/>
595+
</actionGroup>
596+
<actionGroup ref="validateVideoBackgroundWithOnlyVideoUrl" stepKey="validateStorefront">
597+
<argument name="section" value="SlideOnFrontend"/>
598+
<argument name="videoUrl" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
599+
<argument name="infiniteLoop" value="PageBuilderVideoBackgroundInfiniteLoop_Disabled"/>
600+
<argument name="lazyLoad" value="PageBuilderVideoBackgroundLazyLoad_Disabled"/>
601+
<argument name="playOnlyWhenVisible" value="PageBuilderVideoBackgroundPlayOnlyWhenVisible_Disabled"/>
602+
</actionGroup>
603+
</test>
604+
<test name="SliderCollageLeftValidateVideoBackground" extends="SliderPosterValidateVideoBackground">
605+
<annotations>
606+
<features value="PageBuilder"/>
607+
<stories value="Slider"/>
608+
<title value="Validate Video Background in Collage Left Slide"/>
609+
<description value="Set all video background attributes for a Collage Left Slide and validate on stage and storefront."/>
610+
<severity value="CRITICAL"/>
611+
<useCaseId value="PB-266"/>
612+
<testCaseId value="MC-31842"/>
613+
<group value="pagebuilder"/>
614+
<group value="pagebuilder-slide"/>
615+
<group value="pagebuilder-sliderCollageLeft"/>
616+
<group value="pagebuilder-video-background"/>
617+
</annotations>
618+
<actionGroup ref="chooseVisualSelectOption" stepKey="setAppearance">
619+
<argument name="property" value="PageBuilderAppearance_CollageLeft"/>
620+
</actionGroup>
621+
<actionGroup ref="validateVideoBackgroundWithAllAttributes" stepKey="validateStorefront">
622+
<argument name="section" value="SlideOnFrontend"/>
623+
<argument name="backgroundColor" value="{{PageBuilderBackgroundColor_Pink.rgb}}"/>
624+
<argument name="videoUrl" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
625+
<argument name="overlayColor" value="{{PageBuilderVideoBackgroundOverlayColor_Hex_Grey.rgba}}"/>
626+
<argument name="infiniteLoop" value="PageBuilderVideoBackgroundInfiniteLoop_Enabled"/>
627+
<argument name="lazyLoad" value="PageBuilderVideoBackgroundLazyLoad_Enabled"/>
628+
<argument name="playOnlyWhenVisible" value="PageBuilderVideoBackgroundPlayOnlyWhenVisible_Enabled"/>
629+
<argument name="fallbackImage" value="PageBuilderVideoBackgroundFallbackImage_JPG"/>
630+
</actionGroup>
631+
</test>
579632
</tests>

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

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,4 +477,57 @@
477477
<executeJS function="return Math.abs(Math.round({$overlayRightPositionAfterSave}-{$buttonRightPositionAfterSave}-30))" stepKey="overlayMinusButtonMinusPaddingAfterSave"/>
478478
<executeJS function="return Math.abs(Math.round({$overlayRightPositionStoreFront}-{$buttonRightPositionStoreFront}-30))" stepKey="overlayMinusButtonMinusPaddingStoreFront"/>
479479
</test>
480+
<test name="SliderCollageRightVideoBackgroundNoFallbackImageDisabledLoopAndPlayWhenVisibleAndLazyLoad" extends="SliderPosterVideoBackgroundNoFallbackImageDisabledLoopAndPlayWhenVisibleAndLazyLoad">
481+
<annotations>
482+
<features value="PageBuilder"/>
483+
<stories value="Slider"/>
484+
<title value="Validate Collage Right Slide with No Fallback Image, Disabled Infinite Loop, Disabled Play Only When Visible, and Disabled Lazy Load"/>
485+
<description value="Validate video background with no fallback image, disabled infinite loop, disabled play only when visible, and disabled lazy load."/>
486+
<severity value="MAJOR"/>
487+
<useCaseId value="PB-266"/>
488+
<testCaseId value="MC-31833"/>
489+
<group value="pagebuilder"/>
490+
<group value="pagebuilder-slide"/>
491+
<group value="pagebuilder-sliderCollageRight"/>
492+
<group value="pagebuilder-video-background"/>
493+
</annotations>
494+
<actionGroup ref="chooseVisualSelectOption" stepKey="setAppearance">
495+
<argument name="property" value="PageBuilderAppearance_CollageRight"/>
496+
</actionGroup>
497+
<actionGroup ref="validateVideoBackgroundWithOnlyVideoUrl" stepKey="validateStorefront">
498+
<argument name="section" value="SlideOnFrontend"/>
499+
<argument name="videoUrl" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
500+
<argument name="infiniteLoop" value="PageBuilderVideoBackgroundInfiniteLoop_Disabled"/>
501+
<argument name="lazyLoad" value="PageBuilderVideoBackgroundLazyLoad_Disabled"/>
502+
<argument name="playOnlyWhenVisible" value="PageBuilderVideoBackgroundPlayOnlyWhenVisible_Disabled"/>
503+
</actionGroup>
504+
</test>
505+
<test name="SliderCollageRightValidateVideoBackground" extends="SliderPosterValidateVideoBackground">
506+
<annotations>
507+
<features value="PageBuilder"/>
508+
<stories value="Slider"/>
509+
<title value="Validate Video Background in Collage Right Slide"/>
510+
<description value="Set all video background attributes for a Collage Right Slide and validate on stage and storefront."/>
511+
<severity value="CRITICAL"/>
512+
<useCaseId value="PB-266"/>
513+
<testCaseId value="MC-31840"/>
514+
<group value="pagebuilder"/>
515+
<group value="pagebuilder-slide"/>
516+
<group value="pagebuilder-sliderCollageRight"/>
517+
<group value="pagebuilder-video-background"/>
518+
</annotations>
519+
<actionGroup ref="chooseVisualSelectOption" stepKey="setAppearance">
520+
<argument name="property" value="PageBuilderAppearance_CollageRight"/>
521+
</actionGroup>
522+
<actionGroup ref="validateVideoBackgroundWithAllAttributes" stepKey="validateStorefront">
523+
<argument name="section" value="SlideOnFrontend"/>
524+
<argument name="backgroundColor" value="{{PageBuilderBackgroundColor_Pink.rgb}}"/>
525+
<argument name="videoUrl" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
526+
<argument name="overlayColor" value="{{PageBuilderVideoBackgroundOverlayColor_Hex_Grey.rgba}}"/>
527+
<argument name="infiniteLoop" value="PageBuilderVideoBackgroundInfiniteLoop_Enabled"/>
528+
<argument name="lazyLoad" value="PageBuilderVideoBackgroundLazyLoad_Enabled"/>
529+
<argument name="playOnlyWhenVisible" value="PageBuilderVideoBackgroundPlayOnlyWhenVisible_Enabled"/>
530+
<argument name="fallbackImage" value="PageBuilderVideoBackgroundFallbackImage_JPG"/>
531+
</actionGroup>
532+
</test>
480533
</tests>

0 commit comments

Comments
 (0)