Skip to content

Commit 657e190

Browse files
author
Cari Spruiell
committed
Merge remote-tracking branch 'origin/MC-952-column-background' into MC-936-Full-Width-Page-Template
2 parents b57335c + d56dfcc commit 657e190

11 files changed

+554
-502
lines changed

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/ContentTypeColumnActionGroup.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,50 +19,50 @@
1919
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" x="10" y="0" stepKey="onMouseOverContentTypeStage"/>
2020
<waitForPageLoad time="30" stepKey="waitForMouseOverAnimation"/>
2121
<waitForElementVisible time="10" selector="{{PageBuilderContentTypeOptionsMenu.contentTypeOptionsMenuByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForOptions"/>
22-
<waitForElementVisible selector="{{PageBuilderColumnSection.columnMoveByIndex(contentTypeIndex)}}" stepKey="waitForMoveHandle"/>
23-
<dragAndDrop selector1="{{PageBuilderColumnSection.columnMoveByIndex(contentTypeIndex)}}" selector2="{{PageBuilderStage.contentTypeContainer(contentType.role, containerTargetIndex)}}" stepKey="moveContentTypeIntoContainer"/>
22+
<waitForElementVisible selector="{{ColumnOnBackend.columnMoveByIndex(contentTypeIndex)}}" stepKey="waitForMoveHandle"/>
23+
<dragAndDrop selector1="{{ColumnOnBackend.columnMoveByIndex(contentTypeIndex)}}" selector2="{{PageBuilderStage.contentTypeContainer(contentType.role, containerTargetIndex)}}" stepKey="moveContentTypeIntoContainer"/>
2424
<waitForPageLoad stepKey="waitForDragOperation" />
2525
</actionGroup>
2626
<actionGroup name="openGridSizeForm">
2727
<arguments>
2828
<argument name="index" defaultValue="1" type="string"/>
2929
</arguments>
30-
<waitForElementVisible selector="{{PageBuilderColumnSection.gridSizeButton(index)}}" stepKey="waitForGridSizeButtonVisible" />
31-
<click selector="{{PageBuilderColumnSection.gridSizeButton(index)}}" stepKey="clickGridSizeButton" />
30+
<waitForElementVisible selector="{{ColumnOnBackend.gridSizeButton(index)}}" stepKey="waitForGridSizeButtonVisible" />
31+
<click selector="{{ColumnOnBackend.gridSizeButton(index)}}" stepKey="clickGridSizeButton" />
3232
<waitForPageLoad stepKey="waitForAnimation" />
33-
<waitForElementVisible selector="{{PageBuilderColumnSection.gridSizeInput(index)}}" stepKey="waitForGridVisible" />
33+
<waitForElementVisible selector="{{ColumnOnBackend.gridSizeInput(index)}}" stepKey="waitForGridVisible" />
3434
</actionGroup>
3535
<actionGroup name="closeGridSizeForm">
3636
<arguments>
3737
<argument name="index" defaultValue="1" type="string"/>
3838
</arguments>
39-
<click selector="{{PageBuilderColumnSection.columnX('1')}}" stepKey="clickColumn" />
39+
<click selector="{{ColumnOnBackend.columnX('1')}}" stepKey="clickColumn" />
4040
<waitForPageLoad stepKey="waitForAnimation" />
41-
<waitForElementNotVisible selector="{{PageBuilderColumnSection.gridSizeInput(index)}}" stepKey="waitForGridNotVisible" />
41+
<waitForElementNotVisible selector="{{ColumnOnBackend.gridSizeInput(index)}}" stepKey="waitForGridNotVisible" />
4242
</actionGroup>
4343
<actionGroup name="updateGridSize">
4444
<arguments>
4545
<argument name="index" defaultValue="1" type="string"/>
4646
<argument name="gridSize" defaultValue="12" type="string"/>
4747
</arguments>
48-
<waitForElementVisible selector="{{PageBuilderColumnSection.gridSizeButton(index)}}" stepKey="waitForGridSizeButtonVisible" />
49-
<click selector="{{PageBuilderColumnSection.gridSizeButton(index)}}" stepKey="clickGridSizeButton" />
48+
<waitForElementVisible selector="{{ColumnOnBackend.gridSizeButton(index)}}" stepKey="waitForGridSizeButtonVisible" />
49+
<click selector="{{ColumnOnBackend.gridSizeButton(index)}}" stepKey="clickGridSizeButton" />
5050
<waitForPageLoad stepKey="waitForAnimation" />
51-
<waitForElementVisible selector="{{PageBuilderColumnSection.gridSizeInput(index)}}" stepKey="waitForGridVisible" />
52-
<fillField selector="{{PageBuilderColumnSection.gridSizeInput(index)}}" userInput="{{gridSize}}" stepKey="enterGridSize"/>
53-
<pressKey selector="{{PageBuilderColumnSection.gridSizeInput(index)}}" parameterArray="['su',\Facebook\WebDriver\WebDriverKeys::ENTER]" stepKey="pressKeyEnter"/>
51+
<waitForElementVisible selector="{{ColumnOnBackend.gridSizeInput(index)}}" stepKey="waitForGridVisible" />
52+
<fillField selector="{{ColumnOnBackend.gridSizeInput(index)}}" userInput="{{gridSize}}" stepKey="enterGridSize"/>
53+
<pressKey selector="{{ColumnOnBackend.gridSizeInput(index)}}" parameterArray="['su',\Facebook\WebDriver\WebDriverKeys::ENTER]" stepKey="pressKeyEnter"/>
5454
<waitForPageLoad stepKey="waitForUpdate" />
55-
<waitForElementVisible selector="{{PageBuilderColumnSection.displayLabelGridSize(index, gridSize)}}" stepKey="validateGridSize" />
55+
<waitForElementVisible selector="{{ColumnOnBackend.displayLabelGridSize(index, gridSize)}}" stepKey="validateGridSize" />
5656
</actionGroup>
5757
<actionGroup name="updateGridSizeInvalid">
5858
<arguments>
5959
<argument name="index" defaultValue="1" type="string"/>
6060
<argument name="gridSize" defaultValue="12" type="string"/>
6161
<argument name="errorMessage"/>
6262
</arguments>
63-
<fillField selector="{{PageBuilderColumnSection.gridSizeInput(index)}}" userInput="{{gridSize}}" stepKey="enterGridSize"/>
64-
<click selector="{{PageBuilderColumnSection.columnX(index)}}" stepKey="clickColumn" />
63+
<fillField selector="{{ColumnOnBackend.gridSizeInput(index)}}" userInput="{{gridSize}}" stepKey="enterGridSize"/>
64+
<click selector="{{ColumnOnBackend.columnX(index)}}" stepKey="clickColumn" />
6565
<waitForPageLoad stepKey="waitForAnimation" />
66-
<waitForElementVisible selector="{{PageBuilderColumnSection.gridSizeError(index, errorMessage)}}" stepKey="verifyError"/>
66+
<waitForElementVisible selector="{{ColumnOnBackend.gridSizeError(index, errorMessage)}}" stepKey="verifyError"/>
6767
</actionGroup>
6868
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/Page/PageBuilderCmsPage.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<section name="CmsPagesPageActionsSection"/>
1515
<section name="PageBuilderRowSection"/>
1616
<section name="AdminPageBuilderHeaderSection"/>
17-
<section name="ColumnsOnFrontend"/>
18-
<section name="PageBuilderColumnSection"/>
17+
<section name="ColumnOnFrontend"/>
18+
<section name="ColumnOnBackend"/>
1919
<section name="PageBuilderBlockSection"/>
2020
<section name="PageBuilderBannerSection"/>
2121
<section name="PageBuilderNewsletterSection"/>

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderColumnSection.xml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11-
<section name="PageBuilderColumnSection">
11+
<section name="ColumnOnBackend">
12+
<element name="base" type="button" selector="(//div[contains(@class,'pagebuilder-column') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]" parameterized="true"/>
1213
<element name="allColumns" type="text" selector="//div[contains(@class, 'pagebuilder-content-type') and contains(@class, 'pagebuilder-column')]"/>
1314
<element name="default" type="button" selector="(//div[contains(@class,'pagebuilder-content-type') and contains(@class,'pagebuilder-column')])[{{arg1}}][@style='border: {{arg2}}; border-radius: {{arg3}}px; margin: {{arg4}}px; padding: {{arg5}}px; width: {{arg6}}; background-size: {{arg7}}; background-repeat: {{arg8}}; background-attachment: {{arg9}}; align-self: {{arg10}};']" parameterized="true"/>
1415
<element name="empty" type="button" selector="(//div[contains(@class,'empty-container')]//div[contains(@class,'element-children') and contains(@class,'column-container')])[{{arg1}}]" parameterized="true"/>
@@ -28,8 +29,18 @@
2829
<element name="gridSizeTooltip" type="button" selector="(//div[contains(@class, 'pagebuilder-column-group')])[{{arg1}}]/descendant::div[contains(@class, 'grid-panel-tooltip')][1]" parameterized="true"/>
2930
<element name="gridSizeTooltipWithMax" type="button" selector="(//div[contains(@class, 'pagebuilder-column-group')])[{{arg1}}]/descendant::div[contains(@class, 'grid-panel-tooltip')][1]//span//p//span[text()='{{arg2}}']" parameterized="true"/>
3031
<element name="gridSizeError" type="button" selector="(//div[contains(@class, 'pagebuilder-column-group')])[{{arg1}}]/descendant::div[contains(@class, 'admin__field-error') and contains(text(), '{{arg2}}')]" parameterized="true"/>
32+
<!-- Background Configuration -->
33+
<element name="backgroundPosition" type="button" selector="(//div[contains(@class,'pagebuilder-column') and contains(@class,'pagebuilder-content-type')])[{{arg1}}][contains(@style,'background-position: {{arg2}};')]" parameterized="true"/>
34+
<element name="backgroundSize" type="button" selector="(//div[contains(@class,'pagebuilder-column') and contains(@class,'pagebuilder-content-type')])[{{arg1}}][contains(@style,'background-size: {{arg2}};')]" parameterized="true"/>
35+
<element name="backgroundRepeat" type="button" selector="(//div[contains(@class,'pagebuilder-column') and contains(@class,'pagebuilder-content-type')])[{{arg1}}][contains(@style,'background-repeat: {{arg2}};')]" parameterized="true"/>
36+
<element name="backgroundAttachment" type="button" selector="(//div[contains(@class,'pagebuilder-column') and contains(@class,'pagebuilder-content-type')])[{{arg1}}][contains(@style,'background-attachment: {{arg2}};')]" parameterized="true"/>
37+
<element name="backgroundColor" type="button" selector="(//div[contains(@class,'pagebuilder-column') and contains(@class,'pagebuilder-content-type')])[{{arg1}}][contains(@style,'background-color: {{arg2}};')]" parameterized="true"/>
38+
<element name="noBackgroundColor" type="button" selector="(//div[contains(@class,'pagebuilder-column') and contains(@class,'pagebuilder-content-type')])[{{arg1}}][not(contains(@style,'background-color:'))]" parameterized="true"/>
39+
<element name="backgroundImage" type="button" selector="(//div[contains(@class,'pagebuilder-column') and contains(@class,'pagebuilder-content-type')])[{{arg1}}][contains(@style,'background-image: url(') and contains(@style,'{{arg2}}')]" parameterized="true"/>
40+
<element name="noBackgroundImage" type="button" selector="(//div[contains(@class,'pagebuilder-column') and contains(@class,'pagebuilder-content-type')])[{{arg1}}][not(contains(@style,'background-image:'))]" parameterized="true"/>
3141
</section>
32-
<section name="ColumnsOnFrontend">
42+
<section name="ColumnOnFrontend">
43+
<element name="base" type="block" selector="(//div[@data-role='column'])[{{arg1}}]" parameterized="true"/>
3344
<element name="columnGroup" type="block" selector=".pagebuilder-column-group"/>
3445
<element name="allColumns" type="block" selector="(//div[@data-role='column'])"/>
3546
<element name="columnX" type="block" selector="[data-role=column]:nth-child({{arg1}})" parameterized="true"/>
@@ -68,5 +79,15 @@
6879
<element name="columnMargin" type="button" selector="[data-role='column']:first-child[style*='margin: 5px;']"/>
6980
<element name="columnPadding" type="button" selector="[data-role='column']:first-child[style*='padding: 5px;']"/>
7081
<element name="columnClass" type="button" selector="[data-role='column']:first-child.first-class.second-class.third-class"/>
82+
<!-- Background Configuration -->
83+
<element name="backgroundPosition" type="button" selector="(//div[@data-role='column'])[{{arg1}}][contains(@style,'background-position: {{arg2}};')]" parameterized="true"/>
84+
<element name="backgroundSize" type="button" selector="(//div[@data-role='column'])[{{arg1}}][contains(@style,'background-size: {{arg2}};')]" parameterized="true"/>
85+
<element name="backgroundRepeat" type="button" selector="(//div[@data-role='column'])[{{arg1}}][contains(@style,'background-repeat: {{arg2}};')]" parameterized="true"/>
86+
<element name="backgroundAttachment" type="button" selector="(//div[@data-role='column'])[{{arg1}}][contains(@style,'background-attachment: {{arg2}};')]" parameterized="true"/>
87+
<element name="backgroundColor" type="button" selector="(//div[@data-role='column'])[{{arg1}}][contains(@style,'background-color: {{arg2}};')]" parameterized="true"/>
88+
<element name="noBackgroundColor" type="button" selector="(//div[@data-role='column'])[{{arg1}}][not(contains(@style,'background-color:'))]" parameterized="true"/>
89+
<element name="backgroundImage" type="button" selector="(//div[@data-role='column'])[{{arg1}}][contains(@style,'background-image: url(') and contains(@style,'{{arg2}}')]" parameterized="true"/>
90+
<element name="noBackgroundImage" type="button" selector="(//div[@data-role='column'])[{{arg1}}][not(contains(@style,'background-image:'))]" parameterized="true"/>
91+
<element name="backgroundMobileImage" type="button" selector="(//div[@data-role='column'])[{{arg1}}][contains(@style,'background-image: url(') and contains(@style,'{{arg2}}')]" parameterized="true"/>
7192
</section>
7293
</sections>

0 commit comments

Comments
 (0)