Skip to content

Commit 6fc1f5b

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

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/OptionsMenuActionGroup/OpenPageBuilderEditPanelActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
<moveMouseOver selector="{{PageBuilderPanel.searchPanel}}" stepKey="moveMouseToSearchPanel"/>
1717
<waitForElementVisible time="10" selector="{{PageBuilderStage.contentTypeInStage(contentType.role)}}" stepKey="waitForContentTypeInStageVisible"/>
1818
<executeJS function="return ['row', 'column'].include('{{contentType.role}}') ? '//div[contains(@class, &quot;pagebuilder-display-label&quot;) and contains(.,&quot;'+'{{contentType.role}}'.toUpperCase()+'&quot;)]' : ['tabs'].include('{{contentType.role}}') ? '//ul[@data-element=&quot;navigation&quot;]' : '';" stepKey="contentTypeLabelSelector" />
19-
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStage(contentType.role)}}{$contentTypeLabelSelector}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="onMouseOverContentTypeStage"/>
19+
<executeJS function="return ['row'].include('{{contentType.role}}') ? '//div[contains(@class, &quot;pagebuilder-content-type-affordance&quot;) and contains(@class, &quot;pagebuilder-affordance-{{contentType.role}}&quot;)]' : '//div[contains(@class, &quot;pagebuilder-content-type&quot;) and contains(@class, &quot;pagebuilder-{{contentType.role}}&quot;)]';" stepKey="contentTypeSelector" />
20+
<moveMouseOver selector="{$contentTypeSelector}{$contentTypeLabelSelector}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="onMouseOverContentTypeStage"/>
2021
<waitForPageLoad stepKey="waitForPageLoad"/>
2122
<waitForElementVisible time="10" selector="{{PageBuilderContentTypeOptionsMenu.contentTypeOptionsMenu(contentType.role)}}" stepKey="waitForOptions"/>
2223
<click selector="{{PageBuilderContentTypeOptionsMenu.contentTypeEdit(contentType.role)}}" stepKey="clickEditContentType"/>

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/OptionsMenuActionGroup/OpenPageBuilderEditPanelByIndexActionGroup.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
<argument name="contentTypeYCoordinate" defaultValue="null" type="string"/>
1616
</arguments>
1717
<executeJS function="return ['row', 'column'].include('{{contentType.role}}') ? '//div[contains(@class, &quot;pagebuilder-display-label&quot;) and contains(.,&quot;'+'{{contentType.role}}'.toUpperCase()+'&quot;)]' : ['tabs'].include('{{contentType.role}}') ? '//ul[@data-element=&quot;navigation&quot;]' : '';" stepKey="contentTypeLabelSelector" />
18-
<waitForElementVisible time="20" selector="{{PageBuilderStage.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}{$contentTypeLabelSelector}" stepKey="waitForContentTypeInStageVisible"/>
18+
<executeJS function="return ['row'].include('{{contentType.role}}') ? '(//div[contains(@class, &quot;pagebuilder-content-type-affordance&quot;) and contains(@class, &quot;pagebuilder-affordance-{{contentType.role}}&quot;)])[{{contentTypeIndex}}]' : '(//div[contains(@class, &quot;pagebuilder-content-type&quot;) and contains(@class, &quot;pagebuilder-{{contentType.role}}&quot;)])[{{contentTypeIndex}}]';" stepKey="contentTypeByIndexSelector" />
19+
<waitForElementVisible time="20" selector="{$contentTypeByIndexSelector}{$contentTypeLabelSelector}" stepKey="waitForContentTypeInStageVisible"/>
1920
<moveMouseOver stepKey="moveMouseOverSearch" selector="{{PageBuilderPanel.searchPanel}}" />
20-
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}{$contentTypeLabelSelector}" x="{{contentTypeXCoordinate}}" y="{{contentTypeYCoordinate}}" stepKey="onMouseOverContentTypeStage"/>
21+
<moveMouseOver selector="{$contentTypeByIndexSelector}{$contentTypeLabelSelector}" x="{{contentTypeXCoordinate}}" y="{{contentTypeYCoordinate}}" stepKey="onMouseOverContentTypeStage"/>
2122
<waitForPageLoad stepKey="waitForPageLoad"/>
2223
<waitForElementVisible time="10" selector="{{PageBuilderContentTypeOptionsMenu.contentTypeOptionsMenuByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForOptions"/>
2324
<waitForElementVisible selector="{{PageBuilderContentTypeOptionsMenu.contentTypeEditByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForEditButton"/>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,12 @@
131131
<actionGroup ref="validateFullWidthRowAppearance" stepKey="validateFullWidthRowAppearanceOnStage">
132132
<argument name="childContentType" value="PageBuilderHeadingContentType"/>
133133
<argument name="rowIndex" value="2"/>
134+
<argument name="affordanceValue" value="{{PageBuilderRowAffordanceWidth.value}}"/>
134135
</actionGroup>
135136
<actionGroup ref="validateFullBleedRowAppearance" stepKey="validateFullBleedRowAppearanceOnStage">
136137
<argument name="childContentType" value="PageBuilderHeadingContentType"/>
137138
<argument name="rowIndex" value="3"/>
139+
<argument name="affordanceValue" value="{{PageBuilderRowAffordanceWidth.value}}"/>
138140
</actionGroup>
139141
<!-- Validate Stage after save -->
140142
<comment userInput="Validate Stage after save" stepKey="commentValidateStageAfterSave"/>
@@ -148,10 +150,12 @@
148150
<actionGroup ref="validateFullWidthRowAppearance" stepKey="validateFullWidthRowAppearanceOnStage2">
149151
<argument name="childContentType" value="PageBuilderHeadingContentType"/>
150152
<argument name="rowIndex" value="2"/>
153+
<argument name="affordanceValue" value="{{PageBuilderRowAffordanceWidth.value}}"/>
151154
</actionGroup>
152155
<actionGroup ref="validateFullBleedRowAppearance" stepKey="validateFullBleedRowAppearanceOnStage2">
153156
<argument name="childContentType" value="PageBuilderHeadingContentType"/>
154157
<argument name="rowIndex" value="3"/>
158+
<argument name="affordanceValue" value="{{PageBuilderRowAffordanceWidth.value}}"/>
155159
</actionGroup>
156160
<!-- Validate Storefront -->
157161
<comment userInput="Validate Storefront" stepKey="commentValidateStorefront"/>

0 commit comments

Comments
 (0)