Skip to content

Commit 9a06d85

Browse files
Merge branch 'develop' of github.com:magento/magento2-page-builder into 567_widget_config
2 parents e1cd0f7 + 09d2fb8 commit 9a06d85

File tree

20 files changed

+460
-27
lines changed

20 files changed

+460
-27
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
9+
<actionGroup name="nextSlide">
10+
<annotations>
11+
<description>Clicks the "Next" arrow on a slider instance (irrespective of the arrow's state).</description>
12+
</annotations>
13+
<arguments>
14+
<argument name="sliderSection" defaultValue="SliderOnStage"/>
15+
<argument name="slideSection" defaultValue="SlideOnBackend"/>
16+
<argument name="sliderIndex" defaultValue="1" type="string"/>
17+
<argument name="slideIndex" defaultValue="1" type="string"/>
18+
</arguments>
19+
<waitForElementVisible selector="{{sliderSection.nextSlideArrow(sliderIndex)}}" stepKey="waitForNextSlideArrow"/>
20+
<click selector="{{sliderSection.nextSlideArrow(sliderIndex)}}" stepKey="clickNextSlideArrow"/>
21+
<waitForPageLoad stepKey="waitForPageLoad"/>
22+
<waitForElementVisible selector="{{slideSection.base(slideIndex)}}" stepKey="waitForSlide"/>
23+
</actionGroup>
24+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
9+
<actionGroup name="validateSliderAttributesActionGroup">
10+
<annotations>
11+
<description>Validates a slider instance based on its HTML attributes.</description>
12+
</annotations>
13+
<arguments>
14+
<argument name="sliderSection" defaultValue="SliderOnStage"/>
15+
<argument name="sliderIndex" defaultValue="1" type="string"/>
16+
<argument name="sliderAutoplay" defaultValue="{{PageBuilderSliderAutoPlay_Disabled.value}}" type="string"/>
17+
<argument name="sliderAutoplaySpeed" defaultValue="{{PageBuilderSliderAutoPlaySpeed_Default.value}}" type="string"/>
18+
<argument name="sliderFade" defaultValue="{{PageBuilderSliderFade_Disabled.value}}" type="string"/>
19+
<argument name="sliderInfiniteLoop" defaultValue="{{PageBuilderSliderInfiniteLoop_Disabled.value}}" type="string"/>
20+
<argument name="sliderShowArrows" defaultValue="{{PageBuilderSliderShowArrows_Disabled.value}}" type="string"/>
21+
<argument name="sliderShowDots" defaultValue="{{PageBuilderSliderShowDots_Enabled.value}}" type="string"/>
22+
</arguments>
23+
<waitForElementVisible selector="{{sliderSection.autoPlay(sliderIndex, sliderAutoplay)}}" stepKey="seeAutoplay"/>
24+
<waitForElementVisible selector="{{sliderSection.autoPlaySpeed(sliderIndex, sliderAutoplaySpeed)}}" stepKey="seeAutoplaySpeed"/>
25+
<waitForElementVisible selector="{{sliderSection.fade(sliderIndex, sliderFade)}}" stepKey="seeFade"/>
26+
<waitForElementVisible selector="{{sliderSection.infiniteLoop(sliderIndex, sliderInfiniteLoop)}}" stepKey="seeInfiniteLoop"/>
27+
<waitForElementVisible selector="{{sliderSection.showArrows(sliderIndex, sliderShowArrows)}}" stepKey="seeShowArrows"/>
28+
<waitForElementVisible selector="{{sliderSection.showDots(sliderIndex, sliderShowDots)}}" stepKey="seeShowDots"/>
29+
</actionGroup>
30+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AddInvalidFileToStage">
11+
<annotations>
12+
<description>Adds invalid file to Content Type and checks validation message</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="contentType" defaultValue="PageBuilderImageContentType"/>
16+
<argument name="file" defaultValue="PageBuilderImage_InvalidFileType"/>
17+
<argument name="section" defaultValue="ImageOnStageWithoutImageUploaded"/>
18+
<argument name="filePreview" defaultValue="ImageOnStageWithoutImageUploaded.imagePreview"/>
19+
<argument name="fileSource" defaultValue=""/>
20+
</arguments>
21+
<waitForElementVisible selector="{{section.base('1')}}" stepKey="waitForSectionArea"/>
22+
<moveMouseOver selector="{{section.base('1')}}" stepKey="hoverSectionArea"/>
23+
<waitForPageLoad stepKey="waitForPageLoad"/>
24+
<waitForElementVisible selector="{{PageBuilderStage.onHoverUploadImageButton(contentType.role, '1')}}" stepKey="waitForUploadImageButton"/>
25+
<attachFile userInput="{{file.value}}" selector="{{section.uploadImageInput('1')}}" stepKey="attachFile"/>
26+
<waitForPageLoad stepKey="waitForFileLoad"/>
27+
<waitForElementVisible selector="{{PageBuilderStage.modal}}" stepKey="waitForModal"/>
28+
<waitForElementVisible selector="{{PageBuilderStage.errorModalMessage(file.errorMessage)}}" stepKey="waitForModalMessage"/>
29+
<waitForElementVisible selector="{{PageBuilderStage.modalOk}}" stepKey="waitForModalOkButton"/>
30+
<click selector="{{PageBuilderStage.modalOk}}" stepKey="clickModalOkButton"/>
31+
<waitForElementNotVisible selector="{{PageBuilderStage.modal}}" stepKey="waitForModalGone"/>
32+
<dontSeeElementInDOM selector="{{filePreview}}" stepKey="dontSeeFilePreview"/>
33+
<dontSeeElementInDOM selector="{{fileSource}}" stepKey="dontSeeFileSource"/>
34+
</actionGroup>
35+
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/Data/ImageData.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@
7474
<data key="extension">jpg</data>
7575
<data key="path">wysiwyg</data>
7676
</entity>
77+
<entity name="PageBuilderImage_InvalidFileType" type="pagebuilder_image_property">
78+
<data key="name">Image</data>
79+
<data key="section">background</data>
80+
<data key="fieldName">image</data>
81+
<data key="value">dump.sql</data>
82+
<data key="fileName">dump</data>
83+
<data key="extension">sql</data>
84+
<data key="errorMessage">We don't recognize or support this file extension type. Allowed file types: JPG, GIF, PNG.</data>
85+
</entity>
7786
<!-- Image Mobile Image -->
7887
<entity name="PageBuilderMobileImagePropertyGif" type="pagebuilder_mobile_image_property">
7988
<data key="name">Mobile Image</data>

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderSliderSection/SliderOnFrontendSection.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
<element name="notHidden" type="button" selector="(//div[@data-content-type='slider'])[{{sliderIndex}}][not(contains(@style,'display: none'))]" parameterized="true"/>
1515
<element name="slideNavigationDot" type="button" selector="((//div[@data-content-type='slider'])[{{sliderIndex}}]//ul[@class='slick-dots']//button)[{{navigationDotIndex}}]" parameterized="true"/>
1616
<element name="previousSlideArrow" type="button" selector="(//div[@data-content-type='slider'])[{{sliderIndex}}]//button[contains(@class,'slick-arrow') and contains(@class,'slick-prev')]" parameterized="true"/>
17+
<element name="previousSlideArrowDisabled" type="button" selector="(//div[@data-content-type='slider'])[{{sliderIndex}}]//button[contains(@class,'slick-arrow') and contains(@class,'slick-prev') and contains(@class,'slick-disabled')]" parameterized="true"/>
18+
<element name="previousSlideArrowEnabled" type="button" selector="(//div[@data-content-type='slider'])[{{sliderIndex}}]//button[contains(@class,'slick-arrow') and contains(@class,'slick-prev') and not(contains(@class,'slick-disabled'))]" parameterized="true"/>
1719
<element name="nextSlideArrow" type="button" selector="(//div[@data-content-type='slider'])[{{sliderIndex}}]//button[contains(@class,'slick-arrow') and contains(@class,'slick-next')]" parameterized="true"/>
20+
<element name="nextSlideArrowDisabled" type="button" selector="(//div[@data-content-type='slider'])[{{sliderIndex}}]//button[contains(@class,'slick-arrow') and contains(@class,'slick-next') and contains(@class,'slick-disabled')]" parameterized="true"/>
21+
<element name="nextSlideArrowEnabled" type="button" selector="(//div[@data-content-type='slider'])[{{sliderIndex}}]//button[contains(@class,'slick-arrow') and contains(@class,'slick-next') and not(contains(@class,'slick-disabled'))]" parameterized="true"/>
1822
<!-- Settings Configuration -->
1923
<element name="autoPlay" type="button" selector="(//div[@data-content-type='slider'])[{{sliderIndex}}][@data-autoplay='{{autoplay}}']" parameterized="true"/>
2024
<element name="autoPlaySpeed" type="button" selector="(//div[@data-content-type='slider'])[{{sliderIndex}}][@data-autoplay-speed='{{autoplaySpeed}}']" parameterized="true"/>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<!-- It's safer to click the label, as Selenium will complain if it's not clicking the exact element -->
2727
<element name="modalDoNotShowThisAgain" type="input" selector="aside.modal-popup._show input[name='modal-dnsa'] + label"/>
2828
<element name="errorModal" type="button" selector="//div[@class='modal-content']//div[contains(text(), '{{arg1}}')]" parameterized="true"/>
29+
<element name="errorModalMessage" type="text" selector="//aside[contains(@class,'modal-popup')]//div[@class='modal-content']//div[.=&quot;{{arg1}}&quot;]" parameterized="true"/>
2930
<element name="dropZone" type="button" selector="(//div[contains(@class, &quot;{{arg1}}-container&quot;)])[{{arg2}}]//div[contains(@class,&quot;pagebuilder-drop-indicator&quot;)][{{arg3}}]" parameterized="true"/>
3031
<element name="contentTypeTotalInStage" type="button" selector=".pagebuilder-content-type.pagebuilder-{{arg1}}" parameterized="true"/>
3132
<element name="contentTypeInStage" type="button" selector="//div[contains(@class, &quot;pagebuilder-content-type&quot;) and contains(@class, &quot;pagebuilder-{{arg1}}&quot;)]" parameterized="true"/>

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderTabsSection/TabOnStageSection.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
<element name="tabHeaderItemActive" type="button" selector="//ul[contains(@class, 'tabs-navigation')]/li[{{arg1}}][contains(@class, 'ui-state-active')]" parameterized="true"/>
2020
<element name="tabHeaderItemAdvancedStyles" type="button" selector="(//div[contains(@class,'pagebuilder-tabs')]//descendant::*[contains(@class,'tabs-navigation')]/li[contains(@style, 'border-style: solid; border-radius: 12px; border-color: rgb(0, 0, 0); border-width: 10px; margin-bottom: -10px; margin-left: -10px;')])"/>
2121
<element name="tab1ContentAdvancedStyles" type="button" selector="(//div[contains(@class,'pagebuilder-tabs')]//div[contains(@class,'ui-tabs-panel')])[1]//div[contains(@class, 'pagebuilder-tab-item') and contains(@style, 'text-align: center;') and contains(@style, 'border-style: solid;') and contains(@style, 'border-color: rgb(0, 0, 0);') and contains(@style, 'border-width: 10px;') and contains(@style, 'border-radius: 12px;') and contains(@style, 'margin: 5px;') and contains(@style, 'padding: 5px;')]"/>
22-
<element name="tab2ContentAdvancedStyles" type="button" selector="(//div[contains(@class,'pagebuilder-tabs')]//div[contains(@class,'ui-tabs-panel')])[2]//div[contains(@class, 'pagebuilder-tab-item') and contains(@style, 'text-align: right;') and contains(@style, 'border-style: dotted;') and contains(@style, 'border-color: rgb(255, 0, 0);') and contains(@style, 'border-width: 500px;') and contains(@style, 'border-radius: 500px;') and contains(@style, 'margin: 1px 2px 3px 4px;') and contains(@style, 'padding: 1px 2px 3px 4px;')]"/>
22+
<element name="tab2ContentAdvancedStyles" type="button" selector="(//div[contains(@class,'pagebuilder-tabs')]//div[contains(@class,'ui-tabs-panel')])[2]//div[contains(@class, 'pagebuilder-tab-item')][not(contains(@style, 'border-width:'))][not(contains(@style, 'border-radius:'))]"/>
23+
<element name="tab3ContentAdvancedStyles" type="button" selector="(//div[contains(@class,'pagebuilder-tabs')]//div[contains(@class,'ui-tabs-panel')])[3]//div[contains(@class, 'pagebuilder-tab-item') and contains(@style, 'text-align: right;') and contains(@style, 'border-style: dotted;') and contains(@style, 'border-color: rgb(255, 0, 0);') and contains(@style, 'border-width: 500px;') and contains(@style, 'border-radius: 500px;') and contains(@style, 'margin: 1px 2px 3px 4px;') and contains(@style, 'padding: 1px 2px 3px 4px;')]"/>
2324
<element name="empty" type="button" selector="(//div[contains(@class, 'pagebuilder-tabs')]//div[contains(@class, 'pagebuilder-tab-item') and contains(@class, 'empty-container')])"/>
2425
<element name="openOptionsMenu" type="button" selector="(//ul[contains(@class,'tabs-navigation')]//a[contains(@class,'tab-title')])[{{arg1}}]" parameterized="true"/>
2526
<element name="optionsMenu" type="button" selector="(//ul[contains(@class,'tabs-navigation')]//div[contains(@class,'pagebuilder-options-wrapper')])[{{arg1}}]" parameterized="true"/>

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderTabsSection/TabOnStorefrontSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<element name="tabContentType" type="button" selector="(//div[@class='tabs-content']//div[@data-content-type='tab-item'])[{{arg1}}]/div[1]/hr" parameterized="true"/>
2727
<element name="tabContentText" type="button" selector="(//div[@class='tabs-content']//div[@data-content-type='tab-item'])[{{arg1}}]//div[contains(@data-content-type, 'text')][1]" parameterized="true"/>
2828
<element name="tabContentAdvancedStylesBorder" type="button" selector="(//div[@class='tabs-content']//div[@data-content-type='tab-item'])[{{arg1}}][contains(@style, 'border-style: {{arg2}}') and contains(@style, 'border-color: {{arg3}}') and contains(@style, 'border-width: {{arg4}}px') and contains(@style, 'border-radius: {{arg5}}px')]" parameterized="true"/>
29+
<element name="tabContentAdvancedStylesBorderEmpty" type="button" selector="(//div[@class='tabs-content']//div[@data-content-type='tab-item'])[{{arg1}}][contains(@style, 'border-style: {{arg2}}') and contains(@style, 'border-color: {{arg3}}')][not(contains(@style, 'border-width:'))][not(contains(@style, 'border-radius:'))]" parameterized="true"/>
2930
<element name="tabContentAdvancedStyles" type="button" selector="(//div[@class='tabs-content']//div[@data-content-type='tab-item'])[{{arg1}}][contains(@style, 'text-align: {{arg2}}') and contains(@style, 'margin: {{arg3}}px') and contains(@style, 'padding: {{arg4}}px')]" parameterized="true"/>
3031
<element name="tabContentAdvancedClass" type="button" selector="(//div[@class='tabs-content']//div[@data-content-type='tab-item'])[{{arg1}}][contains(@class, '{{arg2}}')]" parameterized="true"/>
3132
<!-- Background Configuration -->

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminCMSBlockPageBuilderTest/PageBuilderCmsBlockAddAndEditRowColumnSlideTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
<seeElement selector="{{RowOnStorefront.backgroundColor('3', PageBuilderBackgroundColor_Hex_Grey.rgb)}}" stepKey="seeBackgroundColorRowCMSPageStage" after="see3RowsCMSPageStage"/>
6969
<seeNumberOfElements selector="{{ColumnOnFrontend.allColumns}}" userInput="2" stepKey="see2ColumnsCMSPageStage" after="seeBackgroundColorRowCMSPageStage"/>
7070
<seeElement selector="{{ColumnOnFrontend.backgroundColor('2', PageBuilderBackgroundColor_Hex_White.rgb)}}" stepKey="seeBackgroundColorColumnCMSPageStage" after="see2ColumnsCMSPageStage"/>
71-
<seeElement selector="{{SlideOnFrontend.backgroundColor('2', PageBuilderBackgroundColor_Plaintext_Green.rgb)}}" stepKey="seeBackgroundColorSlide1CMSPageStage" after="seeBackgroundColorColumnCMSPageStage"/>
71+
<seeElement selector="{{SlideOnFrontend.backgroundColor('1', PageBuilderBackgroundColor_Plaintext_Green.rgb)}}" stepKey="seeBackgroundColorSlide1CMSPageStage" after="seeBackgroundColorColumnCMSPageStage"/>
7272
<actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage" after="seeBackgroundColorSlide1CMSPageStage"/>
7373
<!-- Validate CMS Page Storefront -->
7474
<actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToProductStorefront">

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminCatalogProductPageBuilderTest/PageBuilderCatalogProductAddAndEditRowColumnSlideTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,12 @@
150150
<seeElement selector="{{RowOnStorefront.backgroundColor('2', PageBuilderBackgroundColor_Hex_Grey.rgb)}}" stepKey="seeBackgroundColorRowStorefront"/>
151151
<seeNumberOfElements selector="{{ColumnOnFrontend.allColumns}}" userInput="2" stepKey="see2ColumnsStorefront"/>
152152
<seeElement selector="{{ColumnOnFrontend.backgroundColor('2', PageBuilderBackgroundColor_Hex_White.rgb)}}" stepKey="seeBackgroundColorColumnStorefront"/>
153-
<seeElement selector="{{SlideOnFrontend.backgroundColor('2', PageBuilderBackgroundColor_Plaintext_Green.rgb)}}" stepKey="seeBackgroundColorSlide1Storefront"/>
153+
<seeElement selector="{{SlideOnFrontend.backgroundColor('1', PageBuilderBackgroundColor_Plaintext_Green.rgb)}}" stepKey="seeBackgroundColorSlide1Storefront"/>
154154
<actionGroup ref="switchSlide" stepKey="switchSlideStorefront">
155155
<argument name="sliderSection" value="SliderOnFrontend"/>
156156
<argument name="slideSection" value="SlideOnFrontend"/>
157157
<argument name="slideIndex" value="2"/>
158158
</actionGroup>
159-
<seeElement selector="{{SlideOnFrontend.backgroundColor('3', PageBuilderBackgroundColor_RGB_Blue.rgb)}}" stepKey="seeBackgroundColorSlide2Storefront"/>
159+
<seeElement selector="{{SlideOnFrontend.backgroundColor('2', PageBuilderBackgroundColor_RGB_Blue.rgb)}}" stepKey="seeBackgroundColorSlide2Storefront"/>
160160
</test>
161161
</tests>

0 commit comments

Comments
 (0)