Skip to content

Commit 2505b40

Browse files
author
Hwashiang Yu
committed
MC-4318: Slide Transparent Background Color Renders Incorrectly & Inconsistently On Stage & Storefront
- Reverted noBackgroundColor selector - Updated default background section test for banner and slide item
1 parent 5e81471 commit 2505b40

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
<element name="backgroundRepeat" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and @data-element='main'])[{{arg1}}]//div[@data-element='desktop_image'][contains(@style,'background-repeat: {{arg2}};')]" parameterized="true"/>
100100
<element name="backgroundAttachment" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and @data-element='main'])[{{arg1}}]//div[@data-element='desktop_image'][contains(@style,'background-attachment: {{arg2}};')]" parameterized="true"/>
101101
<element name="backgroundColor" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and @data-element='main'])[{{arg1}}]//div[@data-element='desktop_image'][contains(@style,'background-color: {{arg2}};')]" parameterized="true"/>
102-
<element name="noBackgroundColor" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and @data-element='main'])[{{arg1}}]//div[@data-element='desktop_image'][contains(@style,'background-color: #fafafa;')]" parameterized="true"/>
102+
<element name="noBackgroundColor" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and @data-element='main'])[{{arg1}}]//div[@data-element='desktop_image'][not(contains(@style,'background-color:'))]" parameterized="true"/>
103103
<element name="backgroundImage" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and @data-element='main'])[{{arg1}}]//div[@data-element='desktop_image'][contains(@style,'background-image: url(') and contains(@style,'{{arg2}}')]" parameterized="true"/>
104104
<element name="noBackgroundImage" type="button" selector="(//div[contains(@class,'pagebuilder-banner') and @data-element='main'])[{{arg1}}]//div[@data-element='desktop_image'][not(contains(@style,'background-image:'))]" parameterized="true"/>
105105
<!-- Content Configuration -->

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
<element name="mobileMinimumHeight" type="text" selector="(//div[@data-role='slide'])[{{arg1}}]//div[@data-element='mobile_image'][contains(@style,'min-height: {{arg2}}px;')]" parameterized="true"/>
7979
<!-- Background Configuration -->
8080
<element name="backgroundColor" type="text" selector="(//div[@data-role='slide'])[{{arg1}}]//div[@data-element='desktop_image'][contains(@style,'background-color: {{arg2}};')]" parameterized="true"/>
81-
<element name="noBackgroundColor" type="button" selector="(//div[@data-role='slide'])[{{arg1}}]//div[@data-element='desktop_image'][contains(@style,'background-color: #fafafa;')]" parameterized="true"/>
81+
<element name="noBackgroundColor" type="button" selector="(//div[@data-role='slide'])[{{arg1}}]//div[@data-element='desktop_image'][not(contains(@style,'background-color:'))]" parameterized="true"/>
8282
<element name="backgroundImage" type="text" selector="(//div[@data-role='slide'])[{{arg1}}]//div[@data-element='desktop_image'][contains(@style,'background-image: url(') and contains(@style,'{{arg2}}')]" parameterized="true"/>
8383
<element name="noBackgroundImage" type="text" selector="(//div[@data-role='slide'])[{{arg1}}]//div[@data-element='desktop_image'][not(contains(@style,'background-image:'))]" parameterized="true"/>
8484
<element name="backgroundPosition" type="button" selector="(//div[@data-role='slide'])[{{arg1}}]//div[@data-element='desktop_image'][contains(@style,'background-position: {{arg2}};')]" parameterized="true"/>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,11 @@
594594
<actionGroup ref="validateBackgroundAttributesWithNoImageOrColor" stepKey="validateStage">
595595
<argument name="section" value="BannerOnBackend"/>
596596
</actionGroup>
597+
<executeJS function="return window.getComputedStyle(document.evaluate(&quot;{{BannerOnBackend.noBackgroundColor('1')}}&quot;, document.body).iterateNext()).backgroundColor" stepKey="grabDefaultBackgroundColor"/>
598+
<assertEquals stepKey="assertDefaultBackgroundColor">
599+
<expectedResult type="string">rgb(250, 250, 250)</expectedResult>
600+
<actualResult type="variable">grabDefaultBackgroundColor</actualResult>
601+
</assertEquals>
597602
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
598603
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
599604
<!-- Validate Stage After Save -->

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,11 @@
196196
<seeElement selector="{{SlideOnBackend.backgroundSize('1', PageBuilderBackgroundSize_Default.value)}}" stepKey="seeBackgroundSizeStage"/>
197197
<seeElement selector="{{SlideOnBackend.backgroundPosition('1', PageBuilderBackgroundPosition_Default.styleValue)}}" stepKey="seeBackgroundPositionStage"/>
198198
<seeElement selector="{{SlideOnBackend.backgroundRepeat('1', PageBuilderBackgroundRepeat_Default.styleValue)}}" stepKey="seeBackgroundRepeatStage"/>
199+
<executeJS function="return window.getComputedStyle(document.evaluate(&quot;{{SlideOnBackend.noBackgroundColor('1')}}&quot;, document.body).iterateNext()).backgroundColor" stepKey="grabDefaultBackgroundColor"/>
200+
<assertEquals stepKey="assertDefaultBackgroundColor">
201+
<expectedResult type="string">rgb(250, 250, 250)</expectedResult>
202+
<actualResult type="variable">grabDefaultBackgroundColor</actualResult>
203+
</assertEquals>
199204
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
200205
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
201206
<!-- Validate Stage After Save -->

0 commit comments

Comments
 (0)