Skip to content

Commit f678e77

Browse files
author
Hanna Hnida
committed
#557: #557 User access Row action panel with 2+ level nesting - Mftf tests fixes
1 parent a1fadaf commit f678e77

File tree

8 files changed

+59
-15
lines changed

8 files changed

+59
-15
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderRowSection/RowOnStageSection.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
<element name="baseCSS" type="text" selector="div.pagebuilder-content-type.pagebuilder-row"/>
1818
<element name="empty" type="button" selector="(//div[contains(@class,'pagebuilder-content-type') and contains(@class,'pagebuilder-row')])[{{arg1}}][contains(@class,'empty-container')]//div[contains(@class,'element-children') and contains(@class,'row-container')]" parameterized="true"/>
1919
<element name="emptyPlaceholder" type="button" selector="(//div[contains(@class,'pagebuilder-content-type') and contains(@class,'pagebuilder-row')])[{{arg1}}][contains(@class,'empty-container')]//div[contains(@class,'empty-placeholder')]" parameterized="true"/>
20-
<element name="affordance" type="text" selector="(//div[contains(@class,'pagebuilder-affordance-row') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]" parameterized="true"/>
20+
<element name="affordance" type="text" selector="(//div[contains(@class,&quot;pagebuilder-affordance-row&quot;) and contains(@class,&quot;pagebuilder-content-type&quot;)])[{{arg1}}]" parameterized="true"/>
21+
<element name="affordanceCSS" type="text" selector="div.pagebuilder-content-type-affordance.pagebuilder-affordance-row"/>
2122
<element name="displayLabel" type="text" selector="(//div[contains(@class,'pagebuilder-affordance-row') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]//div[contains(@class,'pagebuilder-display-label')]" parameterized="true"/>
2223
<element name="rowChildrenStyle" type="text" selector="(//div[contains(@class, 'pagebuilder-row')])[{{arg1}}]//div[contains(@class, 'element-children') and contains(@class, 'row-container')][contains(@style, '{{arg2}}')]" parameterized="true" deprecated="Styles are not inline"/>
2324
<element name="rowChildrenPath" type="text" selector="(//div[contains(@class, &quot;pagebuilder-row&quot;)])[{{arg1}}]//div[contains(@class, &quot;element-children&quot;) and contains(@class, &quot;row-container&quot;)]" parameterized="true"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderRowBackgroundAttributeTest/RowValidateVideoBackgroundPlayOnlyWhenVisibleDisabled.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@
8686
</actionGroup>
8787
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings4"/>
8888
<!-- Validate Stage -->
89+
<actionGroup ref="ScrollToActionGroup" stepKey="scrollRow4StageBeforeSave">
90+
<argument name="cssSelector" value="{{RowOnStage.affordanceCSS}}"/>
91+
<argument name="index" value="4"/>
92+
<argument name="verticalOffset" value="-100"/>
93+
</actionGroup>
8994
<wait time="5" stepKey="waitForVideoCompleteStage"/>
9095
<actionGroup ref="validateVideoBackgroundFinishedPlaying" stepKey="validateVideoFinishedPlayingStage1">
9196
<argument name="section" value="RowOnStage"/>
@@ -112,7 +117,11 @@
112117
<argument name="fallbackImage" value="PageBuilderVideoBackgroundFallbackImage_JPG"/>
113118
<argument name="index" value="4"/>
114119
</actionGroup>
115-
<scrollTo selector="{{RowOnStage.base('4')}}" stepKey="scrollRow4Stage"/>
120+
<actionGroup ref="ScrollToActionGroup" stepKey="scrollRow4Stage">
121+
<argument name="cssSelector" value="{{RowOnStage.affordanceCSS}}"/>
122+
<argument name="index" value="4"/>
123+
<argument name="verticalOffset" value="-100"/>
124+
</actionGroup>
116125
<actionGroup ref="validateVideoBackgroundFinishedPlayingBeforeViewing" stepKey="validateVideoFinishedPlayingStage3">
117126
<argument name="section" value="RowOnStage"/>
118127
<argument name="videoUrl" value="PageBuilderVideoBackgroundUrl_Mp4_URL"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderRowBackgroundAttributeTest/RowValidateVideoBackgroundPlayOnlyWhenVisibleEnabled.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@
7373
<argument name="property" value="PageBuilderVideoBackgroundPlayOnlyWhenVisible_Enabled"/>
7474
</actionGroup>
7575
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings4"/>
76+
<actionGroup ref="ScrollToActionGroup" stepKey="scrollRow4StageBeforeSave">
77+
<argument name="cssSelector" value="{{RowOnStage.affordanceCSS}}"/>
78+
<argument name="index" value="4"/>
79+
<argument name="verticalOffset" value="-100"/>
80+
</actionGroup>
7681
<!-- Stage: Validate Video is Playing -->
7782
<actionGroup ref="validateVideoBackgroundPlaying" stepKey="validateVideoPlayingStage1">
7883
<argument name="section" value="RowOnStage"/>
@@ -89,8 +94,9 @@
8994
<argument name="index" value="4"/>
9095
</actionGroup>
9196
<actionGroup ref="ScrollToActionGroup" stepKey="scrollRow4Stage">
92-
<argument name="cssSelector" value="{{RowOnStage.baseCSS}}"/>
97+
<argument name="cssSelector" value="{{RowOnStage.affordanceCSS}}"/>
9398
<argument name="index" value="4"/>
99+
<argument name="verticalOffset" value="-100"/>
94100
</actionGroup>
95101
<!-- Stage: Validate Video is Playing -->
96102
<actionGroup ref="validateVideoBackgroundPlaying" stepKey="validateVideoPlayingStage2">

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderRowTest/RowDuplicateTest.xml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,15 @@
167167
<argument name="borderWidth" value="PageBuilderAdvancedBorderWidthProperty10"/>
168168
<argument name="borderRadius" value="PageBuilderAdvancedBorderRadiusProperty12"/>
169169
<argument name="cssClasses" value="PageBuilderAdvancedCssClassesPropertyThreeClasses"/>
170-
<argument name="margin" value="PageBuilderMarginsPropertyUnique"/>
170+
<argument name="margin" value="PageBuilderMarginsPropertyDefault"/>
171171
<argument name="padding" value="PageBuilderPaddingPropertyUnique"/>
172172
<argument name="index" value="2"/>
173173
</actionGroup>
174+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="validateMarginStage">
175+
<argument name="selector" value="{{RowOnStage.affordance('2')}}"/>
176+
<argument name="expectedProperty" value="{{PageBuilderMarginsPropertyUnique.value}}"/>
177+
<argument name="cssProperty" value="margin"/>
178+
</actionGroup>
174179
<waitForElementVisible selector="{{RowOnStage.appearanceFullWidthFullBleed(('2', PageBuilderRowAppearance_FullWidth.value)}}" stepKey="waitForAppearanceVisible"/>
175180
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage2">
176181
<argument name="contentType" value="PageBuilderRowContentType"/>
@@ -278,10 +283,15 @@
278283
<argument name="borderWidth" value="PageBuilderAdvancedBorderWidthProperty10"/>
279284
<argument name="borderRadius" value="PageBuilderAdvancedBorderRadiusProperty12"/>
280285
<argument name="cssClasses" value="PageBuilderAdvancedCssClassesPropertyThreeClasses"/>
281-
<argument name="margin" value="PageBuilderMarginsPropertyUnique"/>
286+
<argument name="margin" value="PageBuilderMarginsPropertyDefault"/>
282287
<argument name="padding" value="PageBuilderPaddingPropertyUnique"/>
283288
<argument name="index" value="2"/>
284289
</actionGroup>
290+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="validateMarginStage2">
291+
<argument name="selector" value="{{RowOnStage.affordance('2')}}"/>
292+
<argument name="expectedProperty" value="{{PageBuilderMarginsPropertyUnique.value}}"/>
293+
<argument name="cssProperty" value="margin"/>
294+
</actionGroup>
285295
<waitForElementVisible selector="{{RowOnStage.appearanceFullWidthFullBleed(('2', PageBuilderRowAppearance_FullWidth.value)}}" stepKey="waitForAppearanceVisible2"/>
286296
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage3">
287297
<argument name="contentType" value="PageBuilderRowContentType"/>
@@ -356,8 +366,16 @@
356366
<comment userInput="Validate Storefront" stepKey="commentValidateStorefront"/>
357367
<!-- Validate content type is enabled in Storefront -->
358368
<comment userInput="Validate content type is enabled in Storefront" stepKey="commentValidateShownStorefront"/>
359-
<waitForElementVisible selector="{{RowOnStorefront.notHidden('1')}}" stepKey="waitForContentTypeShownStorefront1"/>
360-
<waitForElementVisible selector="{{RowOnStorefront.notHidden('2')}}" stepKey="waitForContentTypeShownStorefront2"/>
369+
<actionGroup ref="ValidateContentTypesStyleDoesNotEqualExpectedStyleActionGroup" stepKey="waitForContentTypeShownStorefront1">
370+
<argument name="selector" value="{{RowOnStorefront.main('1')}}"/>
371+
<argument name="notExpectedProperty" value="none"/>
372+
<argument name="cssProperty" value="display"/>
373+
</actionGroup>
374+
<actionGroup ref="ValidateContentTypesStyleDoesNotEqualExpectedStyleActionGroup" stepKey="waitForContentTypeShownStorefront2">
375+
<argument name="selector" value="{{RowOnStorefront.main('2')}}"/>
376+
<argument name="notExpectedProperty" value="none"/>
377+
<argument name="cssProperty" value="display"/>
378+
</actionGroup>
361379
<actionGroup ref="ValidateRowBackgroundConfigurationWithAllUpdatedAndParallaxEnabledActionGroup" stepKey="validateDuplicateOnStorefront">
362380
<argument name="page" value="RowOnStorefront_FullWidth_FullBleed"/>
363381
<argument name="index" value="2"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderRowTest/RowValidateAdvancedConfigurationDefaultValuesTest.xml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,15 @@
7171
<argument name="borderWidth" value="PageBuilderAdvancedBorderWidthProperty0"/>
7272
<argument name="borderColor" value="PageBuilderAdvancedBorderColorTransparent"/>
7373
<argument name="borderRadius" value="PageBuilderAdvancedBorderRadiusDefaultProperty"/>
74-
<argument name="margin" value="PageBuilderMarginsPropertyRowDefault"/>
74+
<argument name="margin" value="PageBuilderMarginsPropertyDefault"/>
7575
<argument name="padding" value="PageBuilderPaddingProperty10"/>
7676
<argument name="index" value="1"/>
7777
</actionGroup>
78+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="validateMarginStage">
79+
<argument name="selector" value="{{RowOnStage.affordance('1')}}"/>
80+
<argument name="expectedProperty" value="{{PageBuilderMarginsPropertyRowDefault.value}}"/>
81+
<argument name="cssProperty" value="margin"/>
82+
</actionGroup>
7883
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen"/>
7984
<actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage"/>
8085
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
@@ -86,10 +91,15 @@
8691
<argument name="borderColor" value="PageBuilderAdvancedBorderColorTransparent"/>
8792
<argument name="borderWidth" value="PageBuilderAdvancedBorderWidthProperty0"/>
8893
<argument name="borderRadius" value="PageBuilderAdvancedBorderRadiusDefaultProperty"/>
89-
<argument name="margin" value="PageBuilderMarginsPropertyRowDefault"/>
94+
<argument name="margin" value="PageBuilderMarginsPropertyDefault"/>
9095
<argument name="padding" value="PageBuilderPaddingProperty10"/>
9196
<argument name="index" value="1"/>
9297
</actionGroup>
98+
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="validateMarginStageAfterSave">
99+
<argument name="selector" value="{{RowOnStage.affordance('1')}}"/>
100+
<argument name="expectedProperty" value="{{PageBuilderMarginsPropertyRowDefault.value}}"/>
101+
<argument name="cssProperty" value="margin"/>
102+
</actionGroup>
93103
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage2">
94104
<argument name="contentType" value="PageBuilderRowContentType"/>
95105
</actionGroup>

