Skip to content

Commit 166b130

Browse files
committed
MC-5079: Add Box Sizing to Storefront Styles (Border & Height Storefront Issues)
- add new test to assert map with borders and padding is equal to height - add new map css selectors
1 parent bdc26e8 commit 166b130

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="MapOnStage">
1212
<element name="base" type="button" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]" parameterized="true"/>
13+
<element name="mainCSS" type="button" selector="[data-role=map][data-element=main]"/>
1314
<element name="clickablePin" type="button" selector="((//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//map//area)[{{arg2}}]" parameterized="true"/>
1415
<element name="allPins" type="button" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//img[not(@usemap) and contains(@src,'spotlight-poi2_hdpi.png')]|(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//img[not(@usemap) and contains(@src,'spotlight-poi2.png')]" parameterized="true"/>
1516
<element name="pinLocations" type="button" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(@style,'transform: matrix(1, 0, 0, 1, ')]" parameterized="true"/>
@@ -51,6 +52,7 @@
5152
<section name="MapOnStorefront">
5253
<element name="emptyMap" type="button" selector="(//div[@data-role='map'])[{{arg1}}][not(@src) and contains(@style,'display: none;')]" parameterized="true"/>
5354
<element name="base" type="button" selector="(//div[@data-role='map'])[{{arg1}}]" parameterized="true"/>
55+
<element name="baseCSS" type="button" selector="[data-role=map][data-element=main]"/>
5456
<element name="baseJS" type="text" selector="document.querySelectorAll('div[data-role=\'map\']')[{{arg1}}]" parameterized="true"/>
5557
<element name="allPins" type="button" selector="(//div[@data-role='map'])[{{arg1}}]//img[not(@usemap) and contains(@src,'spotlight-poi2_hdpi.png')]|(//div[@data-role='map'])[{{arg1}}]//img[not(@usemap) and contains(@src,'spotlight-poi2.png')]" parameterized="true"/>
5658
<element name="clickablePin" type="button" selector="((//div[@data-role='map'])[{{arg1}}]//map//area)[{{arg2}}]" parameterized="true"/>

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

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,53 @@
990990
<argument name="pinIndex" value="2"/>
991991
</actionGroup>
992992
</test>
993+
<test name="MapWithBordersAndPaddingEqualToHeight" extends="RowWithBordersAndPaddingEqualToMinHeight">
994+
<annotations>
995+
<features value="PageBuilder"/>
996+
<stories value="Map"/>
997+
<title value="Map height with borders and padding is equal to height"/>
998+
<description value="A user can see Map height with borders and padding is equal to height"/>
999+
<severity value="CRITICAL"/>
1000+
<useCaseId value="MC-5079"/>
1001+
<testCaseId value="MC-5793"/>
1002+
<group value="pagebuilder"/>
1003+
<group value="pagebuilder-map"/>
1004+
<group value="pagebuilder-mapCommon"/>
1005+
</annotations>
1006+
<actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle">
1007+
<argument name="contentType" value="PageBuilderMapContentType"/>
1008+
</actionGroup>
1009+
<actionGroup ref="expandPageBuilderPanelGroup" after="enterPageTitle" stepKey="expandGroup">
1010+
<argument name="group" value="PageBuilderMapContentType"/>
1011+
</actionGroup>
1012+
<actionGroup ref="dragContentTypeToStage" after="commentConfigureContentType" stepKey="dragContentTypeToStage">
1013+
<argument name="contentType" value="PageBuilderMapContentType"/>
1014+
</actionGroup>
1015+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditPanel">
1016+
<argument name="contentType" value="PageBuilderMapContentType"/>
1017+
</actionGroup>
1018+
<actionGroup ref="clickAddLocationButton" after="openEditPanel" stepKey="clickAddLocationButton"/>
1019+
<actionGroup ref="clickMapToAddOrMovePin" after="clickAddLocationButton" stepKey="addMapPin"/>
1020+
<actionGroup ref="fillSlideOutPanelFieldGeneral" after="addMapPin" stepKey="enterLocationName">
1021+
<argument name="property" value="PageBuilderMapLocationName_TestLocation"/>
1022+
</actionGroup>
1023+
<actionGroup ref="saveLocationForm" after="enterLocationName" stepKey="saveLocationForm"/>
1024+
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterMinHeightProperty">
1025+
<argument name="property" value="PageBuilderMapHeightDefaultProperty"/>
1026+
</actionGroup>
1027+
<actionGroup ref="validateContentTypeHeightEqualToMinHeight" stepKey="validateContentTypeHeightBeforeSave">
1028+
<argument name="content" value="{{MapOnStage.mainCSS}}"/>
1029+
</actionGroup>
1030+
<actionGroup ref="validateContentTypeHeightEqualToMinHeight" stepKey="validateContentTypeHeightAfterSave">
1031+
<argument name="content" value="{{MapOnStage.mainCSS}}"/>
1032+
</actionGroup>
1033+
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront">
1034+
<argument name="contentType" value="PageBuilderMapContentType"/>
1035+
</actionGroup>
1036+
<actionGroup ref="validateContentTypeHeightEqualToMinHeight" stepKey="validateContentTypeHeightStorefront">
1037+
<argument name="content" value="{{MapOnStorefront.baseCSS}}"/>
1038+
</actionGroup>
1039+
</test>
9931040
<test name="MapDuplicate">
9941041
<annotations>
9951042
<features value="PageBuilder"/>

0 commit comments

Comments
 (0)