Skip to content

Commit dd7cfaf

Browse files
author
joiecaquicla
committed
Merge branch '637-form-field-functional-tests' of github.com:yolouiese/magento2-page-builder into 637-form-field-functional-tests
2 parents 0189eff + 74faa57 commit dd7cfaf

File tree

4 files changed

+28
-11
lines changed

4 files changed

+28
-11
lines changed

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/EditFormActionGroup/ValidateMobileIconTooltipInContentTypeEditFormActionGroup.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,15 @@
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1010
<actionGroup name="ValidateMobileIconTooltipInContentTypeEditFormActionGroup">
11-
<waitForElementVisible selector="{{PageBuilderViewportFormSection.mobileIcon}}" stepKey="verifyMobileIconInEditFormIsVisible"/>
12-
<moveMouseOver selector="{{PageBuilderViewportFormSection.mobileIconTooltip}}" stepKey="mouseOverMobileIconTooltipInEditForm"/>
13-
<waitForElementVisible selector="{{PageBuilderViewportFormSection.mobileIconTooltipContent}}" stepKey="verifyMobileIconTooltipContentInEditFormIsVisible"/>
14-
<waitForText userInput="Style changes will only affect this breakpoint" stepKey="verifyMobileIconTooltipTextInEditForm"/>
11+
<annotations>
12+
<description>Verifies that the mobile icon and tooltip appear for the specified Edit Form field</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="property" defaultValue="PageBuilderMinHeightProperty_Empty"/>
16+
</arguments>
17+
<waitForElementVisible selector="{{PageBuilderViewportFormSection.mobileIconField(property.section, property.fieldName)}}" stepKey="waitForTooltip"/>
18+
<moveMouseOver selector="{{PageBuilderViewportFormSection.mobileFieldTooltip(property.section, property.fieldName)}}" stepKey="mouseOverTooltip"/>
19+
<waitForElementVisible selector="{{PageBuilderViewportFormSection.mobileFieldTooltipContent(property.section, property.fieldName)}}" stepKey="waitForTooltipContentVisible"/>
20+
<waitForText userInput="{{property.tooltipText}}" selector="{{PageBuilderViewportFormSection.mobileFieldTooltipContent(property.section, property.fieldName))}}" stepKey="seeTooltipContent"/>
1521
</actionGroup>
1622
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/EditFormActionGroup/ValidateMobileIconTooltipNotVisibleInEditFormActionGroup.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1010
<actionGroup name="ValidateMobileIconTooltipNotVisibleInEditFormActionGroup">
11-
<dontSeeElementInDOM selector="{{PageBuilderViewportFormSection.mobileIcon}}" stepKey="verifyMobileIconInEditFormIsNotVisible"/>
12-
<dontSeeElementInDOM selector="{{PageBuilderViewportFormSection.mobileIconTooltipContent}}" stepKey="verifyMobileIconTooltipContentInEditFormIsNotVisible"/>
11+
<annotations>
12+
<description>Verifies that the mobile icon and tooltip do not exist for the specified Edit Form field</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="property" defaultValue="PageBuilderMinHeightProperty_Empty"/>
16+
</arguments>
17+
<dontSeeElementInDOM selector="{{PageBuilderViewportFormSection.mobileIconField(property.section, property.fieldName)}}" stepKey="verifyMobileIconIsNotVisible"/>
18+
<dontSeeElementInDOM selector="{{PageBuilderViewportFormSection.mobileFieldTooltipContent(property.section, property.fieldName)}}" stepKey="verifyTooltipIsNotVisible"/>
1319
</actionGroup>
1420
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderEditFormSection/PageBuilderViewportFormSection.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="PageBuilderViewportFormSection">
11+
<!-- Mobile Icon Tooltip Container -->
12+
<element name="mobileFieldTooltip" type="button" parameterized="true" selector="//aside//*[@data-index='{{section}}']/descendant::*[@name='{{field}}']/ancestor::*[contains(@class,'admin__field-control')]/descendant::div[contains(@class,'admin__field-tooltip')]"/>
1113
<!-- Mobile Icon -->
12-
<element name="mobileIcon" type="text" selector="//div[contains(@class,'admin__field-min-height')]//div[contains(@class,'_with-tooltip')]//div[contains(@class,'admin__field-tooltip')]//a[contains(@class,'admin__field-tooltip-action')]"/>
14+
<element name="mobileIconField" type="button" parameterized="true" selector="//aside//*[@data-index='{{section}}']/descendant::*[@name='{{field}}']/ancestor::*[contains(@class,'admin__field-control')]/descendant::a[contains(@class,'admin__field-tooltip-action')]"/>
1315
<!-- Mobile Icon Tooltip -->
14-
<element name="mobileIconTooltip" type="text" selector="//div[contains(@class,'admin__field-min-height')]//div[contains(@class,'_with-tooltip')]//div[contains(@class,'admin__field-tooltip')]"/>
15-
<element name="mobileIconTooltipContent" type="text" selector="//div[contains(@class,'admin__field-min-height')]//div[contains(@class,'_with-tooltip')]//div[contains(@class,'admin__field-tooltip')]//div[contains(@class,'admin__field-tooltip-content')]"/>
16+
<element name="mobileFieldTooltipContent" type="text" parameterized="true" selector="//aside//*[@data-index='{{section}}']/descendant::*[@name='{{field}}']/ancestor::*[contains(@class,'admin__field-control')]/descendant::*[contains(@class,'admin__field-tooltip-content')]"/>
1617
</section>
1718
</sections>

app/code/Magento/PageBuilder/Test/Mftf/Test/ViewportSwitcherMobile/ViewportSwitcherMobileRowMinHeightTest.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@
6363
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterMinHeight500px1">
6464
<argument name="property" value="PageBuilderMinHeightProperty_500px"/>
6565
</actionGroup>
66-
<actionGroup ref="ValidateMobileIconTooltipNotVisibleInEditFormActionGroup" stepKey="verifyNoMobileIconTooltip"/>
66+
<actionGroup ref="ValidateMobileIconTooltipNotVisibleInEditFormActionGroup" stepKey="verifyNoMobileIconTooltip">
67+
<argument name="property" value="PageBuilderMinHeightProperty_500px"/>
68+
</actionGroup>
6769
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings1"/>
6870
<!-- Row 1: Mobile Empty Min Height -->
6971
<actionGroup ref="AdminSwitchPageBuilderViewportActionGroup" stepKey="switchToMobileViewport1">
@@ -74,7 +76,9 @@
7476
<argument name="contentType" value="PageBuilderRowContentType"/>
7577
<argument name="index" value="1"/>
7678
</actionGroup>
77-
<actionGroup ref="ValidateMobileIconTooltipInContentTypeEditFormActionGroup" stepKey="verifyMobileIconTooltip"/>
79+
<actionGroup ref="ValidateMobileIconTooltipInContentTypeEditFormActionGroup" stepKey="verifyMobileIconTooltip">
80+
<argument name="property" value="PageBuilderMinHeightProperty_Empty"/>
81+
</actionGroup>
7882
<actionGroup ref="seeInFieldSlideOutProperty" stepKey="validateEmptyHeightField">
7983
<argument name="property" value="PageBuilderMinHeightProperty_Empty"/>
8084
</actionGroup>

0 commit comments

Comments
 (0)