Skip to content

Commit 78d9d88

Browse files
committed
MC-3852: Update Background Image Implementation on Tabs
- Resolve further issues with tabs tests
1 parent 289257f commit 78d9d88

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

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

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,12 @@
9090
<element name="container" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}]" parameterized="true"/>
9191
<element name="containerStyle" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}][contains(@style,'{{arg2}}')]" parameterized="true"/>
9292
<element name="noMinHeight" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}][not(contains(@style,'min-height:'))]" parameterized="true"/>
93-
<element name="minHeight" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}]//div[@data-element='desktop_image'][contains(@style,'min-height: {{arg2}}px;')]" parameterized="true"/>
93+
<element name="minHeight" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}][contains(@style,'min-height: {{arg2}}px;')]" parameterized="true"/>
9494
<element name="verticalAlignContainer" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}][contains(@style,'justify-content: {{arg2}};')]" parameterized="true"/>
95-
<element name="tabContentBackgroundImage" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}]//div[@data-element='desktop_image'][contains(@style, 'background-image: url') and contains(@style, '{{arg2}}') and contains(@style, '{{arg3}}')]" parameterized="true"/>
9695
<element name="tabContentType" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}]/div[1]/hr" parameterized="true"/>
9796
<element name="tabContentText" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}]//div[contains(@data-role, 'text')][1]" parameterized="true"/>
9897
<element name="tabContentAdvancedStylesBorder" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}][contains(@style, 'border-style: {{arg2}}') and contains(@style, 'border-color: {{arg3}}') and contains(@style, 'border-width: {{arg4}}px') and contains(@style, 'border-radius: {{arg5}}px')]" parameterized="true"/>
99-
<element name="tabContentAdvancedStyles" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}]//div[@data-element='desktop_image'][contains(@style, 'text-align: {{arg2}}') and contains(@style, 'margin: {{arg3}}px') and contains(@style, 'padding: {{arg4}}px')]" parameterized="true"/>
98+
<element name="tabContentAdvancedStyles" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}][contains(@style, 'text-align: {{arg2}}') and contains(@style, 'margin: {{arg3}}px') and contains(@style, 'padding: {{arg4}}px')]" parameterized="true"/>
10099
<element name="tabContentAdvancedClass" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}][contains(@class, '{{arg2}}')]" parameterized="true"/>
101100
<!-- Background Configuration -->
102101
<element name="backgroundPosition" type="button" selector="(//div[@data-role='tab-item'])[{{arg1}}][contains(@style,'background-position: {{arg2}};')]" parameterized="true"/>
@@ -105,15 +104,6 @@
105104
<element name="backgroundAttachment" type="button" selector="(//div[@data-role='tab-item'])[{{arg1}}][contains(@style,'background-attachment: {{arg2}};')]" parameterized="true"/>
106105
<element name="backgroundColor" type="button" selector="(//div[@data-role='tab-item'])[{{arg1}}][contains(@style,'background-color: {{arg2}};')]" parameterized="true"/>
107106
<element name="noBackgroundColor" type="button" selector="(//div[@data-role='tab-item'])[{{arg1}}][not(contains(@style,'background-color:'))]" parameterized="true"/>
108-
<element name="backgroundImage" type="button" selector="(//div[@data-role='tab-item'])[{{arg1}}][contains(@style,'background-image: url(') and contains(@style,'{{arg2}}')]" parameterized="true"/>
109107
<element name="noBackgroundImage" type="button" selector="(//div[@data-role='tab-item'])[{{arg1}}][not(contains(@style,'background-image:'))]" parameterized="true"/>
110-
<element name="backgroundMobileImage" type="button" selector="(//div[@data-role='tab-item'])[{{arg1}}]//div[@data-element='mobile_image'][contains(@style,'background-image: url(') and contains(@style,'{{arg2}}')]" parameterized="true"/>
111-
<element name="mobileBackgroundPosition" type="button" selector="(//div[@data-role='tab-item'])[{{arg1}}]//div[@data-element='mobile_image'][contains(@style,'background-position: {{arg2}};')]" parameterized="true"/>
112-
<element name="mobileBackgroundSize" type="button" selector="(//div[@data-role='tab-item'])[{{arg1}}]//div[@data-element='mobile_image'][contains(@style,'background-size: {{arg2}};')]" parameterized="true"/>
113-
<element name="mobileBackgroundRepeat" type="button" selector="(//div[@data-role='tab-item'])[{{arg1}}]//div[@data-element='mobile_image'][contains(@style,'background-repeat: {{arg2}};')]" parameterized="true"/>
114-
<element name="mobileBackgroundAttachment" type="button" selector="(//div[@data-role='tab-item'])[{{arg1}}]//div[@data-element='mobile_image'][contains(@style,'background-attachment: {{arg2}};')]" parameterized="true"/>
115-
<element name="mobileBackgroundColor" type="button" selector="(//div[@data-role='tab-item'])[{{arg1}}]//div[@data-element='mobile_image'][contains(@style,'background-color: {{arg2}};')]" parameterized="true"/>
116-
<element name="noMobileBackgroundColor" type="button" selector="(//div[@data-role='tab-item'])[{{arg1}}]//div[@data-element='mobile_image'][not(contains(@style,'background-color:'))]" parameterized="true"/>
117-
<element name="noMobileBackgroundImage" type="button" selector="(//div[@data-role='tab-item'])[{{arg1}}]//div[@data-element='mobile_image'][not(contains(@style,'background-image:'))]" parameterized="true"/>
118108
</section>
119109
</sections>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,8 +683,7 @@
683683
<argument name="from" value="1"/>
684684
<argument name="to" value="2"/>
685685
</actionGroup>
686-
<!-- Due to background images on tabs we must check the 3rd element for the second tab on desktop -->
687-
<waitForElementVisible selector="{{TextOnStorefront.notHidden('3')}}" stepKey="waitForContentTypeShownStorefront2"/>
686+
<waitForElementVisible selector="{{TextOnStorefront.notHidden('2')}}" stepKey="waitForContentTypeShownStorefront2"/>
688687
<seeElementInDOM selector="{{TabOnStorefront.tabContentText('2')}}" stepKey="seeTextElementInTabContent"/>
689688
</test>
690689
<test name="TabsCannotAddToStage">

0 commit comments

Comments
 (0)