Skip to content

Commit 54aad08

Browse files
committed
MC-2212: Split ActionGroup File
- Splitting ActionGroup files & renaming files to make sense
1 parent ba3a657 commit 54aad08

30 files changed

+1051
-971
lines changed

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

Lines changed: 0 additions & 917 deletions
This file was deleted.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="navigateToAPageWithPageBuilder">
12+
<waitForPageLoad stepKey="waitForDashboardPageLoad"/>
13+
<amOnPage url="{{PageBuilderCmsPage.url}}" stepKey="amOnPageBuilderPage"/>
14+
<waitForPageLoad stepKey="waitForPageLoad"/>
15+
</actionGroup>
16+
<actionGroup name="searchAndViewCmsPage">
17+
<arguments>
18+
<argument name="contentType"/>
19+
</arguments>
20+
<amOnPage url="{{CmsPagesPage.url}}" stepKey="onCmsPagesPageActionsSection"/>
21+
<waitForPageLoad stepKey="waitForCmsPagesGridLoad"/>
22+
<click selector="{{CmsPagesPageActionsSection.filterButton}}" stepKey="clickFiltersBtn" />
23+
<fillField selector="{{CmsPagesPageActionsSection.URLKey}}" userInput="{{contentType.name}}{{PageBuilderPageTitle.pageName}}" stepKey="fillOutURLKey" />
24+
<click selector="{{CmsPagesPageActionsSection.ApplyFiltersBtn}}" stepKey="clickApplyBtn" />
25+
<waitForPageLoad stepKey="waitForSearchResults" />
26+
<waitForElementVisible selector="{{CmsPagesPageActionsSection.firstItemSelectButton}}" stepKey="waitForFirstItemButton" />
27+
<click selector="{{CmsPagesPageActionsSection.firstItemSelectButton}}" stepKey="clickSelectButtonOnFirstItem"/>
28+
<waitForElementVisible selector="{{CmsPagesPageActionsSection.firstItemEditButton}}" stepKey="waitForFirstItemEditButton"/>
29+
<click selector="{{CmsPagesPageActionsSection.firstItemEditButton}}" stepKey="clickSelectEditOnFirstItem"/>
30+
<waitForPageLoad stepKey="waitForEditCmsPage"/>
31+
</actionGroup>
32+
<actionGroup name="addPageBuilderPageTitle">
33+
<arguments>
34+
<argument name="contentType"/>
35+
</arguments>
36+
<fillField selector="{{CmsNewPagePageActionsSection.pageTitle}}" userInput="{{contentType.name}}{{PageBuilderPageTitle.pageName}}" stepKey="enterPageTitle"/>
37+
</actionGroup>
38+
<actionGroup name="switchToPageBuilderStage">
39+
<waitForElementVisible time="30" selector="{{CmsNewPagePageContentSection.header}}" stepKey="waitForElementVisible"/>
40+
<click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContent"/>
41+
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
42+
<!-- Wait for the first row to be added into the stage for it to be "ready" -->
43+
<waitForElementNotVisible selector="{{PageBuilderActionsSection.stageLoading}}" stepKey="waitForStageLoadingGraphicNotVisible"/>
44+
<waitForElementVisible time="30" selector="{{RowOnStage.base('1')}}" stepKey="waitForPageBuilderRow"/>
45+
</actionGroup>
46+
<actionGroup name="saveAndContinueEditCmsPage">
47+
<waitForElementVisible time="10" selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="waitForSaveAndContinueVisibility"/>
48+
<click selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="clickSaveAndContinueEditCmsPage"/>
49+
<waitForPageLoad stepKey="waitForCmsPageLoad"/>
50+
<waitForElementVisible time="1" selector="{{CmsNewPagePageActionsSection.cmsPageTitle}}" stepKey="waitForCmsPageSaveButton"/>
51+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
52+
</actionGroup>
53+
<actionGroup name="saveCmsPage">
54+
<waitForElementVisible selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="waitForSplitButton"/>
55+
<click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandSplitButton"/>
56+
<waitForElementVisible selector="{{CmsNewPagePageActionsSection.savePage}}" stepKey="waitForSaveCmsPage"/>
57+
<click selector="{{CmsNewPagePageActionsSection.savePage}}" stepKey="clickSaveCmsPage"/>
58+
<waitForElementVisible time="1" selector="{{CmsPagesPageActionsSection.addNewPageButton}}" stepKey="waitForCmsPageSaveButton"/>
59+
<see userInput="You saved the page." selector="{{CmsPagesPageActionsSection.savePageSuccessMessage}}" stepKey="assertSavePageSuccessMessage"/>
60+
</actionGroup>
61+
<actionGroup name="verifyPageBuilderVisibleOnPage">
62+
<waitForElementVisible selector="{{PageBuilderActionsSection.identifyPageBuilder}}" stepKey="seePageBuilderVisible"/>
63+
<dontSee userInput="Enable Advanced CMS" stepKey="dontSeeEnableAdvancedCMSBtn"/>
64+
</actionGroup>
65+
<actionGroup name="verifyPageBuilderVisibleOnStaging">
66+
<scrollTo selector="{{PageBuilderActionsSection.identifyPageBuilder}}" stepKey="scrollToIdentifyPageBuilder"/>
67+
<waitForElementVisible selector="{{PageBuilderActionsSection.identifyPageBuilder}}" stepKey="seePageBuilderVisible"/>
68+
<dontSee userInput="Enable Advanced CMS" stepKey="dontSeeEnableAdvancedCMSBtn"/>
69+
</actionGroup>
70+
<actionGroup name="verifyPageBuilderNotVisibleOnPage">
71+
<dontSee userInput="Enable Advanced CMS" stepKey="dontSeeEnableAdvancedCMSBtn"/>
72+
<dontSee selector="{{PageBuilderActionsSection.identifyPageBuilder}}" stepKey="seePageBuilderVisible"/>
73+
</actionGroup>
74+
</actionGroups>

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

