Skip to content

Commit 91394ca

Browse files
author
Lukasz Borowiec
committed
#558: Developer can style content types output differently per viewport #7 - Fixes for Map Section
1 parent 1a7e998 commit 91394ca

File tree

3 files changed

+32
-32
lines changed

3 files changed

+32
-32
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@
1717
<element name="baseJS" type="text" selector="document.querySelector('div[data-index=\'position\'] div.map-field')"/>
1818
<element name="clickablePin" type="button" selector="//div[@data-index='position']//div[@class='map-field']//map//area"/>
1919
<element name="allPins" type="button" selector="//div[@data-index='position']//div[@class='map-field']//img[not(@usemap) and contains(@src,'spotlight-poi2_hdpi.png')]|//div[@data-index='position']//div[@class='map-field']//img[not(@usemap) and contains(@src,'spotlight-poi2.png')]"/>
20-
<element name="pinLocations" type="text" selector="(//div[@data-index='position']//div[contains(@style,'transform: matrix(1, 0, 0, 1, ')])[{{arg1}}]" parameterized="true"/>
20+
<element name="pinLocations" type="text" selector="(//div[@data-index=e&quot;positione&quot;]//div[{{arg1}}]" parameterized="true"/>
2121
<element name="tooltipWindow" type="text" selector="//div[@data-index='position']//div[@class='map-field']//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]"/>
2222
<element name="helperText" type="button" selector="//div[@data-index='position']//span[.='You can move the pin by clicking or dragging it where you want. To alter the zoom please use the controls.']"/>
2323
<element name="renderedMap" type="button" selector="//div[@data-index='position']//div[@class='map-field']//div[contains(@class, 'gm-style')]"/>
24-
<element name="googleMapsLink" type="button" selector="//div[@data-index='position']//div[@class='map-field' and not(contains(@style,'display: none;'))]//a//img[{{arg1}}]" parameterized="true"/>
24+
<element name="googleMapsLink" type="button" selector="//div[@data-index=e&quot;positione&quot;]//div[@class=e&quot;map-fielde&quot;]//a//img[{{arg1}}]" parameterized="true"/>
2525
<!-- Map Buttons -->
2626
<element name="googleModalOkButton" type="button" selector="//aside//button[@class='dismissButton' and .='OK'][{{arg1}}]" parameterized="true"/>
2727
<element name="fullScreen" type="button" selector="(//div[@data-index='position']//div[@class='map-field']//button[@title='Toggle fullscreen view'])[{{arg1}}]" parameterized="true"/>
2828
<element name="zoomIn" type="button" selector="(//div[@data-index='position']//div[@class='map-field']//button[@title='Zoom in'])[{{arg1}}]" parameterized="true"/>
2929
<element name="zoomOut" type="button" selector="(//div[@data-index='position']//div[@class='map-field']//button[@title='Zoom out'])[{{arg1}}]" parameterized="true"/>
3030
<!-- Map Error Message -->
3131
<element name="errorContainer" type="text" selector="(//div[@data-index='position']//div[@class='google-map-auth-failure-placeholder'])[{{arg1}}]" parameterized="true"/>
32-
<element name="warningMessageLink" type="button" selector="//div[@data-index='position']//div[@class='google-map-auth-failure-placeholder' and not(contains(@style,'display: none;'))]//a[{{arg1}}]" parameterized="true"/>
32+
<element name="warningMessageLink" type="button" selector="//div[@data-index=e&quot;positione&quot;]//div[@class=e&quot;google-map-auth-failure-placeholdere&quot;]//a[{{arg1}}]" parameterized="true"/>
3333
</section>
3434
</sections>

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<element name="mainCSS" type="button" selector="[data-content-type=map][data-element=main]"/>
1414
<element name="clickablePin" type="button" selector="((//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//map//area)[{{arg2}}]" parameterized="true"/>
1515
<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"/>
16-
<element name="pinLocations" type="button" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(@style,'transform: matrix(1, 0, 0, 1, ')]" parameterized="true"/>
17-
<element name="googleMapsLink" type="button" selector="(//div[@data-content-type='map' and not(contains(@style,'display: none;'))])[{{arg1}}]//a//img" parameterized="true"/>
16+
<element name="pinLocations" type="button" selector="(//div[contains(@class,&quot;pagebuilder-map&quot;)])[{{arg1}}]//div" parameterized="true"/>
17+
<element name="googleMapsLink" type="button" selector="(//div[@data-content-type=&quot;map&quot;])[{{arg1}}]//a//img" parameterized="true"/>
1818
<!-- Location Pin Configuration -->
1919
<element name="latitude" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(@data-locations,'&quot;position&quot;:{&quot;latitude&quot;:{{arg2}},')]" parameterized="true"/>
2020
<element name="longitude" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(@data-locations,',&quot;longitude&quot;:{{arg2}}}')]" parameterized="true"/>
@@ -29,28 +29,28 @@
2929
<element name="commentElement" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//p" parameterized="true"/>
3030
<element name="phoneNumberElement" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//p" parameterized="true"/>
3131
<element name="addressCityStateZipCountryElement" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//span" parameterized="true"/>
32-
<element name="height" type="button" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(@data-bind,'renderMap') and contains(@style,'height: {{arg2}}px;')]" parameterized="true"/>
33-
<element name="noHeight" type="button" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(@data-bind,'renderMap') and not(contains(@style,'height:'))]" parameterized="true"/>
32+
<element name="height" type="button" selector="(//div[contains(@class,&quot;pagebuilder-map&quot;)])[{{arg1}}]//div[contains(@data-bind,&quot;renderMap&quot;)]" parameterized="true"/>
33+
<element name="noHeight" type="button" selector="(//div[contains(@class,&quot;pagebuilder-map&quot;)])[{{arg1}}]//div[contains(@data-bind,&quot;renderMap&quot;)]" parameterized="true"/>
3434
<element name="showControls" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(@data-bind,'renderMap') and @data-show-controls='{{arg2}}']" parameterized="true"/>
3535
<!-- Advanced Configuration -->
36-
<element name="alignment" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]/div[contains(@style,'text-align: {{arg2}};')]" parameterized="true"/>
37-
<element name="noAlignment" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][not(contains(@style,'text-align:'))]" parameterized="true"/>
38-
<element name="border" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]/div[contains(@style,'border-style: {{arg2}};')]" parameterized="true"/>
39-
<element name="borderColor" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]/div[contains(@style,'border-color: {{arg2}};')]" parameterized="true"/>
40-
<element name="noBorderColor" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][not(contains(@style,'border-color:'))]" parameterized="true"/>
41-
<element name="borderWidth" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]/div[contains(@style,'border-width: {{arg2}}px;')]" parameterized="true"/>
42-
<element name="borderRadius" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]/div[contains(@style,'border-radius: {{arg2}}px;')]" parameterized="true"/>
36+
<element name="alignment" type="text" selector="(//div[contains(@class,&quot;pagebuilder-map&quot;)])[{{arg1}}]/div" parameterized="true"/>
37+
<element name="noAlignment" type="text" selector="(//div[@data-content-type=&quot;map&quot;])[{{arg1}}]" parameterized="true"/>
38+
<element name="border" type="text" selector="(//div[contains(@class,&quot;pagebuilder-map&quot;)])[{{arg1}}]/div" parameterized="true"/>
39+
<element name="borderColor" type="text" selector="(//div[contains(@class,&quot;pagebuilder-map&quot;)])[{{arg1}}]/div" parameterized="true"/>
40+
<element name="noBorderColor" type="text" selector="(//div[contains(@class,&quot;pagebuilder-map&quot;)])[{{arg1}}]/div" parameterized="true"/>
41+
<element name="borderWidth" type="text" selector="(//div[contains(@class,&quot;pagebuilder-map&quot;)])[{{arg1}}]/div" parameterized="true"/>
42+
<element name="borderRadius" type="text" selector="(//div[contains(@class,&quot;pagebuilder-map&quot;)])[{{arg1}}]/div" parameterized="true"/>
4343
<element name="cssClasses" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]/div[contains(@class,'{{arg2}}')]" parameterized="true"/>
4444
<element name="noCssClasses" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][not(@class)]" parameterized="true"/>
45-
<element name="margins" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]/div[contains(@style,'margin: {{arg2}}px;')]" parameterized="true"/>
46-
<element name="padding" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]/div[contains(@style,'padding: {{arg2}}px;')]" parameterized="true"/>
45+
<element name="margins" type="text" selector="(//div[contains(@class,&quot;pagebuilder-map&quot;)])[{{arg1}}]/div" parameterized="true"/>
46+
<element name="padding" type="text" selector="(//div[contains(@class,&quot;pagebuilder-map&quot;)])[{{arg1}}]/div" parameterized="true"/>
4747
<!-- Map Buttons -->
4848
<element name="googleModalOkButton" type="button" selector="(//div[@data-content-type='map'])[{{arg1}}]//button[@class='dismissButton' and .='OK']" parameterized="true"/>
4949
<element name="fullScreen" type="button" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//button[@title='Toggle fullscreen view']" parameterized="true"/>
5050
<element name="zoomIn" type="button" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//button[@title='Zoom in']" parameterized="true"/>
5151
<element name="zoomOut" type="button" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//button[@title='Zoom out']" parameterized="true"/>
5252
<!-- Map Error Message -->
5353
<element name="errorContainer" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[@class='google-map-auth-failure-placeholder']" parameterized="true"/>
54-
<element name="warningMessageLink" type="button" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[@class='google-map-auth-failure-placeholder' and not(contains(@style,'display: none;'))]//a" parameterized="true"/>
54+
<element name="warningMessageLink" type="button" selector="(//div[contains(@class,,&quot;pagebuilder-map,&quot;)])[{{arg1}}]//div[@class=,&quot;google-map-auth-failure-placeholder,&quot;]//a" parameterized="true"/>
5555
</section>
5656
</sections>

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="MapOnStorefront">
11-
<element name="emptyMap" type="button" selector="(//div[@data-content-type='map'])[{{arg1}}][not(@src) and contains(@style,'display: none;')]" parameterized="true"/>
11+
<element name="emptyMap" type="button" selector="(//div[@data-content-type=&quot;map&quot;])[{{arg1}}][not(@src)]" parameterized="true"/>
1212
<element name="base" type="button" selector="(//div[@data-content-type='map'])[{{arg1}}]" parameterized="true"/>
1313
<element name="baseCSS" type="button" selector="[data-content-type=map][data-element=main]"/>
1414
<element name="baseJS" type="text" selector="document.querySelectorAll('div[data-content-type=\'map\']')[{{arg1}}]" parameterized="true"/>
1515
<element name="allPins" type="button" selector="(//div[@data-content-type='map'])[{{arg1}}]//img[not(@usemap) and contains(@src,'spotlight-poi2_hdpi.png')]|(//div[@data-content-type='map'])[{{arg1}}]//img[not(@usemap) and contains(@src,'spotlight-poi2.png')]" parameterized="true"/>
1616
<element name="clickablePin" type="button" selector="((//div[@data-content-type='map'])[{{arg1}}]//map//area)[{{arg2}}]" parameterized="true"/>
17-
<element name="pinLocations" type="button" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[contains(@style,'transform: matrix(1, 0, 0, 1, ')]" parameterized="true"/>
17+
<element name="pinLocations" type="button" selector="(//div[@data-content-type=&quot;map&quot;])[{{arg1}}]//div" parameterized="true"/>
1818
<element name="zoom" type="button" selector="(//div[@data-content-type='map'])[{{arg1}}][@data-zoom='{{arg2}}']" parameterized="true"/>
19-
<element name="googleMapsLink" type="button" selector="(//div[@data-content-type='map' and not(contains(@style,'display: none;'))])[{{arg1}}]//a//img" parameterized="true"/>
19+
<element name="googleMapsLink" type="button" selector="(//div[@data-content-type=&quot;map&quot;)[{{arg1}}]//a//img" parameterized="true"/>
2020
<!-- Location Pin Configuration -->
2121
<element name="latitude" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][contains(@data-locations,'&quot;position&quot;:{&quot;latitude&quot;:{{arg2}},')]" parameterized="true"/>
2222
<element name="longitude" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][contains(@data-locations,',&quot;longitude&quot;:{{arg2}}}')]" parameterized="true"/>
@@ -31,21 +31,21 @@
3131
<element name="commentElement" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//p" parameterized="true"/>
3232
<element name="phoneNumberElement" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//p" parameterized="true"/>
3333
<element name="addressCityStateZipCountryElement" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//span" parameterized="true"/>
34-
<element name="height" type="button" selector="(//div[@data-content-type='map'])[{{arg1}}][contains(@style,'height: {{arg2}}px;')]" parameterized="true"/>
35-
<element name="noHeight" type="button" selector="(//div[@data-content-type='map'])[{{arg1}}][not(contains(@style,'height:'))]" parameterized="true"/>
36-
<element name="showControls" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][@data-show-controls='{{arg2}}']" parameterized="true"/>
34+
<element name="height" type="button" selector="(//div[@data-content-type=&quot;map&quot;])[{{arg1}}]" parameterized="true"/>
35+
<element name="noHeight" type="button" selector="(//div[@data-content-type=&quot;map&quot;])[{{arg1}}]" parameterized="true"/>
36+
<element name="showControls" type="text" selector="(//div[@data-content-type=&quot;map&quot;])[{{arg1}}]" parameterized="true"/>
3737
<!-- Advanced Configuration -->
38-
<element name="alignment" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][contains(@style,'text-align: {{arg2}};')]" parameterized="true"/>
39-
<element name="noAlignment" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][not(contains(@style,'text-align:'))]" parameterized="true"/>
40-
<element name="border" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][contains(@style,'border-style: {{arg2}};')]" parameterized="true"/>
41-
<element name="borderColor" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][contains(@style,'border-color: {{arg2}};')]" parameterized="true"/>
42-
<element name="noBorderColor" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][not(contains(@style,'border-color:'))]" parameterized="true"/>
43-
<element name="borderWidth" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][contains(@style,'border-width: {{arg2}}px;')]" parameterized="true"/>
44-
<element name="borderRadius" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][contains(@style,'border-radius: {{arg2}}px;')]" parameterized="true"/>
38+
<element name="alignment" type="text" selector="(//div[@data-content-type=&quot;map&quot;])[{{arg1}}]" parameterized="true"/>
39+
<element name="noAlignment" type="text" selector="(//div[@data-content-type=&quot;map&quot;])[{{arg1}}]" parameterized="true"/>
40+
<element name="border" type="text" selector="(//div[@data-content-type=&quot;map&quot;])[{{arg1}}]" parameterized="true"/>
41+
<element name="borderColor" type="text" selector="(//div[@data-content-type=&quot;map&quot;])[{{arg1}}]" parameterized="true"/>
42+
<element name="noBorderColor" type="text" selector="(//div[@data-content-type=&quot;map&quot;])[{{arg1}}]" parameterized="true"/>
43+
<element name="borderWidth" type="text" selector="(//div[@data-content-type=&quot;map&quot;])[{{arg1}}]" parameterized="true"/>
44+
<element name="borderRadius" type="text" selector="(//div[@data-content-type=&quot;map&quot;])[{{arg1}}]" parameterized="true"/>
4545
<element name="cssClasses" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][contains(@class,'{{arg2}}')]" parameterized="true"/>
4646
<element name="noCssClasses" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][not(@class)]" parameterized="true"/>
47-
<element name="margins" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][contains(@style,'margin: {{arg2}}px;')]" parameterized="true"/>
48-
<element name="padding" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][contains(@style,'padding: {{arg2}}px;')]" parameterized="true"/>
47+
<element name="margins" type="text" selector="(//div[@data-content-type=&quot;map&quot;])[{{arg1}}]" parameterized="true"/>
48+
<element name="padding" type="text" selector="(//div[@data-content-type=&quot;map&quot;])[{{arg1}}]" parameterized="true"/>
4949
<!-- Map Buttons -->
5050
<element name="googleModalOkButton" type="button" selector="(//div[@data-content-type='map'])[{{arg1}}]//button[@class='dismissButton' and .='OK']" parameterized="true"/>
5151
<element name="fullScreen" type="button" selector="(//div[@data-content-type='map'])[{{arg1}}]//button[@title='Toggle fullscreen view']" parameterized="true"/>

0 commit comments

Comments
 (0)