|
8 | 8 |
|
9 | 9 | <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
10 | 10 | xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
|
11 |
| - <actionGroup name="switchSlide"> |
| 11 | + <actionGroup name="addSlide"> |
12 | 12 | <arguments>
|
13 |
| - <argument name="section" defaultValue="SliderOnFrontend"/> |
14 |
| - <argument name="index" defaultValue="2" type="string"/> |
| 13 | + <argument name="slideGroupIndex" defaultValue="1" type="string"/> |
15 | 14 | </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"/> |
31 | 19 | <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"/> |
35 | 23 | <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> |
36 | 29 | </actionGroup>
|
37 | 30 | </actionGroups>
|
0 commit comments