Skip to content

Commit a85798c

Browse files
author
Hwashiang Yu
committed
MC-11821: Changing row appearance with two rows on stage breaks admin
- Added inner element to full bleed appearance configuration - Added test coverage for this issue
1 parent 3cac900 commit a85798c

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed

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

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,4 +2023,81 @@
20232023
<argument name="backgroundImage" value="PageBuilderBackgroundImage_JPG"/>
20242024
</actionGroup>
20252025
</test>
2026+
<test name="RowFullBleedAppearanceNoErrorThrown">
2027+
<annotations>
2028+
<features value="PageBuilder"/>
2029+
<stories value="Row"/>
2030+
<title value="Can change from full-bleed appearance to contained appearance with no console error"/>
2031+
<description value="If user drags have a full-bleed appearance row in stage, they should be able to switch to contained appearance with no console error and failure."/>
2032+
<severity value="CRITICAL"/>
2033+
<useCaseId value="MC-11821"/>
2034+
<testCaseId value="MC-13726"/>
2035+
<group value="pagebuilder"/>
2036+
<group value="pagebuilder-row"/>
2037+
<group value="pagebuilder-rowGeneral"/>
2038+
<group value="pagebuilder-heading"/>
2039+
</annotations>
2040+
<before>
2041+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2042+
<actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/>
2043+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
2044+
</before>
2045+
<after>
2046+
<actionGroup ref="logout" stepKey="logout"/>
2047+
</after>
2048+
<actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle">
2049+
<argument name="contentType" value="PageBuilderRowContentType"/>
2050+
</actionGroup>
2051+
<!-- Add 2nd row and set appearance to Full Bleed -->
2052+
<comment userInput="Add 2nd row and set appearance to Full Width" stepKey="commentAdd2ndRow"/>
2053+
<actionGroup ref="dragContentTypeToDropZone" stepKey="dragRow2IntoStage">
2054+
<argument name="contentType" value="PageBuilderRowContentType"/>
2055+
<argument name="containerTargetType" value="PageBuilderStage"/>
2056+
<argument name="containerTargetIndex" value="1"/>
2057+
<argument name="contentTypeIndex" value="2"/>
2058+
<argument name="dropZoneIndex" value="2"/>
2059+
</actionGroup>
2060+
<seeNumberOfElements selector="{{RowOnStage.allRows}}" userInput="2" stepKey="seeElementRow"/>
2061+
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStageRow2">
2062+
<argument name="contentType" value="PageBuilderRowContentType"/>
2063+
<argument name="contentTypeIndex" value="2"/>
2064+
</actionGroup>
2065+
<actionGroup ref="chooseVisualSelectOption" stepKey="enterAppearanceRow2">
2066+
<argument name="property" value="PageBuilderRowAppearance_FullBleed"/>
2067+
</actionGroup>
2068+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsRow2"/>
2069+
<waitForElementVisible selector="{{RowOnStage.appearanceFullWidthFullBleed(('2', PageBuilderRowAppearance_FullBleed.value)}}" stepKey="waitForFullBleedAppearanceVisible"/>
2070+
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
2071+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
2072+
<!-- Set 2nd row appearance back to Contained -->
2073+
<comment userInput="Set 2nd row appearance back to Contained" stepKey="comment2ndRowRevert"/>
2074+
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStageRow2Revert">
2075+
<argument name="contentType" value="PageBuilderRowContentType"/>
2076+
<argument name="contentTypeIndex" value="2"/>
2077+
</actionGroup>
2078+
<actionGroup ref="chooseVisualSelectOption" stepKey="enterAppearanceRow2Revert">
2079+
<argument name="property" value="PageBuilderRowAppearance_Contained"/>
2080+
</actionGroup>
2081+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsRow2Revert"/>
2082+
<waitForElementVisible selector="{{RowOnStage.appearanceContained(('2', PageBuilderRowAppearance_Contained.value)}}" stepKey="waitForContainedAppearanceVisible"/>
2083+
<!-- Drag heading into 2nd row to make sure still works -->
2084+
<comment userInput="Drag heading into 2nd row to make sure still works" stepKey="comment2ndRowRevertFunctional"/>
2085+
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup">
2086+
<argument name="group" value="PageBuilderHeadingContentType"/>
2087+
</actionGroup>
2088+
<actionGroup ref="dragContentTypeToContainer" stepKey="dragHeaderToRow2Revert">
2089+
<argument name="contentType" value="PageBuilderHeadingContentType"/>
2090+
<argument name="contentTypeIndex" value="1"/>
2091+
<argument name="containerTargetType" value="PageBuilderRowContentType"/>
2092+
<argument name="containerTargetIndex" value="2"/>
2093+
</actionGroup>
2094+
<actionGroup ref="clickOutsideLiveEditHeading" stepKey="clickOutsideLiveEditHeading">
2095+
<argument name="index" value="1"/>
2096+
</actionGroup>
2097+
<dontSee selector="{{RowOnStage.empty('2')}}" stepKey="dontSeeRowTwoPlaceholder"/>
2098+
<actionGroup ref="removeEmptyContentTypeFromStage" stepKey="removeHeaderFromRow">
2099+
<argument name="contentType" value="PageBuilderHeadingContentType"/>
2100+
</actionGroup>
2101+
<dontSeeJsError stepKey="doNotSeeJSErrorInConsole"/>
2102+
</test>
20262103
</tests>

app/code/Magento/PageBuilder/view/adminhtml/pagebuilder/content_type/row.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
<attribute name="background_images" source="data-background-images"/>
147147
<css name="css_classes"/>
148148
</element>
149+
<element name="inner" />
149150
<element name="container">
150151
<style name="justify_content" source="justify_content"/>
151152
<static_style source="display" value="flex"/>

0 commit comments

Comments
 (0)