Skip to content

Commit e4e69b2

Browse files
committed
#558: Developer can style content types output differently per viewport
- I made refactoring follow groups: ValidateAdvancedConfigurationWithNoMarginsActionGroup ValidateBackgroundConfigurationWithNoImageActionGroup
1 parent 63d3be1 commit e4e69b2

File tree

2 files changed

+15
-35
lines changed

2 files changed

+15
-35
lines changed

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/AdvancedConfigurationActionGroup/ValidateAdvancedConfigurationWithNoMarginsActionGroup.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,10 @@
2929
</assertEquals>
3030
<remove keyForRemoval="waitForCSSClassesVisible"/>
3131
<waitForElementVisible selector="{{page.noCssClasses(index)}}" stepKey="waitForCSSClassesVisible" after="assertBorderRadius"/>
32+
<remove keyForRemoval="assertMargin"/>
33+
<assertEquals stepKey="assertNoMargins" after="grabMarginValue">
34+
<expectedResult type="string">{{defaultMargin}}</expectedResult>
35+
<actualResult type="variable">grabMarginValue</actualResult>
36+
</assertEquals>
3237
</actionGroup>
3338
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/BackgroundConfigurationActionGroup/ValidateBackgroundConfigurationWithNoImageActionGroup.xml

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,20 @@
66
*/
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
9-
<actionGroup name="ValidateBackgroundConfigurationWithNoImageActionGroup">
9+
<actionGroup name="ValidateBackgroundConfigurationWithNoImageActionGroup" extends="ValidateAllBackgroundAttributesActionGroup">
1010
<annotations>
1111
<description>Validate background configuration (excl. images)</description>
1212
</annotations>
1313
<arguments>
14-
<argument name="section"/>
15-
<argument name="backgroundColor"/>
16-
<argument name="backgroundPosition" defaultValue="PageBuilderBackgroundPosition_Default"/>
17-
<argument name="backgroundSize" defaultValue="PageBuilderBackgroundSize_Default"/>
18-
<argument name="backgroundRepeat" defaultValue="PageBuilderBackgroundRepeat_Default"/>
19-
<argument name="backgroundAttachment" defaultValue="PageBuilderBackgroundAttachment_Default"/>
20-
<argument name="index" defaultValue="1" type="string"/>
14+
<argument name="backgroundColor"/>
15+
<argument name="backgroundImage" defaultValue=""/>
2116
</arguments>
22-
<comment userInput="ValidateBackgroundConfigurationWithNoImageActionGroup" stepKey="comment"/>
23-
<waitForElementVisible selector="{{section.base(index)}}" stepKey="waitForBaseElement"/>
24-
<executeJS function="return window.getComputedStyle(document.evaluate('{{section.backgroundPath(index)}}', document.body).iterateNext()).backgroundColor" stepKey="grabBackgroundColorValue"/>
25-
<assertEquals stepKey="assertBackgroundColor">
26-
<expectedResult type="string">{{backgroundColor.rgb}}</expectedResult>
27-
<actualResult type="variable">grabBackgroundColorValue</actualResult>
28-
</assertEquals>
29-
<executeJS function="return window.getComputedStyle(document.evaluate('{{section.backgroundPath(index)}}', document.body).iterateNext()).backgroundPosition" stepKey="grabBackgroundPositionValue"/>
30-
<assertEquals stepKey="assertBackgroundPosition">
31-
<expectedResult type="string">{{backgroundPosition.computedStyleValue}}</expectedResult>
32-
<actualResult type="variable">grabBackgroundPositionValue</actualResult>
33-
</assertEquals>
34-
<executeJS function="return window.getComputedStyle(document.evaluate('{{section.backgroundPath(index)}}', document.body).iterateNext()).backgroundSize" stepKey="grabBackgroundSizeValue"/>
35-
<assertEquals stepKey="assertBackgroundSize">
36-
<expectedResult type="string">{{backgroundSize.value}}</expectedResult>
37-
<actualResult type="variable">grabBackgroundSizeValue</actualResult>
38-
</assertEquals>
39-
<executeJS function="return window.getComputedStyle(document.evaluate('{{section.backgroundPath(index)}}', document.body).iterateNext()).backgroundRepeat" stepKey="grabBackgroundRepeatValue"/>
40-
<assertEquals stepKey="assertBackgroundRepeat">
41-
<expectedResult type="string">{{backgroundRepeat.value}}</expectedResult>
42-
<actualResult type="variable">grabBackgroundRepeatValue</actualResult>
43-
</assertEquals>
44-
<executeJS function="return window.getComputedStyle(document.evaluate('{{section.backgroundPath(index)}}', document.body).iterateNext()).backgroundAttachment" stepKey="grabBackgroundAttachmentValue"/>
45-
<assertEquals stepKey="assertBackgroundAttachment">
46-
<expectedResult type="string">{{backgroundAttachment.value}}</expectedResult>
47-
<actualResult type="variable">grabBackgroundAttachmentValue</actualResult>
48-
</assertEquals>
17+
<remove keyForRemoval="comment"/>
18+
<comment userInput="ValidateBackgroundConfigurationWithNoImageActionGroup" stepKey="comment" before="waitForBaseElement"/>
19+
<remove keyForRemoval="backgroundImageRawValue"/>
20+
<remove keyForRemoval="backgroundImageValue"/>
21+
<remove keyForRemoval="regexFilePath"/>
22+
<remove keyForRemoval="actualImageResult"/>
23+
<remove keyForRemoval="assertBackgroundImageContainsFileInformation"/>
4924
</actionGroup>
5025
</actionGroups>

0 commit comments

Comments
 (0)