Skip to content

Commit f54d010

Browse files
committed
Merge branch 'MC-3228-slider-missing-tests' into cms-team-2-sprint-15
2 parents 9af6041 + a5a1df9 commit f54d010

20 files changed

+5341
-6792
lines changed

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

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,23 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="switchSlide">
11+
<actionGroup name="addSlide">
1212
<arguments>
13-
<argument name="section" defaultValue="SliderOnFrontend"/>
14-
<argument name="index" defaultValue="2" type="string"/>
13+
<argument name="slideGroupIndex" defaultValue="1" type="string"/>
1514
</arguments>
16-
<waitForElementVisible selector="{{SliderOnFrontend.slideNavigator(index)}}" stepKey="waitForSliderButton"/>
17-
<click selector="{{SliderOnFrontend.slideNavigator(index)}}" stepKey="clickSliderButton"/>
18-
<waitForPageLoad stepKey="waitForPageLoad"/>
19-
<waitForElementVisible selector="{{SlideOnFrontend.slide(index)}}" stepKey="waitForSlide"/>
20-
</actionGroup>
21-
<actionGroup name="unfocusSlideOptions">
22-
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="clickOutsideLiveEdit"/>
23-
<waitForPageLoad stepKey="waitForAnimation" time="30"/>
24-
<waitForElementNotVisible selector="{{SlideOnBackend.optionTitle}}" stepKey="dontSeeSlideOptionsEdit"/>
25-
</actionGroup>
26-
<actionGroup name="addSlide">
27-
<waitForElementVisible time="10" selector="{{SliderInAdmin.sliderContainer}}" stepKey="waitForContentTypeInStageVisible" />
28-
<click stepKey="focusOnSlider" selector="{{SliderInAdmin.sliderContainer}}"/>
29-
<scrollTo selector="div.pagebuilder-header" x="0" y="-100" stepKey="scrollToTop"/>
30-
<moveMouseOver selector="{{SliderInAdmin.sliderContainer}}" x="10" y="10" stepKey="onMouseOverContentTypeStage"/>
15+
<comment userInput="Adding Slide" stepKey="comment"/>
16+
<executeJS function="return document.getElementsByClassName('pagebuilder-slide').length+1" stepKey="initialNumberOfSlidesPlusOne"/>
17+
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unFocusSlide"/>
18+
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStageByIndex(PageBuilderSliderContentType.role, slideGroupIndex)}}" stepKey="mouseOverSlider"/>
3119
<waitForPageLoad stepKey="waitForPageLoad1"/>
32-
<waitForElementVisible time="5" selector="{{PageBuilderContentTypeOptionsMenu.contentTypeOptionsMenu(PageBuilderSliderContentType.role)}}" stepKey="seeContentTypeOptionsMenu"/>
33-
<moveMouseOver selector="{{PageBuilderContentTypeOptionsMenu.contentTypeOptionsMenu(PageBuilderSliderContentType.role)}}" stepKey="onMouseOverOptionsMenu"/>
34-
<click selector="{{PageBuilderContentTypeOptionsMenu.contentTypeAdd(PageBuilderSliderContentType.role)}}" stepKey="clickAddNewSlideChild"/>
20+
<waitForElementVisible selector="{{PageBuilderContentTypeOptionsMenu.contentTypeOptionsMenu(PageBuilderSliderContentType.role)}}" stepKey="waitForOptionsMenu"/>
21+
<waitForElementVisible selector="{{PageBuilderContentTypeOptionsMenu.contentTypeAdd(PageBuilderSliderContentType.role)}}" stepKey="waitForAddSlideButton"/>
22+
<click selector="{{PageBuilderContentTypeOptionsMenu.contentTypeAdd(PageBuilderSliderContentType.role)}}" stepKey="clickAddSlideButton"/>
3523
<waitForPageLoad stepKey="waitForPageLoad2"/>
24+
<executeJS function="return document.getElementsByClassName('pagebuilder-slide').length" stepKey="numberOfSlidesAfterAdd"/>
25+
<assertEquals stepKey="assertOneMoreSlide">
26+
<expectedResult type="variable">initialNumberOfSlidesPlusOne</expectedResult>
27+
<actualResult type="variable">numberOfSlidesAfterAdd</actualResult>
28+
</assertEquals>
3629
</actionGroup>
3730
</actionGroups>

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,4 +286,12 @@
286286
<waitForElementVisible selector="{{PageBuilderContentTypeOptionsMenu.contentTypeHide(contentType.role, targetIndex)}}" stepKey="waitForHideOptionVisible" />
287287
<dontSeeElementInDOM selector="{{section.hidden(targetIndex)}}" stepKey="dontSeeDomContentTypeHidden" />
288288
</actionGroup>
289+
<actionGroup name="unFocusOptionMenu">
290+
<arguments>
291+
<argument name="contentType"/>
292+
</arguments>
293+
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="clickSearchPanel"/>
294+
<waitForPageLoad stepKey="waitForAnimation"/>
295+
<waitForElementNotVisible selector="{{PageBuilderContentTypeOptionsMenu.contentTypeOptionsMenu(contentType.role)}}" stepKey="dontSeeOptionsMenu"/>
296+
</actionGroup>
289297
</actionGroups>

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,29 @@
7575
<data key="optionsList">[Top, Center, Bottom]</data>
7676
<data key="style">justify-content: flex-end</data>
7777
</entity>
78+
<!-- Appearance -->
79+
<entity name="PageBuilderAppearance_Poster" type="pagebuilder_appearance_property">
80+
<data key="name">Appearance</data>
81+
<data key="section">appearance_fieldset</data>
82+
<data key="fieldName">appearance</data>
83+
<data key="value">poster</data>
84+
</entity>
85+
<entity name="PageBuilderAppearance_CollageLeft" type="pagebuilder_appearance_property">
86+
<data key="name">Appearance</data>
87+
<data key="section">appearance_fieldset</data>
88+
<data key="fieldName">appearance</data>
89+
<data key="value">collage-left</data>
90+
</entity>
91+
<entity name="PageBuilderAppearance_CollageCentered" type="pagebuilder_appearance_property">
92+
<data key="name">Appearance</data>
93+
<data key="section">appearance_fieldset</data>
94+
<data key="fieldName">appearance</data>
95+
<data key="value">collage-centered</data>
96+
</entity>
97+
<entity name="PageBuilderAppearance_CollageRight" type="pagebuilder_appearance_property">
98+
<data key="name">Appearance</data>
99+
<data key="section">appearance_fieldset</data>
100+
<data key="fieldName">appearance</data>
101+
<data key="value">collage-right</data>
102+
</entity>
78103
</entities>

0 commit comments

Comments
 (0)