Skip to content

Commit f2098c2

Browse files
committed
MC-3398: Create/update MFTF tests for vertical alignment in tab item
- standardize container element name to match preview
1 parent e4b1563 commit f2098c2

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
<element name="tabHeader" type="button" selector="(//li[contains(@role, 'tab')])[{{arg1}}]" parameterized="true"/>
6666
<element name="tabHeaderItemActive" type="button" selector="(//div[@data-role='tabs']//descendant::*[@role='tablist'])/li[{{arg1}}][contains(@class, 'ui-state-active')]" parameterized="true"/>
6767
<element name="tabPanel" type="button" selector="(//div[@class='tabs-content']//div[@role='tabpanel'])[{{arg1}}]" parameterized="true"/>
68-
<element name="tabContent" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}]" parameterized="true"/>
6968
<element name="container" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}]" parameterized="true"/>
7069
<element name="containerStyle" type="button" selector="(//div[@class='tabs-content']//div[@data-role='tab-item'])[{{arg1}}][contains(@style,'{{arg2}}')]" parameterized="true"/>
7170
<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"/>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@
513513
<click selector="{{TabOnStorefront.tabHeader('2')}}" stepKey="switchToTab"/>
514514
<waitForPageLoad stepKey="waitForTabChangeAnimationStorefront" time="30"/>
515515
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
516-
<waitForElementVisible selector="{{TabOnStorefront.tabContent('2')}}" stepKey="seeNewTabContent"/>
516+
<waitForElementVisible selector="{{TabOnStorefront.container('2')}}" stepKey="seeNewTabContent"/>
517517
<comment userInput="Verify tab 2 on storefront" stepKey="AC6"/>
518518
<waitForElementVisible selector="{{TabOnStorefront.tab2ContentAdvancedStyles}}" stepKey="seeTabHeaderItemAdvancedStylesInStorefront2"/>
519519
<waitForElementVisible selector="{{TabOnStorefront.tab2ContentAdvancedClass}}" stepKey="seeTabContentClassInStorefront2"/>
@@ -677,9 +677,9 @@
677677
<comment userInput="Tab 1 is focused and Tab 2 is hidden" stepKey="focus"/>
678678
<waitForElementVisible selector="{{TabOnStorefront.tabHeaderItemActive('1')}}" stepKey="waitForFirstTabHeader"/>
679679
<waitForPageLoad stepKey="waitForTabsInit" time="30"/>
680-
<waitForElementVisible selector="{{TabOnStorefront.tabContent('1')}}" stepKey="waitForFirstTabContent"/>
681-
<assertElementContainsAttribute selector="{{TabOnStorefront.tabContent('1')}}" attribute="aria-hidden" expectedValue="false" stepKey="assertTab1Visible"/>
682-
<assertElementContainsAttribute selector="{{TabOnStorefront.tabContent('2')}}" attribute="aria-hidden" expectedValue="true" stepKey="assertTab2Hidden"/>
680+
<waitForElementVisible selector="{{TabOnStorefront.container('1')}}" stepKey="waitForFirstTabContent"/>
681+
<assertElementContainsAttribute selector="{{TabOnStorefront.container('1')}}" attribute="aria-hidden" expectedValue="false" stepKey="assertTab1Visible"/>
682+
<assertElementContainsAttribute selector="{{TabOnStorefront.container('2')}}" attribute="aria-hidden" expectedValue="true" stepKey="assertTab2Hidden"/>
683683
<comment userInput="User sees Tab 1 with background color and min height on Storefront" stepKey="AC14"/>
684684
<waitForElementVisible selector="{{TabOnStorefront.tabHeader('1')}}" stepKey="seeTabHeader1Storefront"/>
685685
<see selector="{{TabOnStorefront.tabHeader('1')}}" userInput="{{PageBuilderTabNameRandom1.value}}" stepKey="seeTab1TitleStorefront"/>

0 commit comments

Comments
 (0)