Skip to content

Commit a25b362

Browse files
author
joiecaquicla
committed
Merge branch '636-functional-tests-on-mobile-viewport' of github.com:joweecaquicla/magento2-page-builder into 636-functional-tests-on-mobile-viewport
2 parents 35e518d + 4d9da7c commit a25b362

5 files changed

+347
-1
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Test/ViewportSwitcherMobile/ViewportSwitcherMobileSlideItemCollageCenterAppearanceThroughBlockContentTypeTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<argument name="property" value="PageBuilderAppearance_CollageCentered"/>
2626
</actionGroup>
2727
<!-- Validate CMS Block Stage Mobile Viewport -->
28+
<seeElement selector="{{SlideOnBackend.appearance('1', PageBuilderAppearance_CollageCentered.value)}}" stepKey="seeAppearanceCMSBlockStage" before="widthOfWrapperMinusPaddingCMSPageBackendMobile"/>
2829
<executeJS function="return Math.abs({{SlideOnBackend.wrapperJS('1')}}.getBoundingClientRect().width - {{PageBuilderPaddingProperty40.paddingLeft}} - {{PageBuilderPaddingProperty40.paddingRight}})" stepKey="widthOfWrapperMinusPaddingCMSPageBackendMobile" before="validateOverlayPositionCMSPageBackendMobile"/>
2930
<actionGroup ref="validateOverlayPositionCollageCenter" stepKey="validateOverlayPositionCMSPageBackendMobile">
3031
<argument name="page" value="SlideOnBackend"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="ViewportSwitcherMobileSlideItemCollageLeftAppearanceWithVideoBackgroundThroughBlockContentTypeTest">
11+
<annotations>
12+
<features value="PageBuilder"/>
13+
<stories value="Viewport Switcher"/>
14+
<title value="Render Slide Item CollageL eft Appearance with Video Background Through Block Content Type"/>
15+
<description value="Verify that users are able to successfully render the collage left slide content type with a video background through the Block content type."/>
16+
<severity value="CRITICAL"/>
17+
<group value="pagebuilder"/>
18+
<group value="pagebuilder-block"/>
19+
<group value="pagebuilder-block-content"/>
20+
<group value="pagebuilder-slider"/>
21+
<group value="pagebuilder-slide"/>
22+
<group value="pagebuilder-slideItemPoster"/>
23+
<group value="pagebuilder-video-background"/>
24+
<group value="pagebuilder-viewport-switcher"/>
25+
</annotations>
26+
<before>
27+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
28+
<createData entity="_emptyCmsPage" stepKey="createCMSPage"/>
29+
<createData entity="_emptyCmsBlock" stepKey="createCMSBlock"/>
30+
<actionGroup ref="NavigateToCreatedCMSBlockPageActionGroup" stepKey="navigateToCreatedCMSBlockPage1">
31+
<argument name="CMSBlockPage" value="$$createCMSBlock$$"/>
32+
</actionGroup>
33+
<actionGroup ref="AdminOpenPageBuilderFromContentPreviewOverlayActionGroup" stepKey="openPageBuilderFullScreen"/>
34+
</before>
35+
<after>
36+
<resizeWindow width="1280" height="1024" stepKey="resizeWindowToDesktop"/>
37+
<deleteData createDataKey="createCMSBlock" stepKey="deleteCMSBlock"/>
38+
<deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/>
39+
<actionGroup ref="NavigateToMediaGalleryActionGroup" stepKey="navigateToMediaGallery"/>
40+
<actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToFallbackImageFolder">
41+
<argument name="FolderName" value="{{PageBuilderVideoBackgroundFallbackImage_JPG.path}}"/>
42+
</actionGroup>
43+
<actionGroup ref="DeleteImageFromStorageActionGroup" stepKey="deleteFallbackImage">
44+
<argument name="Image" value="PageBuilderVideoBackgroundFallbackImage_JPG"/>
45+
</actionGroup>
46+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
47+
</after>
48+
<!-- Add Slider to Stage -->
49+
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSection">
50+
<argument name="contentType" value="PageBuilderSliderContentType"/>
51+
</actionGroup>
52+
<actionGroup ref="dragContentTypeToStage" stepKey="dragSliderIntoStage">
53+
<argument name="contentType" value="PageBuilderSliderContentType"/>
54+
</actionGroup>
55+
<!-- Set Video Background on Poster appearance Slide -->
56+
<actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditPanelAfterDrop">
57+
<argument name="section" value="SlideOnBackend"/>
58+
</actionGroup>
59+
<actionGroup ref="chooseVisualSelectOption" stepKey="setAppearance">
60+
<argument name="property" value="PageBuilderAppearance_CollageLeft"/>
61+
</actionGroup>
62+
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterMinHeightProperty">
63+
<argument name="property" value="PageBuilderMinHeightProperty_300px"/>
64+
</actionGroup>
65+
<!-- Update All Video Background Fields -->
66+
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBackgroundColor">
67+
<argument name="property" value="PageBuilderBackgroundColor_Pink"/>
68+
</actionGroup>
69+
<actionGroup ref="chooseVisualSelectOption" stepKey="setBackgroundType">
70+
<argument name="property" value="PageBuilderBackgroundType_Video"/>
71+
</actionGroup>
72+
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterVideoUrl">
73+
<argument name="property" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
74+
</actionGroup>
75+
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterOverlayColor">
76+
<argument name="property" value="PageBuilderVideoBackgroundOverlayColor_Hex_Grey"/>
77+
</actionGroup>
78+
<actionGroup ref="conditionalClickSlideOutPanelFieldGeneral" stepKey="setInfiniteLoop">
79+
<argument name="property" value="PageBuilderVideoBackgroundInfiniteLoop_Enabled"/>
80+
</actionGroup>
81+
<actionGroup ref="conditionalClickSlideOutPanelFieldGeneral" stepKey="setLazyLoad">
82+
<argument name="property" value="PageBuilderVideoBackgroundLazyLoad_Enabled"/>
83+
</actionGroup>
84+
<actionGroup ref="conditionalClickSlideOutPanelFieldGeneral" stepKey="setPlayOnlyWhenVisible">
85+
<argument name="property" value="PageBuilderVideoBackgroundPlayOnlyWhenVisible_Enabled"/>
86+
</actionGroup>
87+
<actionGroup ref="attachFileSlideOutProperty" stepKey="attachFallbackImage">
88+
<argument name="property" value="PageBuilderVideoBackgroundFallbackImage_JPG"/>
89+
</actionGroup>
90+
<actionGroup ref="selectSlideOutPanelField" stepKey="selectShowButton">
91+
<argument name="property" value="PageBuilderSlideItemShowButton_Always"/>
92+
</actionGroup>
93+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
94+
<!-- Validate Stage on Viewport Desktop -->
95+
<actionGroup ref="validateVideoBackgroundWithAllAttributes" stepKey="validateCMSBlockStage">
96+
<argument name="section" value="SlideOnBackend"/>
97+
<argument name="backgroundColor" value="{{PageBuilderBackgroundColor_Pink.rgb}}"/>
98+
<argument name="videoUrl" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
99+
<argument name="overlayColor" value="{{PageBuilderVideoBackgroundOverlayColor_Hex_Grey.rgba}}"/>
100+
<argument name="infiniteLoop" value="PageBuilderVideoBackgroundInfiniteLoop_Enabled"/>
101+
<argument name="lazyLoad" value="PageBuilderVideoBackgroundLazyLoad_Enabled"/>
102+
<argument name="playOnlyWhenVisible" value="PageBuilderVideoBackgroundPlayOnlyWhenVisible_Enabled"/>
103+
<argument name="fallbackImage" value="PageBuilderVideoBackgroundFallbackImage_JPG"/>
104+
</actionGroup>
105+
<actionGroup ref="doubleClickToInlineEditWYSIWYGFromStage" stepKey="inlineEdit">
106+
<argument name="contentType" value="PageBuilderSlideContentType"/>
107+
<argument name="content" value="{{PageBuilderSlideItemContent_Slide1.value}}"/>
108+
</actionGroup>
109+
<actionGroup ref="inlineEditSlideOrBannerButton" stepKey="inlineEditSlideButton">
110+
<argument name="text" value="{{PageBuilderSlideItemButtonText_Slide1.value}}"/>
111+
</actionGroup>
112+
<waitForElementVisible selector="{{SlideOnBackend.messageContent('1', PageBuilderSlideItemContent_Slide1.value)}}" stepKey="waitForMessageContentCMSBlockStage"/>
113+
<waitForElementVisible selector="{{SlideOnBackend.buttonText('1', PageBuilderSlideItemButtonText_Slide1.value)}}" stepKey="waitForButtonTextCMSBlockStage"/>
114+
<!-- Validate Stage on Viewport mobile -->
115+
<actionGroup ref="AdminSwitchPageBuilderViewportActionGroup" stepKey="switchToMobileViewportForValidateStage">
116+
<argument name="viewportButton" value="mobile"/>
117+
<argument name="viewportStage" value="mobile"/>
118+
</actionGroup>
119+
<actionGroup ref="validateVideoBackgroundWithAllAttributes" stepKey="validateCMSBlockStageMobile">
120+
<argument name="section" value="SlideOnBackend"/>
121+
<argument name="backgroundColor" value="{{PageBuilderBackgroundColor_Pink.rgb}}"/>
122+
<argument name="videoUrl" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
123+
<argument name="overlayColor" value="{{PageBuilderVideoBackgroundOverlayColor_Hex_Grey.rgba}}"/>
124+
<argument name="infiniteLoop" value="PageBuilderVideoBackgroundInfiniteLoop_Enabled"/>
125+
<argument name="lazyLoad" value="PageBuilderVideoBackgroundLazyLoad_Enabled"/>
126+
<argument name="playOnlyWhenVisible" value="PageBuilderVideoBackgroundPlayOnlyWhenVisible_Enabled"/>
127+
<argument name="fallbackImage" value="PageBuilderVideoBackgroundFallbackImage_JPG"/>
128+
</actionGroup>
129+
<actionGroup ref="doubleClickToInlineEditWYSIWYGFromStage" stepKey="inlineEditMobile">
130+
<argument name="contentType" value="PageBuilderSlideContentType"/>
131+
<argument name="content" value="{{PageBuilderSlideItemContent_Slide1.value}}"/>
132+
</actionGroup>
133+
<waitForElementVisible selector="{{SlideOnBackend.messageContent('1', PageBuilderSlideItemContent_Slide1.value)}}" stepKey="waitForMessageContentCMSBlockStageMobile"/>
134+
<waitForElementVisible selector="{{SlideOnBackend.buttonText('1', PageBuilderSlideItemButtonText_Slide1.value)}}" stepKey="waitForButtonTextCMSBlockStageMobile"/>
135+
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreenBeforeSaveMobile"/>
136+
<actionGroup ref="SaveCMSBlockActionGroup" stepKey="saveCMSBlockMobile"/>
137+
<actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPageMobile">
138+
<argument name="CMSPage" value="$$createCMSPage$$"/>
139+
</actionGroup>
140+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStageMobile"/>
141+
<!-- Edit Row On CMS Page -->
142+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuRowCMSPage">
143+
<argument name="contentType" value="PageBuilderRowContentType"/>
144+
</actionGroup>
145+
<actionGroup ref="chooseVisualSelectOption" stepKey="enterAppearanceCMSPage">
146+
<argument name="property" value="PageBuilderRowAppearance_FullBleed"/>
147+
</actionGroup>
148+
<actionGroup ref="fillSlideOutPanelFieldPadding" stepKey="enterPaddingCMSPage">
149+
<argument name="property" value="PageBuilderPaddingPropertyDefault"/>
150+
</actionGroup>
151+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsRowCMSPage"/>
152+
<!-- Add Block to CMS Page -->
153+
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPanelAddContentMenuSection">
154+
<argument name="contentType" value="PageBuilderBlockContentType"/>
155+
</actionGroup>
156+
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
157+
<argument name="contentType" value="PageBuilderBlockContentType"/>
158+
</actionGroup>
159+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditAfterDropBlock">
160+
<argument name="contentType" value="PageBuilderBlockContentType"/>
161+
</actionGroup>
162+
<actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid">
163+
<argument name="block" value="$$createCMSBlock$$"/>
164+
</actionGroup>
165+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsBlock"/>
166+
<!-- Validate CMS Page Stage on Viewport Desktop-->
167+
<actionGroup ref="validateVideoBackgroundWithAllAttributes" stepKey="validateCMSPageStage">
168+
<argument name="section" value="SlideOnFrontend"/>
169+
<argument name="backgroundColor" value="{{PageBuilderBackgroundColor_Pink.rgb}}"/>
170+
<argument name="videoUrl" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
171+
<argument name="overlayColor" value="{{PageBuilderVideoBackgroundOverlayColor_Hex_Grey.rgba}}"/>
172+
<argument name="infiniteLoop" value="PageBuilderVideoBackgroundInfiniteLoop_Enabled"/>
173+
<argument name="lazyLoad" value="PageBuilderVideoBackgroundLazyLoad_Enabled"/>
174+
<argument name="playOnlyWhenVisible" value="PageBuilderVideoBackgroundPlayOnlyWhenVisible_Enabled"/>
175+
<argument name="fallbackImage" value="PageBuilderVideoBackgroundFallbackImage_JPG"/>
176+
</actionGroup>
177+
<waitForElementVisible selector="{{SlideOnFrontend.messageContent('1', PageBuilderSlideItemContent_Slide1.value)}}" stepKey="waitForMessageContentCMSPageStage"/>
178+
<waitForElementVisible selector="{{SlideOnFrontend.buttonText('1', PageBuilderSlideItemButtonText_Slide1.value)}}" stepKey="waitForButtonTextCMSPageStage"/>
179+
<!-- Validate CMS Page Stage on Viewport mobile-->
180+
<actionGroup ref="AdminSwitchPageBuilderViewportActionGroup" stepKey="switchToMobileViewportForValidateCMSPage">
181+
<argument name="viewportButton" value="mobile"/>
182+
<argument name="viewportStage" value="mobile"/>
183+
</actionGroup>
184+
<actionGroup ref="validateVideoBackgroundWithAllAttributes" stepKey="validateCMSPageStageMobile">
185+
<argument name="section" value="SlideOnFrontend"/>
186+
<argument name="backgroundColor" value="{{PageBuilderBackgroundColor_Pink.rgb}}"/>
187+
<argument name="videoUrl" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
188+
<argument name="overlayColor" value="{{PageBuilderVideoBackgroundOverlayColor_Hex_Grey.rgba}}"/>
189+
<argument name="infiniteLoop" value="PageBuilderVideoBackgroundInfiniteLoop_Enabled"/>
190+
<argument name="lazyLoad" value="PageBuilderVideoBackgroundLazyLoad_Enabled"/>
191+
<argument name="playOnlyWhenVisible" value="PageBuilderVideoBackgroundPlayOnlyWhenVisible_Enabled"/>
192+
<argument name="fallbackImage" value="PageBuilderVideoBackgroundFallbackImage_JPG"/>
193+
</actionGroup>
194+
<waitForElementVisible selector="{{SlideOnFrontend.messageContent('1', PageBuilderSlideItemContent_Slide1.value)}}" stepKey="waitForMessageContentCMSPageStageMobile"/>
195+
<waitForElementVisible selector="{{SlideOnFrontend.buttonText('1', PageBuilderSlideItemButtonText_Slide1.value)}}" stepKey="waitForButtonTextCMSPageStageMobile"/>
196+
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreenMobile"/>
197+
<actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPageMobile"/>
198+
<!-- Validate Storefront on Desktop -->
199+
<actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToStorefront">
200+
<argument name="page" value="$$createCMSPage.identifier$$"/>
201+
</actionGroup>
202+
<actionGroup ref="validateVideoBackgroundWithAllAttributes" stepKey="validateStorefront">
203+
<argument name="section" value="SlideOnFrontend"/>
204+
<argument name="backgroundColor" value="{{PageBuilderBackgroundColor_Pink.rgb}}"/>
205+
<argument name="videoUrl" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
206+
<argument name="overlayColor" value="{{PageBuilderVideoBackgroundOverlayColor_Hex_Grey.rgba}}"/>
207+
<argument name="infiniteLoop" value="PageBuilderVideoBackgroundInfiniteLoop_Enabled"/>
208+
<argument name="lazyLoad" value="PageBuilderVideoBackgroundLazyLoad_Enabled"/>
209+
<argument name="playOnlyWhenVisible" value="PageBuilderVideoBackgroundPlayOnlyWhenVisible_Enabled"/>
210+
<argument name="fallbackImage" value="PageBuilderVideoBackgroundFallbackImage_JPG"/>
211+
</actionGroup>
212+
<waitForElementVisible selector="{{SlideOnFrontend.messageContent('1', PageBuilderSlideItemContent_Slide1.value)}}" stepKey="waitForMessageContentStorefront"/>
213+
<waitForElementVisible selector="{{SlideOnFrontend.buttonText('1', PageBuilderSlideItemButtonText_Slide1.value)}}" stepKey="waitForButtonTextStorefront"/>
214+
<!-- Validate Storefront on Mobile -->
215+
<resizeWindow width="767" height="1000" stepKey="resizeWindowToMobile"/>
216+
<actionGroup ref="validateVideoBackgroundWithAllAttributes" stepKey="validateStorefrontMobile">
217+
<argument name="section" value="SlideOnFrontend"/>
218+
<argument name="backgroundColor" value="{{PageBuilderBackgroundColor_Pink.rgb}}"/>
219+
<argument name="videoUrl" value="PageBuilderVideoBackgroundUrl_YouTube_Embedded"/>
220+
<argument name="overlayColor" value="{{PageBuilderVideoBackgroundOverlayColor_Hex_Grey.rgba}}"/>
221+
<argument name="infiniteLoop" value="PageBuilderVideoBackgroundInfiniteLoop_Enabled"/>
222+
<argument name="lazyLoad" value="PageBuilderVideoBackgroundLazyLoad_Enabled"/>
223+
<argument name="playOnlyWhenVisible" value="PageBuilderVideoBackgroundPlayOnlyWhenVisible_Enabled"/>
224+
<argument name="fallbackImage" value="PageBuilderVideoBackgroundFallbackImage_JPG"/>
225+
</actionGroup>
226+
<waitForElementVisible selector="{{SlideOnFrontend.messageContent('1', PageBuilderSlideItemContent_Slide1.value)}}" stepKey="waitForMessageContentStorefrontMobile"/>
227+
<waitForElementVisible selector="{{SlideOnFrontend.buttonText('1', PageBuilderSlideItemButtonText_Slide1.value)}}" stepKey="waitForButtonTextStorefrontMobile"/>
228+
</test>
229+
</tests>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="ViewportSwitcherMobileSlideItemCollageRightAppearanceWithVideoBackgroundThroughBlockContentTypeTest" extends="ViewportSwitcherMobileSlideItemCollageLeftAppearanceWithVideoBackgroundThroughBlockContentTypeTest">
11+
<annotations>
12+
<features value="PageBuilder"/>
13+
<stories value="Viewport Switcher"/>
14+
<title value="Render Slide Item Collage Right Appearance with Video Background Through Block Content Type"/>
15+
<description value="Verify that users are able to successfully render the collage right slide content type with a video background through the Block content type."/>
16+
<severity value="CRITICAL"/>
17+
<group value="pagebuilder"/>
18+
<group value="pagebuilder-block"/>
19+
<group value="pagebuilder-block-content"/>
20+
<group value="pagebuilder-slider"/>
21+
<group value="pagebuilder-slide"/>
22+
<group value="pagebuilder-slideItemCollageRight"/>
23+
<group value="pagebuilder-video-background"/>
24+
<group value="pagebuilder-viewport-switcher"/>
25+
</annotations>
26+
<actionGroup ref="chooseVisualSelectOption" stepKey="setAppearance">
27+
<argument name="property" value="PageBuilderAppearance_CollageRight"/>
28+
</actionGroup>
29+
</test>
30+
</tests>

0 commit comments

Comments
 (0)