Skip to content

Commit c5327f6

Browse files
author
hannahnida
committed
#558: Developer can style content types output differently per viewport - Added fixes in Column Content Type
1 parent 34cdc5b commit c5327f6

File tree

4 files changed

+7
-35
lines changed

4 files changed

+7
-35
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
<argument name="index" type="string" defaultValue="1"/>
1515
<argument name="parentIndex" type="string" defaultValue="1"/>
1616
<argument name="columnWidth" type="string" defaultValue="{{PageBuilderColumnStyles.widthHalf}}"/>
17+
<argument name="section" defaultValue="ColumnOnBackend"/>
1718
</arguments>
18-
<executeJS function="return Math.round(window.getComputedStyle(document.evaluate('{{ColumnOnBackend.columnConfigurationPath(index)}}', document.body).iterateNext()).width.replace(/px/g, &quot;&quot;))" stepKey="grabColumnWidthValue"/>
19-
<executeJS function="return Math.round(window.getComputedStyle(document.evaluate('{{ColumnOnBackend.columnGroupPath(parentIndex)}}', document.body).iterateNext()).width.replace(/px/g, &quot;&quot;) * {{columnWidth}})" stepKey="grabCalculatedColumnWidthValue"/>
19+
<executeJS function="return Math.round(window.getComputedStyle(document.evaluate('{{section.columnConfigurationPath(index)}}', document.body).iterateNext()).width.replace(/px/g, &quot;&quot;))" stepKey="grabColumnWidthValue"/>
20+
<executeJS function="return Math.round(window.getComputedStyle(document.evaluate('{{section.columnGroupPath(parentIndex)}}', document.body).iterateNext()).width.replace(/px/g, &quot;&quot;) * {{columnWidth}})" stepKey="grabCalculatedColumnWidthValue"/>
2021
<assertEquals stepKey="assertColumnWidthValue">
2122
<expectedResult type="variable">grabColumnWidthValue</expectedResult>
2223
<actualResult type="variable">grabCalculatedColumnWidthValue</actualResult>

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

Lines changed: 0 additions & 27 deletions
This file was deleted.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<element name="allColumns" type="block" selector="(//div[@data-content-type='column'])"/>
1717
<element name="columnX" type="block" selector="[data-content-type=column]:nth-child({{arg1}})" parameterized="true"/>
1818
<element name="columnConfigurationPath" type="text" selector="(//div[@data-content-type=&quot;column&quot;])[{{arg1}}]" parameterized="true"/>
19-
<element name="columnGroupConfigurationPath" type="text" selector="(//div[contains(@class, &quot;pagebuilder-column-group&quot;)])[{{arg1}}]" parameterized="true"/>
19+
<element name="columnGroupPath" type="text" selector="(//div[contains(@class, &quot;pagebuilder-column-group&quot;)])[{{arg1}}]" parameterized="true"/>
2020
<element name="columnStyle" type="button" selector="(//div[@data-content-type='column'])[{{arg1}}][contains(@style, '{{arg2}}')]" parameterized="true" deprecated="Styles are not inline"/>
2121
<element name="column1Height" type="button" selector="(//div[@data-content-type='column'])[1][contains(@style, 'min-height: 500px;')]" deprecated="Styles are not inline"/>
2222
<element name="column1HeightFull" type="button" selector="(//div[@data-content-type='column'])[1][contains(@style, 'align-self: stretch;')]" deprecated="Styles are not inline"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderTabItemContentTest/CanAddColumnToTabTest.xml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,9 @@
8383
<argument name="expectedProperty" value="{{PageBuilderBackgroundColor_Hex_Grey.rgb}}"/>
8484
<argument name="cssProperty" value="backgroundColor"/>
8585
</actionGroup>
86-
<actionGroup ref="ValidateContentTypeForCalculatedStyles" stepKey="seeColumn2DefaultWidthApplied">
87-
<argument name="selector" value="{{ColumnOnFrontend.base('2')}}"/>
88-
<argument name="wrapperSelector" value="{{ColumnOnFrontend.columnGroupConfigurationPath('1')}}"/>
89-
<argument name="expectedProperty" value="50%"/>
90-
<argument name="cssProperty" value="width"/>
86+
<actionGroup ref="ValidateColumnWidthActionGroup" stepKey="seeFirstColumnWidthDistributed">
87+
<argument name="index" value="2"/>
88+
<argument name="section" value="ColumnOnFrontend"/>
9189
</actionGroup>
9290
<actionGroup ref="ValidateContentTypeStylesActionGroup" stepKey="seeColumn2HeightApplied">
9391
<argument name="selector" value="{{ColumnOnFrontend.base('2')}}"/>

0 commit comments

Comments
 (0)