Lines changed: 25 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,6 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="validateVisualSelects">
12-
<arguments>
13-
<argument name="property1" defaultValue=""/>
14-
<argument name="property2" defaultValue=""/>
15-
<argument name="property3" defaultValue=""/>
16-
<argument name="property4" defaultValue=""/>
17-
</arguments>
18-
<waitForElement selector="{{PageBuilderActionsSection.panelFieldControl(property1.section, property1.fieldName)}}" stepKey="waitForElementVisible" />
19-
<seeElement selector="{{VisualSelectComponent.firstSelection(property1.value)}}" stepKey="seeFirstSelection"/>
20-
<seeElement selector="{{VisualSelectComponent.firstSelection(property2.value)}}" stepKey="seeSecondSelection"/>
21-
<seeElement selector="{{VisualSelectComponent.firstSelection(property3.value)}}" stepKey="seeThirdSelection"/>
22-
<seeElement selector="{{VisualSelectComponent.firstSelection(property4.value)}}" stepKey="seeFourthSelection"/>
23-
</actionGroup>
24-
<actionGroup name="validateTextAlignment">
25-
<arguments>
26-
<argument name="property" defaultValue=""/>
27-
</arguments>
28-
<waitForElement selector="{{PageBuilderActionsSection.panelFieldControl(property.section, property.fieldName)}}" stepKey="waitForElementVisible" />
29-
<seeElement selector="//li[@name='{{property.value}}' and contains(@class,'active')]" stepKey="alignmentIsSelected" />
30-
</actionGroup>
3111
<actionGroup name="fillSlideOutPanelFieldMargins">
3212
<arguments>
3313
<argument name="property" defaultValue=""/>
@@ -50,21 +30,21 @@
5030
<fillField selector="{{AdvancedForm.advancedPaddingBottom}}" userInput="{{property.paddingBottom}}" stepKey="fillPaddingBottomField"/>
5131
<click selector="{{PageBuilderActionsSection.panelFieldLabel(property.section, property.fieldName, property.section, property.name)}}" stepKey="clickOnFieldLabel"/>
5232
</actionGroup>
53-
<actionGroup name="clearSlideOutPanelFieldMarginsAndPadding">
33+
<actionGroup name="fillSlideOutPanelFieldMarginsAndPadding">
5434
<arguments>
5535
<argument name="property" defaultValue=""/>
5636
</arguments>
5737
<waitForLoadingMaskToDisappear stepKey="waitForSpinner"/>
5838
<waitForElement time="2" selector="{{PageBuilderActionsSection.panelFieldControl(property.section, property.fieldName)}}" stepKey="waitForElementVisible" />
5939
<see userInput="{{property.name}}" selector="{{PageBuilderActionsSection.panelFieldLabel(property.section, property.fieldName, property.section, property.name)}}" stepKey="seePropertyLabel"/>
60-
<clearField selector="{{AdvancedForm.advancedMarginTop}}" stepKey="clearMarginTopField"/>
61-
<clearField selector="{{AdvancedForm.advancedMarginRight}}" stepKey="clearMarginRightField"/>
62-
<clearField selector="{{AdvancedForm.advancedMarginLeft}}" stepKey="clearMarginLeftField"/>
63-
<clearField selector="{{AdvancedForm.advancedMarginBottom}}" stepKey="clearMarginBottomField"/>
64-
<clearField selector="{{AdvancedForm.advancedPaddingTop}}" stepKey="clearPaddingTopField"/>
65-
<clearField selector="{{AdvancedForm.advancedPaddingRight}}" stepKey="clearPaddingRightField"/>
66-
<clearField selector="{{AdvancedForm.advancedPaddingLeft}}" stepKey="clearPaddingLeftField"/>
67-
<clearField selector="{{AdvancedForm.advancedPaddingBottom}}" stepKey="clearPaddingBottomField"/>
40+
<fillField selector="{{AdvancedForm.advancedMarginTop}}" userInput="{{property.marginTop}}" stepKey="fillMarginTopField"/>
41+
<fillField selector="{{AdvancedForm.advancedMarginRight}}" userInput="{{property.marginRight}}" stepKey="fillMarginRightField"/>
42+
<fillField selector="{{AdvancedForm.advancedMarginBottom}}" userInput="{{property.marginBottom}}" stepKey="fillMarginBottomField"/>
43+
<fillField selector="{{AdvancedForm.advancedMarginLeft}}" userInput="{{property.marginLeft}}" stepKey="fillMarginLeftField"/>
44+
<fillField selector="{{AdvancedForm.advancedPaddingTop}}" userInput="{{property.paddingTop}}" stepKey="fillPaddingTopField"/>
45+
<fillField selector="{{AdvancedForm.advancedPaddingRight}}" userInput="{{property.paddingRight}}" stepKey="fillPaddingRightField"/>
46+
<fillField selector="{{AdvancedForm.advancedPaddingBottom}}" userInput="{{property.paddingBottom}}" stepKey="fillPaddingBottomField"/>
47+
<fillField selector="{{AdvancedForm.advancedPaddingLeft}}" userInput="{{property.paddingLeft}}" stepKey="fillPaddingLeftField"/>
6848
<click selector="{{PageBuilderActionsSection.panelFieldLabel(property.section, property.fieldName, property.section, property.name)}}" stepKey="clickOnFieldLabel"/>
6949
</actionGroup>
7050
<actionGroup name="clearSlideOutPanelFieldMargins">
@@ -89,21 +69,21 @@
8969
<clearField selector="{{AdvancedForm.advancedPaddingBottom}}" stepKey="clearPaddingBottomField"/>
9070
<click selector="{{PageBuilderActionsSection.panelFieldLabel(property.section, property.fieldName, property.section, property.name)}}" stepKey="clickOnFieldLabel"/>
9171
</actionGroup>
92-
<actionGroup name="fillSlideOutPanelFieldMarginsAndPadding">
72+
<actionGroup name="clearSlideOutPanelFieldMarginsAndPadding">
9373
<arguments>
9474
<argument name="property" defaultValue=""/>
9575
</arguments>
9676
<waitForLoadingMaskToDisappear stepKey="waitForSpinner"/>
9777
<waitForElement time="2" selector="{{PageBuilderActionsSection.panelFieldControl(property.section, property.fieldName)}}" stepKey="waitForElementVisible" />
9878
<see userInput="{{property.name}}" selector="{{PageBuilderActionsSection.panelFieldLabel(property.section, property.fieldName, property.section, property.name)}}" stepKey="seePropertyLabel"/>
99-
<fillField selector="{{AdvancedForm.advancedMarginTop}}" userInput="{{property.marginTop}}" stepKey="fillMarginTopField"/>
100-
<fillField selector="{{AdvancedForm.advancedMarginRight}}" userInput="{{property.marginRight}}" stepKey="fillMarginRightField"/>
101-
<fillField selector="{{AdvancedForm.advancedMarginBottom}}" userInput="{{property.marginBottom}}" stepKey="fillMarginBottomField"/>
102-
<fillField selector="{{AdvancedForm.advancedMarginLeft}}" userInput="{{property.marginLeft}}" stepKey="fillMarginLeftField"/>
103-
<fillField selector="{{AdvancedForm.advancedPaddingTop}}" userInput="{{property.paddingTop}}" stepKey="fillPaddingTopField"/>
104-
<fillField selector="{{AdvancedForm.advancedPaddingRight}}" userInput="{{property.paddingRight}}" stepKey="fillPaddingRightField"/>
105-
<fillField selector="{{AdvancedForm.advancedPaddingBottom}}" userInput="{{property.paddingBottom}}" stepKey="fillPaddingBottomField"/>
106-
<fillField selector="{{AdvancedForm.advancedPaddingLeft}}" userInput="{{property.paddingLeft}}" stepKey="fillPaddingLeftField"/>
79+
<clearField selector="{{AdvancedForm.advancedMarginTop}}" stepKey="clearMarginTopField"/>
80+
<clearField selector="{{AdvancedForm.advancedMarginRight}}" stepKey="clearMarginRightField"/>
81+
<clearField selector="{{AdvancedForm.advancedMarginLeft}}" stepKey="clearMarginLeftField"/>
82+
<clearField selector="{{AdvancedForm.advancedMarginBottom}}" stepKey="clearMarginBottomField"/>
83+
<clearField selector="{{AdvancedForm.advancedPaddingTop}}" stepKey="clearPaddingTopField"/>
84+
<clearField selector="{{AdvancedForm.advancedPaddingRight}}" stepKey="clearPaddingRightField"/>
85+
<clearField selector="{{AdvancedForm.advancedPaddingLeft}}" stepKey="clearPaddingLeftField"/>
86+
<clearField selector="{{AdvancedForm.advancedPaddingBottom}}" stepKey="clearPaddingBottomField"/>
10787
<click selector="{{PageBuilderActionsSection.panelFieldLabel(property.section, property.fieldName, property.section, property.name)}}" stepKey="clickOnFieldLabel"/>
10888
</actionGroup>
10989
<actionGroup name="seeInMarginFieldsSlideOutPanel">
@@ -441,4 +421,11 @@
441421
<waitForElement selector="{{page.padding(index, padding.value)}}" stepKey="waitForPadding"/>
442422
<dontSeeElement selector="{{page.padding(index, padding.value)}}" stepKey="dontSeePadding"/>
443423
</actionGroup>
424+
<actionGroup name="validateTextAlignment">
425+
<arguments>
426+
<argument name="property" defaultValue=""/>
427+
</arguments>
428+
<waitForElement selector="{{PageBuilderActionsSection.panelFieldControl(property.section, property.fieldName)}}" stepKey="waitForElementVisible" />
429+
<seeElement selector="//li[@name='{{property.value}}' and contains(@class,'active')]" stepKey="alignmentIsSelected" />
430+
</actionGroup>
444431
</actionGroups>

0 commit comments

Comments
 (0)