Skip to content

Commit 1975702

Browse files
authored
Merge pull request #12 from magento-gl/MQE-3576_ver2
Mqe 3576 ver2
2 parents 67f529c + 5112514 commit 1975702

File tree

8 files changed

+39
-41
lines changed

8 files changed

+39
-41
lines changed

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/ContentTypeBlockActionGroup/VerifyVerticalAlignmentCenterInBlockActionGroup.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
*/
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10-
<actionGroup name="verifyVerticalAlignmentCenterInBlock">
11-
<arguments>
12-
<argument name="block" defaultValue="BlockOnStorefront"/>
13-
<argument name="container"/>
14-
<argument name="containerIndex" defaultValue="1" type="string"/>
15-
<argument name="content"/>
16-
<argument name="contentIndex" defaultValue="1" type="string"/>
17-
</arguments>
18-
<executeJS function="return document.querySelectorAll('{{block.baseCSS}} {{container.baseCSS}}')[{{containerIndex}}-1].clientHeight/2 + document.querySelectorAll('{{block.baseCSS}} {{container.baseCSS}}')[{{containerIndex}}-1].getBoundingClientRect().top" stepKey="containerCenter"/>
19-
<executeJS function="return document.querySelectorAll('{{block.baseCSS}} {{content.baseCSS}}')[{{contentIndex}}-1].clientHeight/2 + document.querySelectorAll('{{block.baseCSS}} {{content.baseCSS}}')[{{contentIndex}}-1].getBoundingClientRect().top" stepKey="contentCenter"/>
20-
<assertGreaterThanOrEqual stepKey="assertBottomPosition">
21-
<expectedResult type="variable">containerCenter</expectedResult>
22-
<actualResult type="variable">contentCenter</actualResult>
23-
</assertGreaterThanOrEqual>
24-
</actionGroup>
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="verifyVerticalAlignmentCenterInBlock">
11+
<arguments>
12+
<argument name="block" defaultValue="BlockOnStorefront"/>
13+
<argument name="container"/>
14+
<argument name="containerIndex" defaultValue="1" type="string"/>
15+
<argument name="content"/>
16+
<argument name="contentIndex" defaultValue="1" type="string"/>
17+
</arguments>
18+
<executeJS function="return Math.round(document.querySelectorAll('{{block.baseCSS}} {{container.baseCSS}}')[{{containerIndex}}-1].clientHeight/2 + document.querySelectorAll('{{block.baseCSS}} {{container.baseCSS}}')[{{containerIndex}}-1].getBoundingClientRect().top)" stepKey="containerCenter"/>
19+
<executeJS function="return Math.round(document.querySelectorAll('{{block.baseCSS}} {{content.baseCSS}}')[{{contentIndex}}-1].clientHeight/2 + document.querySelectorAll('{{block.baseCSS}} {{content.baseCSS}}')[{{contentIndex}}-1].getBoundingClientRect().top)" stepKey="contentCenter"/>
20+
<assertEquals stepKey="assertBottomPosition">
21+
<expectedResult type="variable">containerCenter</expectedResult>
22+
<actualResult type="variable">contentCenter</actualResult>
23+
</assertEquals>
24+
</actionGroup>
2525
</actionGroups>

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
*/
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
9-
<actionGroup name="ValidateContentTypesStyleEqualsExpectedStyleActionGroup">
10-
<annotations>
11-
<description>Content types expected style equals the computed style</description>
12-
</annotations>
13-
<arguments>
14-
<argument name="selector" type="string"/>
15-
<argument name="expectedProperty" type="string"/>
16-
<argument name="cssProperty" defaultValue="backgroundColor" type="string"/>
17-
</arguments>
18-
<executeJS function="return window.getComputedStyle(document.evaluate('{{selector}}', document.body).iterateNext()).{{cssProperty}}.replace(/px/g, &quot;&quot;)" stepKey="fetchedProperty"/>
19-
<assertEquals stepKey="propertyIsEqualsAsExpected">
20-
<expectedResult type="string">{{expectedProperty}}</expectedResult>
21-
<actualResult type="variable">fetchedProperty</actualResult>
22-
</assertEquals>
23-
</actionGroup>
9+
<actionGroup name="ValidateContentTypesStyleEqualsExpectedStyleActionGroup">
10+
<annotations>
11+
<description>Content types expected style equals the computed style</description>
12+
</annotations>
13+
<arguments>
14+
<argument name="selector" type="string"/>
15+
<argument name="expectedProperty" type="string"/>
16+
<argument name="cssProperty" defaultValue="backgroundColor" type="string"/>
17+
</arguments>
18+
<executeJS function="return window.getComputedStyle(document.evaluate('{{selector}}', document.body).iterateNext()).{{cssProperty}}.replace(/px/g, &quot;&quot;)" stepKey="fetchedProperty"/>
19+
<assertEquals stepKey="propertyIsEqualsAsExpected">
20+
<expectedResult type="string">{{expectedProperty}}</expectedResult>
21+
<actualResult type="variable">fetchedProperty</actualResult>
22+
</assertEquals>
23+
</actionGroup>
2424
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderBannerCollageCenterAppearanceTest/BannerCollageCenterButtonOnHoverTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
</actionGroup>
8686
<seeElementInDOM selector="{{BannerOnFrontend.button('1')}}" stepKey="seeButtonInDOMStorefront"/>
8787
<dontSeeElement selector="{{BannerOnFrontend.button('1')}}" stepKey="dontSeeButtonStorefront"/>
88-
<moveMouseOver selector="{{BannerOnFrontend.base('1')}}" stepKey="moveMouseOverBannerStorefront"/>
88+
<moveMouseOver selector="{{BannerOnFrontend.base('1')}}" x="50" y="50" stepKey="moveMouseOverBannerStorefront"/>
8989
<seeElement selector="{{BannerOnFrontend.button('1')}}" stepKey="seeButtonOnHoverStorefront"/>
9090
<moveMouseOver selector="{{BannerOnFrontend.base('1')}}" x="-1" y="0" stepKey="moveMouseAwayFromBanner"/>
9191
<!-- Validate Storefront Mobile -->

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderBannerCollageLeftAppearanceTest/BannerCollageLeftButtonOnHoverTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@
8585
</actionGroup>
8686
<seeElementInDOM selector="{{BannerOnFrontend.button('1')}}" stepKey="seeButtonInDOMStorefront"/>
8787
<dontSeeElement selector="{{BannerOnFrontend.button('1')}}" stepKey="dontSeeButtonStorefront"/>
88-
<moveMouseOver selector="{{BannerOnFrontend.base('1')}}" stepKey="moveMouseOverBannerStorefront"/>
89-
<seeElement selector="{{BannerOnFrontend.button('1')}}" stepKey="seeButtonOnHoverStorefront"/>
88+
<moveMouseOver selector="{{BannerOnFrontend.base('1')}}" x="50" y="50" stepKey="moveMouseOverBannerStorefront"/> <seeElement selector="{{BannerOnFrontend.button('1')}}" stepKey="seeButtonOnHoverStorefront"/>
9089
<moveMouseOver selector="{{BannerOnFrontend.base('1')}}" x="-1" y="0" stepKey="moveMouseAwayFromBanner"/>
9190
<!-- Validate Storefront Mobile -->
9291
<comment userInput="Validate Storefront Mobile" stepKey="commentValidateStorefrontMobile"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderBannerPosterAppearanceTest/BannerPosterButtonOnHoverTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@
8585
</actionGroup>
8686
<seeElementInDOM selector="{{BannerOnFrontend.button('1')}}" stepKey="seeButtonInDOMStorefront"/>
8787
<dontSeeElement selector="{{BannerOnFrontend.button('1')}}" stepKey="dontSeeButtonStorefront"/>
88-
<moveMouseOver selector="{{BannerOnFrontend.base('1')}}" stepKey="moveMouseOverBannerStorefront"/>
89-
<seeElement selector="{{BannerOnFrontend.button('1')}}" stepKey="seeButtonOnHoverStorefront"/>
88+
<moveMouseOver selector="{{BannerOnFrontend.base('1')}}" x="50" y="50" stepKey="moveMouseOverBannerStorefront"/> <seeElement selector="{{BannerOnFrontend.button('1')}}" stepKey="seeButtonOnHoverStorefront"/>
9089
<moveMouseOver selector="{{BannerOnFrontend.base('1')}}" x="-1" y="0" stepKey="moveMouseAwayFromBanner"/>
9190
<!-- Validate Storefront Mobile -->
9291
<comment userInput="Validate Storefront Mobile" stepKey="commentValidateStorefrontMobile"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderBannerPosterAppearanceTest/BannerPosterOverlayAndButtonOnHoverTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Transparent.rgb}}"/>
113113
<argument name="cssProperty" value="backgroundColor"/>
114114
</actionGroup>
115-
<moveMouseOver selector="{{BannerOnFrontend.base('1')}}" stepKey="moveMouseOverBannerStorefront"/>
115+
<moveMouseOver selector="{{BannerOnFrontend.base('1')}}" x="50" y="50" stepKey="moveMouseOverBannerStorefront"/>
116116
<waitForPageLoad time="30" stepKey="waitForTransitionStorefront"/>
117117
<seeElement selector="{{BannerOnFrontend.button('1')}}" stepKey="seeButtonOnHoverStorefront"/>
118118
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="seeOverlayOnHoverStorefront">

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderBlockRenderMediaContentTypesTest/BlockRenderBannerPosterAppearanceThroughBlockContentTypeTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@
300300
<argument name="expectedProperty" value="{{PageBuilderBannerOverlayColorDefaultProperty.rgb}}"/>
301301
<argument name="cssProperty" value="backgroundColor"/>
302302
</actionGroup>
303-
<moveMouseOver selector="{{BannerOnFrontend.appearance('1', PageBuilderAppearance_Poster.value)}}" stepKey="moveMouseOverBannerCMSPageStorefront"/>
303+
<moveMouseOver selector="{{BannerOnFrontend.appearance('1', PageBuilderAppearance_Poster.value)}}" x="50" y="50" stepKey="moveMouseOverBannerCMSPageStorefront"/>
304304
<wait time="3" stepKey="waitAfterMouseOverBannerCMSPageStorefront"/>
305305
<waitForElementVisible selector="{{BannerOnFrontend.button('1')}}" stepKey="seeButtonOnHoverCMSPageStorefront"/>
306306
<waitForElementVisible selector="{{BannerOnFrontend.buttonText('1', PageBuilderBannerButtonTextProperty.value)}}" stepKey="seeButtonTextOnHoverCMSPageStorefront"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderBlockRenderMediaContentTypesTest/BlockRenderSlideItemPosterAppearanceThroughBlockContentTypeTest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@
300300
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Transparent.rgb}}"/>
301301
<argument name="cssProperty" value="backgroundColor"/>
302302
</actionGroup>
303-
<moveMouseOver selector="{{SlideOnFrontend.appearance('1', PageBuilderAppearance_Poster.value)}}" stepKey="moveMouseOverSlideCMSPageStorefront"/>
303+
<moveMouseOver selector="{{SlideOnFrontend.appearance('1', PageBuilderAppearance_Poster.value)}}" x="50" y="50" stepKey="moveMouseOverSlideCMSPageStorefront"/>
304304
<seeElement selector="{{SlideOnFrontend.button('1')}}" stepKey="seeButtonOnHoverCMSPageStorefront"/>
305305
<seeElement selector="{{SlideOnFrontend.buttonText('1', PageBuilderSlideItemButtonText_Common.value)}}" stepKey="seeButtonTextOnHoverCMSPageStorefront"/>
306306
<seeElement selector="{{SlideOnFrontend.buttonType('1', PageBuilderSlideItemButtonType_Secondary.value)}}" stepKey="seeButtonTypeOnHoverCMSPageStorefront"/>
@@ -353,7 +353,7 @@
353353
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Transparent.rgb}}"/>
354354
<argument name="cssProperty" value="backgroundColor"/>
355355
</actionGroup>
356-
<moveMouseOver selector="{{SlideOnFrontend.base('1')}}" stepKey="moveMouseOverSlideCMSPageStorefrontMobile"/>
356+
<moveMouseOver selector="{{SlideOnFrontend.base('1')}}" x="50" y="50" stepKey="moveMouseOverSlideCMSPageStorefrontMobile"/>
357357
<waitForPageLoad time="30" stepKey="waitForSlideTransitionStorefrontMobile"/>
358358
<seeElement selector="{{SlideOnFrontend.button('1')}}" stepKey="seeButtonOnHoverCMSPageStorefrontMobile"/>
359359
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="seeOverlayOnHoverCMSPageStorefrontMobile">
@@ -367,4 +367,4 @@
367367
<wait time="3" stepKey="waitArbitraryTimeForPotentialNavigationToOccurCMSPageStorefrontMobile"/>
368368
<seeCurrentUrlEquals url="{{PageBuilderSlideItemLinkURL_External.value}}" stepKey="seeThatUrlIsChangedToButtonUrlCMSPageStorefrontMobile"/>
369369
</test>
370-
</tests>
370+
</tests>

0 commit comments

Comments
 (0)