Skip to content

Commit

Permalink
Merge pull request #651 from hannahnida/558_7_content-type-style-attr…
Browse files Browse the repository at this point in the history
…ibute-removal

[WIP] #558 #7 Developer can style content types output differently per viewport - Fix broken tests
  • Loading branch information
omiroshnichenko authored Oct 19, 2020
2 parents 4053222 + b0a71e6 commit 88e60f3
Show file tree
Hide file tree
Showing 417 changed files with 9,302 additions and 3,371 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="ValidateAdvancedConfigurationAllOptionsActionGroup">
<annotations>
<description value="Validates styles from Advanced configuration in content type settings"/>
</annotations>
<arguments>
<argument name="page" defaultValue=""/>
<argument name="alignment" defaultValue="PageBuilderAdvancedAlignmentPropertyDefault"/>
<argument name="border" defaultValue="PageBuilderAdvancedBorderPropertyNone"/>
<argument name="borderColor" defaultValue=""/>
<argument name="borderWidth" defaultValue="PageBuilderAdvancedBorderWidthPropertyDefault"/>
<argument name="borderRadius" defaultValue="PageBuilderAdvancedBorderRadiusDefaultProperty"/>
<argument name="cssClasses" defaultValue=""/>
<argument name="margin" defaultValue="PageBuilderMarginsPropertyDefault"/>
<argument name="padding" defaultValue="PageBuilderPaddingPropertyDefault"/>
<argument name="index" defaultValue="1" type="string"/>
</arguments>
<waitForElementVisible selector="{{page.base(index)}}" stepKey="waitForElementVisible"/>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).textAlign" stepKey="grabAlignmentValue"/>
<assertEquals stepKey="assertAlignment">
<expectedResult type="string">{{alignment.value}}</expectedResult>
<actualResult type="variable">grabAlignmentValue</actualResult>
</assertEquals>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).borderStyle" stepKey="grabBorderStyleValue"/>
<assertEquals stepKey="assertBorderStyle">
<expectedResult type="string">{{border.value}}</expectedResult>
<actualResult type="variable">grabBorderStyleValue</actualResult>
</assertEquals>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).borderColor" stepKey="grabBorderColorValue"/>
<assertEquals stepKey="assertBorderColor">
<expectedResult type="string">{{borderColor.rgb}}</expectedResult>
<actualResult type="variable">grabBorderColorValue</actualResult>
</assertEquals>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).borderWidth.replace(&quot;px&quot;, &quot;&quot;)" stepKey="grabBorderWidthValue"/>
<assertEquals stepKey="assertBorderWidth">
<expectedResult type="string">{{borderWidth.value}}</expectedResult>
<actualResult type="variable">grabBorderWidthValue</actualResult>
</assertEquals>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).borderRadius.replace(/px/g, &quot;&quot;)" stepKey="grabBorderRadiusValue"/>
<assertEquals stepKey="assertBorderRadius">
<expectedResult type="string">{{borderRadius.value}}</expectedResult>
<actualResult type="variable">grabBorderRadiusValue</actualResult>
</assertEquals>
<waitForElementVisible selector="{{page.cssClasses(index, cssClasses.value)}}" stepKey="waitForCSSClassesVisible"/>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).margin.replace(/px/g, &quot;&quot;)" stepKey="grabMarginValue"/>
<assertEquals stepKey="assertMargin">
<expectedResult type="string">{{margin.value}}</expectedResult>
<actualResult type="variable">grabMarginValue</actualResult>
</assertEquals>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).padding.replace(/px/g, &quot;&quot;)" stepKey="grabPaddingValue"/>
<assertEquals stepKey="assertPadding">
<expectedResult type="string">{{padding.value}}</expectedResult>
<actualResult type="variable">grabPaddingValue</actualResult>
</assertEquals>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="ValidateAdvancedConfigurationNotSetActionGroup" extends="ValidateAdvancedConfigurationWithAllUpdatedNotVisibleActionGroup">
<annotations>
<description value="Validates Advanced configuration was not set"/>
</annotations>
<waitForElementVisible selector="{{page.noCssClasses(index)}}" stepKey="waitForCSSClasses"/>
<remove keyForRemoval="dontSeeCSSClasses"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="ValidateAdvancedConfigurationWithAlignmentActionGroup" extends="ValidateAdvancedConfigurationAllOptionsActionGroup">
<annotations>
<description value="Validates styles from Advanced configuration in without border and css classes"/>
</annotations>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).color" stepKey="grabColorValue" after="grabBorderColorValue"/>
<remove keyForRemoval="assertBorderColor"/>
<assertEquals stepKey="assertNoBorderColor" after="grabColorValue">
<expectedResult type="variable">grabBorderColorValue</expectedResult>
<actualResult type="variable">grabColorValue</actualResult>
</assertEquals>
<remove keyForRemoval="waitForCSSClassesVisible"/>
<waitForElementVisible selector="{{page.noCssClasses(index)}}" stepKey="waitForNoCSSClassesVisible" after="grabBorderRadiusValue"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="ValidateAdvancedConfigurationWithAllUpdatedNotVisibleActionGroup">
<annotations>
<description value="Validates Advanced configuration was not set"/>
</annotations>
<arguments>
<argument name="page" defaultValue=""/>
<argument name="border" defaultValue="PageBuilderAdvancedBorderPropertyNone"/>
<argument name="borderRadius" defaultValue="PageBuilderAdvancedBorderRadiusDefaultProperty"/>
<argument name="borderWidth" defaultValue="PageBuilderAdvancedBorderWidthProperty0"/>
<argument name="defaultAlignment" defaultValue="PageBuilderAdvancedAlignmentPropertyStart"/>
<argument name="defaultMargin" defaultValue="0" type="string"/>
<argument name="defaultPadding" defaultValue="0" type="string"/>
<argument name="cssClasses" defaultValue=""/>
<argument name="index" defaultValue="1" type="string"/>
</arguments>
<waitForElement selector="{{page.base(index)}}" stepKey="waitForElement"/>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).textAlign" stepKey="grabAlignmentValue"/>
<assertEquals stepKey="assertDefaultAlignmentVisible">
<expectedResult type="string">{{defaultAlignment.value}}</expectedResult>
<actualResult type="variable">grabAlignmentValue</actualResult>
</assertEquals>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).borderStyle" stepKey="grabBorderStyleValue"/>
<assertEquals stepKey="assertNoBorderStyle">
<expectedResult type="string">{{border.value}}</expectedResult>
<actualResult type="variable">grabBorderStyleValue</actualResult>
</assertEquals>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).borderColor" stepKey="grabBorderColorValue"/>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).color" stepKey="grabColorValue"/>
<assertEquals stepKey="assertNoBorderColor">
<expectedResult type="variable">grabBorderColorValue</expectedResult>
<actualResult type="variable">grabColorValue</actualResult>
</assertEquals>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).borderWidth.replace(&quot;px&quot;, &quot;&quot;)" stepKey="grabBorderWidthValue"/>
<assertEquals stepKey="assertNoBorderWidth">
<expectedResult type="string">{{borderWidth.value}}</expectedResult>
<actualResult type="variable">grabBorderWidthValue</actualResult>
</assertEquals>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).borderRadius.replace(&quot;px&quot;, &quot;&quot;)" stepKey="grabBorderRadiusValue"/>
<assertEquals stepKey="assertNoBorderRadius">
<expectedResult type="string">{{borderRadius.value}}</expectedResult>
<actualResult type="variable">grabBorderRadiusValue</actualResult>
</assertEquals>
<waitForElement selector="{{page.cssClasses(index, cssClasses.value)}}" stepKey="waitForCSSClasses"/>
<dontSeeElement selector="{{page.cssClasses(index, cssClasses.value)}}" stepKey="dontSeeCSSClasses"/>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).margin.replace(/px/g, &quot;&quot;)" stepKey="grabMarginValue"/>
<assertEquals stepKey="assertNoMarginVisible">
<expectedResult type="string">{{defaultMargin}}</expectedResult>
<actualResult type="variable">grabMarginValue</actualResult>
</assertEquals>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).padding.replace(/px/g, &quot;&quot;)" stepKey="grabPaddingValue"/>
<assertEquals stepKey="assertNoPaddingVisible">
<expectedResult type="string">{{defaultPadding}}</expectedResult>
<actualResult type="variable">grabPaddingValue</actualResult>
</assertEquals>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="ValidateAdvancedConfigurationWithBorderColorActionGroup" extends="ValidateAdvancedConfigurationAllOptionsActionGroup">
<annotations>
<description value="Validates Advanced configuration without Alignment and Css classes"/>
</annotations>
<arguments>
<argument name="page" defaultValue=""/>
<argument name="defaultAlignment" defaultValue="PageBuilderAdvancedAlignmentPropertyLeft"/>
<argument name="border" defaultValue="PageBuilderAdvancedBorderPropertyNone"/>
</arguments>
<assertEquals stepKey="assertAlignment">
<expectedResult type="string">{{defaultAlignment.value}}</expectedResult>
<actualResult type="variable">grabAlignmentValue</actualResult>
</assertEquals>
<waitForElementVisible selector="{{page.noCssClasses(index)}}" stepKey="waitForCSSClassesVisible"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="ValidateAdvancedConfigurationWithCssClassesActionGroup" extends="ValidateAdvancedConfigurationAllOptionsActionGroup">
<annotations>
<description value="Validates Advanced configuration without alignment and border"/>
</annotations>
<arguments>
<argument name="page" defaultValue=""/>
<argument name="defaultAlignment" defaultValue="PageBuilderAdvancedAlignmentPropertyLeft"/>
<argument name="border" defaultValue="PageBuilderAdvancedBorderPropertyNone"/>
<argument name="borderWidth" defaultValue="PageBuilderAdvancedBorderWidthProperty0"/>
</arguments>
<assertEquals stepKey="assertAlignment">
<expectedResult type="string">{{defaultAlignment.value}}</expectedResult>
<actualResult type="variable">grabAlignmentValue</actualResult>
</assertEquals>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).color" stepKey="grabColorValue" after="grabBorderColorValue"/>
<assertEquals stepKey="assertBorderColor">
<expectedResult type="variable">grabBorderColorValue</expectedResult>
<actualResult type="variable">grabColorValue</actualResult>
</assertEquals>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="ValidateAdvancedConfigurationWithNoAlignmentActionGroup" extends="ValidateAdvancedConfigurationAllOptionsActionGroup">
<annotations>
<description value="Validate Advanced Configuration without Alignment, Css classes and Border"/>
</annotations>
<arguments>
<argument name="page" defaultValue=""/>
<argument name="defaultAlignment" defaultValue="PageBuilderAdvancedAlignmentPropertyLeft"/>
<argument name="border" defaultValue="PageBuilderAdvancedBorderPropertyNone"/>
<argument name="borderWidth" defaultValue="PageBuilderAdvancedBorderWidthProperty0"/>
</arguments>
<assertEquals stepKey="assertAlignment">
<expectedResult type="string">{{defaultAlignment.value}}</expectedResult>
<actualResult type="variable">grabAlignmentValue</actualResult>
</assertEquals>
<executeJS function="return window.getComputedStyle(document.evaluate('{{page.advancedConfigurationPath(index)}}', document.body).iterateNext()).color" stepKey="grabColorValue" after="grabBorderColorValue"/>
<assertEquals stepKey="assertBorderColor">
<expectedResult type="variable">grabBorderColorValue</expectedResult>
<actualResult type="variable">grabColorValue</actualResult>
</assertEquals>
<waitForElementVisible selector="{{page.noCssClasses(index)}}" stepKey="waitForCSSClassesVisible"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="ValidateAdvancedConfigurationWithNoAlignmentNotVisibleActionGroup" extends="ValidateAdvancedConfigurationWithAllUpdatedNotVisibleActionGroup">
<annotations>
<description value="Validates Advanced configuration was not set and Css classes are not visible"/>
</annotations>
<waitForElement selector="{{page.noCssClasses(index)}}" stepKey="waitForCSSClasses"/>
<dontSeeElement selector="{{page.noCssClasses(index)}}" stepKey="dontSeeCSSClasses"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="ValidateAdvancedConfigurationWithNoBorderActionGroup" extends="ValidateAdvancedConfigurationAllOptionsActionGroup">
<annotations>
<description value="Validates styles from Advanced configuration without alignment and css classes"/>
</annotations>
<arguments>
<argument name="defaultAlignment" defaultValue="PageBuilderAdvancedAlignmentPropertyLeft"/>
<argument name="border" defaultValue="PageBuilderAdvancedBorderPropertyNone"/>
<argument name="borderWidth" defaultValue="PageBuilderAdvancedBorderWidthProperty0"/>
</arguments>
<assertEquals stepKey="assertAlignment">
<expectedResult type="string">{{defaultAlignment.value}}</expectedResult>
<actualResult type="variable">grabAlignmentValue</actualResult>
</assertEquals>
<remove keyForRemoval="grabBorderColorValue"/>
<remove keyForRemoval="assertBorderColor"/>
<waitForElementVisible selector="{{page.noCssClasses(index)}}" stepKey="waitForCSSClassesVisible"/>
</actionGroup>
</actionGroups>
Loading

0 comments on commit 88e60f3

Please sign in to comment.