Skip to content

Commit 56f7c92

Browse files
committed
MC-3407: Create/update MFTF tests for background attributes for tab
- update tests with corrected selectors - remove duplicate selectors
1 parent b3f8c0c commit 56f7c92

File tree

4 files changed

+95
-97
lines changed

4 files changed

+95
-97
lines changed

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/BackgroundConfigurationActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<waitForElementVisible selector="{{section.backgroundRepeat(index, backgroundRepeat.styleValue)}}" stepKey="waitForBackgroundRepeat"/>
6464
<waitForElementVisible selector="{{section.backgroundAttachment(index, backgroundAttachment.value)}}" stepKey="waitForBackgroundAttachment"/>
6565
</actionGroup>
66-
<actionGroup name="validateBackgroundAttributesWithImageAndColor">
66+
<actionGroup name="validateBackgroundAttributes">
6767
<arguments>
6868
<argument name="section"/>
6969
<argument name="backgroundImage"/>

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,14 @@
7575
<element name="tabPanel" type="button" selector="(//div[@class='tabs-content']//div[@role='tabpanel'])[{{arg1}}]" parameterized="true"/>
7676
<element name="tabContent" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}]" parameterized="true"/>
7777
<element name="tabContentAdvancedStyles" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}][@style='border-radius: 0px 12px 12px; border: 10px solid rgb(0, 0, 0);']" parameterized="true"/>
78-
<element name="tabContentMinimumHeight" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}][contains(@style, 'min-height: {{arg2}}px')]" parameterized="true"/>
79-
<element name="tabContentBackgroundColor" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}]//div[@data-element='desktop_image'][contains(@style, 'background-color: {{arg2}}')]" parameterized="true"/>
78+
<element name="tabContentMinimumHeight" 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"/>
8079
<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"/>
81-
<element name="tabContentBackgroundAttachment" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}]//div[@data-element='desktop_image'][contains(@style, 'background-attachment: {{arg2}}')]" parameterized="true"/>
82-
<element name="tabContentBackgroundPosition" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}]//div[@data-element='desktop_image'][contains(@style, 'background-position: {{arg2}}')]" parameterized="true"/>
83-
<element name="tabContentBackgroundSize" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}]//div[@data-element='desktop_image'][contains(@style, 'background-size: {{arg2}}')]" parameterized="true"/>
84-
<element name="tabContentBackgroundRepeat" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}]//div[@data-element='desktop_image'][contains(@style, 'background-repeat: {{arg2}}')]" parameterized="true"/>
8580
<element name="tabContentType" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}]/div[1]/hr" parameterized="true"/>
8681
<element name="tabContentText" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}]//div[contains(@data-role, 'text')][1]" parameterized="true"/>
87-
<element name="tab1ContentAdvancedStyles" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[1][contains(@style, 'text-align: center') and contains(@style, 'border-style: solid') and contains(@style, 'border-color: rgb(0, 0, 0)') and contains(@style, 'border-width: 10px') and contains(@style, 'border-radius: 12px') and contains(@style, 'margin: 5px') and contains(@style, 'padding: 5px')]"/>
88-
<element name="tab2ContentAdvancedStyles" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[2][contains(@style, 'text-align: right') and contains(@style, 'border-style: dotted') and contains(@style, 'border-color: rgb(255, 0, 0)') and contains(@style, 'border-width: 500px') and contains(@style, 'border-radius: 500px') and contains(@style, 'margin: 1px 2px 3px 4px') and contains(@style, 'padding: 1px 2px 3px 4px')]"/>
82+
<element name="tab1ContentAdvancedStylesBorder" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[1][contains(@style, 'border-style: solid') and contains(@style, 'border-color: rgb(0, 0, 0)') and contains(@style, 'border-width: 10px') and contains(@style, 'border-radius: 12px')]"/>
83+
<element name="tab1ContentAdvancedStyles" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[1]//div[@data-element='desktop_image'][contains(@style, 'text-align: center') and contains(@style, 'margin: 5px') and contains(@style, 'padding: 5px')]"/>
84+
<element name="tab2ContentAdvancedStylesBorder" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[2][contains(@style, 'border-style: dotted') and contains(@style, 'border-color: rgb(255, 0, 0)') and contains(@style, 'border-width: 500px') and contains(@style, 'border-radius: 500px')]"/>
85+
<element name="tab2ContentAdvancedStyles" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[2]//div[@data-element='desktop_image'][contains(@style, 'text-align: right') and contains(@style, 'margin: 1px 2px 3px 4px') and contains(@style, 'padding: 1px 2px 3px 4px')]"/>
8986
<element name="tab1ContentAdvancedClass" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[1][contains(@class, 'first-class second-class third-class')]"/>
9087
<element name="tab2ContentAdvancedClass" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[2][contains(@class, 'first-class')]"/>
9188
<element name="base" type="button" selector="(//div[@data-role='tab-item'])[{{arg1}}]" parameterized="true"/>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@
504504
<argument name="from" value="1"/>
505505
<argument name="to" value="2"/>
506506
</actionGroup>
507-
<waitForElementVisible selector="{{TabOnStorefront.tabContentBackgroundColor('2', 'rgb(204, 204, 204)')}}" stepKey="validateBackgroundColor"/>
507+
<waitForElementVisible selector="{{TabOnStorefront.backgroundColor('2', 'rgb(204, 204, 204)')}}" stepKey="validateBackgroundColor"/>
508508
<seeElement selector="{{TabOnStorefront.tabContentMinimumHeight('2', '200')}}" stepKey="validateMinHeightInStorefront"/>
509509
<see userInput="{{PageBuilderTabNameRandom1.value}} copy" selector="{{TabOnStorefront.tabHeader('2')}}" stepKey="validateCopiedTabInStorefront"/>
510510
</test>

0 commit comments

Comments
 (0)