Skip to content

Commit d7fdcc1

Browse files
committed
#421: Setting Empty Border Radius on Tab Item Errors and Breaks Tab Item Content
- Improving Functional Testing Coverage
1 parent f3ea737 commit d7fdcc1

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<element name="tabHeaderItemAdvancedStyles" type="button" selector="(//div[contains(@class,'pagebuilder-tabs')]//descendant::*[contains(@class,'tabs-navigation')]/li[contains(@style, 'border-style: solid; border-radius: 12px; border-color: rgb(0, 0, 0); border-width: 10px; margin-bottom: -10px; margin-left: -10px;')])"/>
2121
<element name="tab1ContentAdvancedStyles" type="button" selector="(//div[contains(@class,'pagebuilder-tabs')]//div[contains(@class,'ui-tabs-panel')])[1]//div[contains(@class, 'pagebuilder-tab-item') and 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;')]"/>
2222
<element name="tab2ContentAdvancedStyles" type="button" selector="(//div[contains(@class,'pagebuilder-tabs')]//div[contains(@class,'ui-tabs-panel')])[2]//div[contains(@class, 'pagebuilder-tab-item') and 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;')]"/>
23+
<element name="tab3ContentAdvancedStyles" type="button" selector="(//div[contains(@class,'pagebuilder-tabs')]//div[contains(@class,'ui-tabs-panel')])[3]//div[contains(@class, 'pagebuilder-tab-item')][not(contains(@style, 'border-width:'))][not(contains(@style, 'border-radius:'))]"/>
2324
<element name="empty" type="button" selector="(//div[contains(@class, 'pagebuilder-tabs')]//div[contains(@class, 'pagebuilder-tab-item') and contains(@class, 'empty-container')])"/>
2425
<element name="openOptionsMenu" type="button" selector="(//ul[contains(@class,'tabs-navigation')]//a[contains(@class,'tab-title')])[{{arg1}}]" parameterized="true"/>
2526
<element name="optionsMenu" type="button" selector="(//ul[contains(@class,'tabs-navigation')]//div[contains(@class,'pagebuilder-options-wrapper')])[{{arg1}}]" parameterized="true"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderTabItemConfigurationTest/TabItemUpdateAdvancedConfigurationValuesTest.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,23 @@
105105
<argument name="property" value="PageBuilderPaddingPropertyUnique"/>
106106
</actionGroup>
107107
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings2"/>
108+
<comment userInput="Add and Customise Third Tab" stepKey="addThirdTab"/>
109+
<waitForElementVisible selector="{{TabOnStage.tabHeader('1')}}" stepKey="seeTabHeader2"/>
110+
<actionGroup ref="addChildContentTypeFromOptionMenu" stepKey="addChildContentType2">
111+
<argument name="contentType" value="PageBuilderTabsContentType"/>
112+
</actionGroup>
113+
<actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditPanel3">
114+
<argument name="section" value="TabOnStage"/>
115+
<argument name="targetIndex" value="3"/>
116+
</actionGroup>
117+
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBorderWidth3">
118+
<argument name="property" value="PageBuilderAdvancedBorderWidthProperty_Empty"/>
119+
</actionGroup>
120+
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBorderRadius3">
121+
<argument name="property" value="PageBuilderAdvancedBorderRadiusProperty_Empty"/>
122+
</actionGroup>
123+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings3"/>
124+
<dontSeeJsError stepKey="doNotSeeJSErrorInConsole"/>
108125
<!-- Verify in Admin Preview -->
109126
<actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage"/>
110127
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
@@ -119,6 +136,14 @@
119136
<comment userInput="Verify tab 2 on stage" stepKey="AC4"/>
120137
<waitForPageLoad stepKey="waitForPageLoadAdmin" time="30"/>
121138
<waitForElementVisible selector="{{TabOnStage.tab2ContentAdvancedStyles}}" stepKey="seeTab2ContentAdvancedStylesInAdminPreview"/>
139+
<actionGroup ref="switchTabs" stepKey="switchTabsAdmin2">
140+
<argument name="section" value="TabOnStage"/>
141+
<argument name="from" value="2"/>
142+
<argument name="to" value="3"/>
143+
</actionGroup>
144+
<comment userInput="Verify Tab 3 on Stage" stepKey="verifyTab3OnStage"/>
145+
<waitForPageLoad stepKey="waitForPageLoadAdmin2" time="30"/>
146+
<waitForElementVisible selector="{{TabOnStage.tab3ContentAdvancedStyles}}" stepKey="seeTab3ContentAdvancedStylesInAdminPreview"/>
122147
<!-- Verify in Storefront -->
123148
<amOnPage url="{{PageBuilderTabsContentType.name}}{{PageBuilderPageTitle.pageName}}" stepKey="amOnPageBuilderPage"/>
124149
<waitForPageLoad stepKey="waitForPageLoadStoreFront" time="30"/>
@@ -134,5 +159,10 @@
134159
<waitForElementVisible selector="{{TabOnStorefront.tabContentAdvancedStyles('2', PageBuilderAdvancedAlignmentPropertyRight.value, PageBuilderMarginsPropertyUnique.value, PageBuilderPaddingPropertyUnique.value)}}" stepKey="seeTabHeaderItemAdvancedStylesInStorefront2"/>
135160
<waitForElementVisible selector="{{TabOnStorefront.tabContentAdvancedStylesBorder('2', PageBuilderAdvancedBorderPropertyDotted.value, PageBuilderAdvancedBorderColorProperty_FF0000.rgb, PageBuilderAdvancedBorderWidthProperty500.value, PageBuilderAdvancedBorderRadiusProperty500.value)}}" stepKey="seeTabContentAdvancedStylesBorderInStorefront2"/>
136161
<waitForElementVisible selector="{{TabOnStorefront.tabContentAdvancedClass('2', PageBuilderAdvancedCssClassesPropertyOneClass.value)}}" stepKey="seeTabContentClassInStorefront2"/>
162+
<click selector="{{TabOnStorefront.tabHeader('3')}}" stepKey="switchToTab3Storefront"/>
163+
<waitForPageLoad stepKey="waitForTabChangeAnimationStorefront2" time="30"/>
164+
<scrollToTopOfPage stepKey="scrollToTopOfPage2"/>
165+
<waitForElementVisible selector="{{TabOnStorefront.container('3')}}" stepKey="seeNewTabContent2"/>
166+
<comment userInput="Verify Tab 3 on Storefront" stepKey="verifyTab3OnStorefront"/>
137167
</test>
138168
</tests>

0 commit comments

Comments
 (0)