Skip to content

Commit b82b6aa

Browse files
committed
#636-functional-tests-on-mobile-viewport
- fix ViewportSwitcherMobileSlideItemCollageCenterAppearanceThroughBlockContentTypeTest
1 parent e4ea120 commit b82b6aa

File tree

1 file changed

+27
-14
lines changed

1 file changed

+27
-14
lines changed

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

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,33 +25,46 @@
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"/>
29-
<executeJS function="return Math.abs({{SlideOnBackend.wrapperJS('1')}}.getBoundingClientRect().width - {{PageBuilderPaddingProperty40.paddingLeft}} - {{PageBuilderPaddingProperty40.paddingRight}})" stepKey="widthOfWrapperMinusPaddingCMSPageBackendMobile" before="validateOverlayPositionCMSPageBackendMobile"/>
30-
<actionGroup ref="validateOverlayPositionCollageCenter" stepKey="validateOverlayPositionCMSPageBackendMobile">
28+
<seeElement selector="{{SlideOnBackend.appearance('1', PageBuilderAppearance_CollageCentered.value)}}" stepKey="seeAppearanceCMSBlockStageMobile"/>
29+
<actionGroup ref="validateOverlayPositionCollageCenter" stepKey="validateOverlayPositionCMSBlockStageMobile">
30+
<argument name="page" value="SlideOnBackend"/>
31+
</actionGroup>
32+
<seeElement selector="{{SlideOnBackend.collageMinimumHeight('1', PageBuilderMinHeightProperty_300px.value)}}" stepKey="seeMinimumHeightCMSBlockStageMobile"/>
33+
<moveMouseOver selector="{{SlideOnBackend.appearance('1', PageBuilderAppearance_CollageCentered.value)}}" stepKey="moveMouseOverSlideCMSBlockStageMobile"/>
34+
<executeJS function="return Math.abs(Math.round({$buttonLeftPositionCMSBlockStageMobile}-{$overlayLeftPositionCMSBlockStageMobile}-30))" stepKey="buttonMinusOverlayMinusPaddingCMSBlockStageMobile"/>
35+
<!-- Validate CMS Block Stage Desktop Viewport-->
36+
<seeElement selector="{{SlideOnFrontend.appearance('1', PageBuilderAppearance_CollageCentered.value)}}" stepKey="seeAppearanceCMSBlockStage"/>
37+
<actionGroup ref="validateOverlayPositionCollageCenter" stepKey="validateOverlayPositionCMSBlockStage">
3138
<argument name="page" value="SlideOnBackend"/>
32-
<argument name="expectedOverlayWidth" value="{$widthOfWrapperMinusPaddingCMSPageBackendMobile}"/>
3339
</actionGroup>
34-
35-
<seeElement selector="{{SlideOnBackend.collageMinimumHeight('1', PageBuilderMinHeightProperty_200px.value)}}" stepKey="seeMinimumHeightCMSBlockStage"/>
3640
<moveMouseOver selector="{{SlideOnBackend.appearance('1', PageBuilderAppearance_CollageCentered.value)}}" stepKey="moveMouseOverSlideCMSBlockStage"/>
3741
<executeJS function="return Math.abs(Math.round({$buttonLeftPositionCMSBlockStage}-{$overlayLeftPositionCMSBlockStage}-30))" stepKey="buttonMinusOverlayMinusPaddingCMSBlockStage"/>
38-
<seeElement selector="{{SlideOnFrontend.appearance('1', PageBuilderAppearance_CollageCentered.value)}}" stepKey="seeAppearanceCMSPageStage"/>
39-
<actionGroup ref="validateOverlayPositionCollageCenter" stepKey="validateOverlayPositionCMSPageStage">
42+
<!-- Validate CMS Page Stage Mobile Viewport-->
43+
<seeElement selector="{{SlideOnFrontend.appearance('1', PageBuilderAppearance_CollageCentered.value)}}" stepKey="seeAppearanceCMSPageStageMobile"/>
44+
<actionGroup ref="validateOverlayPositionCollageCenter" stepKey="validateOverlayPositionCMSPageStageMobile">
45+
<argument name="page" value="SlideOnFrontend"/>
46+
</actionGroup>
47+
<executeJS function="return Math.abs(Math.round({$buttonLeftPositionCMSPageStageMobile}-{$overlayLeftPositionCMSPageStageMobile}-30))" stepKey="buttonMinusOverlayMinusPaddingCMSPageStageMobile"/>
48+
<!-- Validate CMS Block Stage Desktop Viewport after Save-->
49+
<seeElement selector="{{SlideOnFrontend.appearance('1', PageBuilderAppearance_CollageCentered.value)}}" stepKey="seeAppearanceCMSPageStageAfterSave"/>
50+
<actionGroup ref="validateOverlayPositionCollageCenter" stepKey="validateOverlayPositionCMSPageStageAfterSave">
4051
<argument name="page" value="SlideOnFrontend"/>
4152
</actionGroup>
42-
43-
<executeJS function="return Math.abs(Math.round({$buttonLeftPositionCMSPageStage}-{$overlayLeftPositionCMSPageStage}-30))" stepKey="buttonMinusOverlayMinusPaddingCMSPageStage"/>
53+
<executeJS function="return Math.abs(Math.round({$buttonLeftPositionCMSPageStageAfterSave}-{$overlayLeftPositionCMSPageStageAfterSave}-30))" stepKey="buttonMinusOverlayMinusPaddingCMSPageStageAfterSave"/>
54+
<!-- Validate CMS Page Storefront -->
4455
<seeElement selector="{{SlideOnFrontend.appearance('1', PageBuilderAppearance_CollageCentered.value)}}" stepKey="seeAppearanceCMSPageStorefront"/>
4556
<actionGroup ref="validateOverlayPositionCollageCenter" stepKey="validateOverlayPositionCMSPageStorefront">
4657
<argument name="page" value="SlideOnFrontend"/>
4758
</actionGroup>
48-
4959
<moveMouseOver selector="{{SlideOnFrontend.appearance('1', PageBuilderAppearance_CollageCentered.value)}}" stepKey="moveMouseOverSlideCMSPageStorefront"/>
5060
<executeJS function="return Math.abs(Math.round({$buttonLeftPositionCMSPageStorefront}-{$overlayLeftPositionCMSPageStorefront}-30))" stepKey="buttonMinusOverlayMinusPaddingCMSPageStorefront"/>
51-
<executeJS function="return Math.abs({{SlideOnFrontend.wrapperJS('1')}}.getBoundingClientRect().width - {{PageBuilderPaddingProperty40.paddingLeft}} - {{PageBuilderPaddingProperty40.paddingRight}})" stepKey="widthOfWrapperMinusPaddingCMSPageStorefrontMobile" before="validateOverlayPositionCMSPageStorefrontMobile"/>
61+
<!-- Validate CMS Page Storefront Mobile -->
62+
<seeElement selector="{{SlideOnFrontend.appearance('1', PageBuilderAppearance_CollageCentered.value)}}" stepKey="seeAppearanceCMSPageStorefrontMobile"/>
63+
<executeJS function="return Math.abs({{SlideOnFrontend.wrapperJS('1')}}.getBoundingClientRect().width - {{PageBuilderPaddingProperty40.paddingLeft}} - {{PageBuilderPaddingProperty40.paddingRight}})" stepKey="widthOfWrapperMinusPaddingCMSBlockStageFrontend" before="validateOverlayPositionCMSPageStorefrontMobile"/>
5264
<actionGroup ref="validateOverlayPositionCollageCenter" stepKey="validateOverlayPositionCMSPageStorefrontMobile">
5365
<argument name="page" value="SlideOnFrontend"/>
54-
<argument name="expectedOverlayWidth" value="{$widthOfWrapperMinusPaddingCMSPageStorefrontMobile}"/>
66+
<argument name="expectedOverlayWidth" value="{$widthOfWrapperMinusPaddingCMSBlockStageFrontend}"/>
5567
</actionGroup>
56-
</test>
68+
<moveMouseOver selector="{{SlideOnFrontend.appearance('1', PageBuilderAppearance_CollageCentered.value)}}" stepKey="moveMouseOverSlideCMSPageStorefrontMobile"/>
69+
</test>
5770
</tests>

0 commit comments

Comments
 (0)