app/code/Magento/PageBuilder/view/adminhtml/web/template/content-type/row/contained/preview.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
<div class="pagebuilder-affordance-row pagebuilder-content-type pagebuilder-content-type-affordance"
1212
ko-style="getStyle(data.inner, ['marginTop', 'marginBottom', 'marginLeft', 'marginRight'])"
1313
event="{ mouseover: onMouseOver, mouseout: onMouseOut }, mouseoverBubble: false">
14-
<div class="pagebuilder-display-label"
15-
text="function () { return displayLabel().toUpperCase(); }()"></div>
1614
<div class="pagebuilder-content-type no-system-border type-container pagebuilder-row children-min-height"
1715
attr="data.inner.attributes"
1816
ko-style="getStyleWithout(data.inner, ['marginTop', 'marginBottom', 'marginLeft', 'marginRight'])"
@@ -39,5 +37,7 @@
3937
css="placeholderCss()"
4038
translate="'Drag content types or columns here'"/>
4139
</div>
40+
<div class="pagebuilder-display-label"
41+
text="function () { return displayLabel().toUpperCase(); }()"/>
4242
</div>
4343
</div>

app/code/Magento/PageBuilder/view/adminhtml/web/template/content-type/row/full-bleed/preview.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
<div class="pagebuilder-affordance-row pagebuilder-content-type pagebuilder-content-type-affordance"
99
ko-style="getStyle(data.main, ['marginTop', 'marginBottom', 'marginLeft', 'marginRight'])"
1010
event="{ mouseover: onMouseOver, mouseout: onMouseOut }, mouseoverBubble: false">
11-
<div class="pagebuilder-display-label"
12-
text="function () { return displayLabel().toUpperCase(); }()"></div>
1311
<div class="pagebuilder-content-type type-container no-system-border pagebuilder-row children-min-height"
1412
attr="data.main.attributes"
1513
ko-style="getStyleWithout(data.main, ['marginTop', 'marginBottom', 'marginLeft', 'marginRight'])"
@@ -36,4 +34,6 @@
3634
css="placeholderCss()"
3735
translate="'Drag content types or columns here'"/>
3836
</div>
37+
<div class="pagebuilder-display-label"
38+
text="function () { return displayLabel().toUpperCase(); }()"/>
3939
</div>

app/code/Magento/PageBuilder/view/adminhtml/web/template/content-type/row/full-width/preview.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
<div class="pagebuilder-affordance-row pagebuilder-content-type pagebuilder-content-type-affordance"
99
ko-style="getStyle(data.main, ['marginTop', 'marginBottom', 'marginLeft', 'marginRight'])"
1010
event="{ mouseover: onMouseOver, mouseout: onMouseOut }, mouseoverBubble: false">
11-
<div class="pagebuilder-display-label"
12-
text="function () { return displayLabel().toUpperCase(); }()"></div>
1311
<div class="pagebuilder-content-type pagebuilder-row type-container no-system-border children-min-height"
1412
attr="data.main.attributes"
1513
ko-style="getStyleWithout(data.main, ['marginTop', 'marginBottom', 'marginLeft', 'marginRight'])"
@@ -36,4 +34,6 @@
3634
css="placeholderCss()"
3735
translate="'Drag content types or columns here'"/>
3836
</div>
37+
<div class="pagebuilder-display-label"
38+
text="function () { return displayLabel().toUpperCase(); }()"/>
3939
</div>

0 commit comments

Comments
 (0)