Skip to content

Commit b5ac7ae

Browse files
committed
MAGETWO-92421: Create/Update Automated Tests
- Adding tests for remaining background positions - Adding/updating supporting data and affected tests - Updating background banner elements
1 parent 6557271 commit b5ac7ae

7 files changed

+655
-31
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Data/BackgroundFormData.xml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,20 +259,62 @@
259259
<data key="value">Top Left</data>
260260
<data key="styleValue">left top</data>
261261
</entity>
262-
<entity name="PageBuilderBackgroundPosition_Centered" type="pagebuilder_background_position_property">
262+
<entity name="PageBuilderBackgroundPosition_TopCenter" type="pagebuilder_background_position_property">
263+
<data key="name">Background Position</data>
264+
<data key="section">background</data>
265+
<data key="fieldName">background_position</data>
266+
<data key="value">Top Center</data>
267+
<data key="styleValue">center top</data>
268+
</entity>
269+
<entity name="PageBuilderBackgroundPosition_TopRight" type="pagebuilder_background_position_property">
270+
<data key="name">Background Position</data>
271+
<data key="section">background</data>
272+
<data key="fieldName">background_position</data>
273+
<data key="value">Top Right</data>
274+
<data key="styleValue">right top</data>
275+
</entity>
276+
<entity name="PageBuilderBackgroundPosition_CenterLeft" type="pagebuilder_background_position_property">
277+
<data key="name">Background Position</data>
278+
<data key="section">background</data>
279+
<data key="fieldName">background_position</data>
280+
<data key="value">Center Left</data>
281+
<data key="styleValue">left center</data>
282+
</entity>
283+
<entity name="PageBuilderBackgroundPosition_Center" type="pagebuilder_background_position_property">
263284
<data key="name">Background Position</data>
264285
<data key="section">background</data>
265286
<data key="fieldName">background_position</data>
266287
<data key="value">Center</data>
267288
<data key="styleValue">center center</data>
268289
</entity>
290+
<entity name="PageBuilderBackgroundPosition_CenterRight" type="pagebuilder_background_position_property">
291+
<data key="name">Background Position</data>
292+
<data key="section">background</data>
293+
<data key="fieldName">background_position</data>
294+
<data key="value">Center Right</data>
295+
<data key="styleValue">right center</data>
296+
</entity>
269297
<entity name="PageBuilderBackgroundPosition_BottomLeft" type="pagebuilder_background_position_property">
270298
<data key="name">Background Position</data>
271299
<data key="section">background</data>
272300
<data key="fieldName">background_position</data>
273301
<data key="value">Bottom Left</data>
274302
<data key="styleValue">left bottom</data>
275303
</entity>
304+
<entity name="PageBuilderBackgroundPosition_BottomCenter" type="pagebuilder_background_position_property">
305+
<data key="name">Background Position</data>
306+
<data key="section">background</data>
307+
<data key="fieldName">background_position</data>
308+
<data key="value">Bottom Center</data>
309+
<data key="styleValue">center bottom</data>
310+
</entity>
311+
<entity name="PageBuilderBackgroundPosition_BottomRight" type="pagebuilder_background_position_property">
312+
<data key="name">Background Position</data>
313+
<data key="section">background</data>
314+
<data key="fieldName">background_position</data>
315+
<data key="value">Bottom Right</data>
316+
<data key="styleValue">right bottom</data>
317+
</entity>
276318
<!-- Background Repeat -->
277319
<entity name="PageBuilderBackgroundRepeat_Default" type="pagebuilder_background_repeat_property">
278320
<data key="name">Background Repeat</data>

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,14 @@
115115
<element name="editFormBackgroundImagePreview" type="button" selector="//input[@name='background_image']/ancestor::div[@class='admin__field-control']/descendant::img"/>
116116
<element name="editFormBackgroundMobileImagePreview" type="button" selector="//input[@name='mobile_image']/ancestor::div[@class='admin__field-control']/descendant::img"/>
117117
<!-- Background Configuration -->
118-
<element name="backgroundPosition" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]/div[@data-appearance][contains(@style,'background-position: {{arg2}};')]" parameterized="true"/>
119-
<element name="backgroundSize" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]/div[@data-appearance][contains(@style,'background-size: {{arg2}};')]" parameterized="true"/>
120-
<element name="backgroundRepeat" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]/div[@data-appearance][contains(@style,'background-repeat: {{arg2}};')]" parameterized="true"/>
121-
<element name="backgroundAttachment" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]/div[@data-appearance][contains(@style,'background-attachment: {{arg2}};')]" parameterized="true"/>
122-
<element name="backgroundColor" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]/div[@data-appearance][contains(@style,'background-color: {{arg2}};')]" parameterized="true"/>
123-
<element name="noBackgroundColor" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]/div[@data-appearance][not(contains(@style,'background-color:'))]" parameterized="true"/>
124-
<element name="backgroundImage" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]/div[@data-appearance][contains(@style,'background-image: url(') and contains(@style,'{{arg2}}')]" parameterized="true"/>
125-
<element name="noBackgroundImage" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]/div[@data-appearance][not(contains(@style,'background-image:'))]" parameterized="true"/>
118+
<element name="backgroundPosition" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]/div[@class='pagebuilder-banner-wrapper'][contains(@style,'background-position: {{arg2}};')]" parameterized="true"/>
119+
<element name="backgroundSize" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]/div[@class='pagebuilder-banner-wrapper'][contains(@style,'background-size: {{arg2}};')]" parameterized="true"/>
120+
<element name="backgroundRepeat" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]/div[@class='pagebuilder-banner-wrapper'][contains(@style,'background-repeat: {{arg2}};')]" parameterized="true"/>
121+
<element name="backgroundAttachment" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]/div[@class='pagebuilder-banner-wrapper'][contains(@style,'background-attachment: {{arg2}};')]" parameterized="true"/>
122+
<element name="backgroundColor" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]/div[@class='pagebuilder-banner-wrapper'][contains(@style,'background-color: {{arg2}};')]" parameterized="true"/>
123+
<element name="noBackgroundColor" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]/div[@class='pagebuilder-banner-wrapper'][not(contains(@style,'background-color:'))]" parameterized="true"/>
124+
<element name="backgroundImage" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]/div[@class='pagebuilder-banner-wrapper'][contains(@style,'background-image: url(') and contains(@style,'{{arg2}}')]" parameterized="true"/>
125+
<element name="noBackgroundImage" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]/div[@class='pagebuilder-banner-wrapper'][not(contains(@style,'background-image:'))]" parameterized="true"/>
126126
</section>
127127
<section name="BannerOnConfigurationPanel">
128128
<element name="tinyMCEIFrame" type="text" selector="pagebuilder_banner_form_message_ifr"/>

0 commit comments

Comments
 (0)