Skip to content

Commit af6595e

Browse files
committed
Merge remote-tracking branch 'remotes/origin/MC-3330' into cms-team-1-delivery
2 parents 0de08e5 + 15d89bd commit af6595e

36 files changed

+2413
-1982
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,20 @@
2020
<waitForPageLoad stepKey="waitForPageBuilderToOpen"/>
2121
<waitForElementVisible selector="{{pageBuilderArea}}{{PageBuilderPanel.layoutMenuSection}}" stepKey="waiForPageBuilderVisible"/>
2222
</actionGroup>
23+
<actionGroup name="expandAdminCategorySection">
24+
<!-- Move to CE -->
25+
<arguments>
26+
<argument name="sectionSelector" defaultValue="{{AdminCategoryContentSection.sectionHeader}}" type="string"/>
27+
<argument name="sectionDependentSelector" defaultValue="{{AdminCategoryContentSection.uploadButton}}" type="string"/>
28+
</arguments>
29+
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
30+
<waitForElementVisible time="30" selector="{{sectionSelector}}" stepKey="waitForSection"/>
31+
<conditionalClick selector="{{sectionSelector}}" dependentSelector="{{sectionDependentSelector}}" visible="false" stepKey="expandSection"/>
32+
<waitForPageLoad time="30" stepKey="waitForSectionToExpand"/>
33+
</actionGroup>
34+
<actionGroup name="saveCatalogCategory" extends="saveCategoryForm">
35+
<!-- Move to CE: Fix CE action group -->
36+
<waitForElementVisible selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="waitForSaveCategoryButton" before="saveCategory"/>
37+
<waitForPageLoad stepKey="waitForPageLoad" after="saveCategory"/>
38+
</actionGroup>
2339
</actionGroups>

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

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,21 @@
99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="closeEditPanelSettings">
12-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
13-
<waitForElementVisible time="2" selector="{{EditPanelForm.editFormClose}}" stepKey="waitForCloseButton"/>
12+
<arguments>
13+
<argument name="baseContent" defaultValue="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" type="string"/>
14+
</arguments>
15+
<waitForPageLoad stepKey="waitForPageLoad"/>
16+
<waitForElementVisible time="5" selector="{{EditPanelForm.editFormClose}}" stepKey="waitForCloseButton"/>
1417
<click selector="{{EditPanelForm.editFormClose}}" stepKey="clickCloseButton"/>
18+
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
1519
<waitForElementNotVisible time="5" selector="{{EditPanelForm.editForm}}" stepKey="waitForEditFormNotVisible"/>
16-
<waitForElementVisible time="1" selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="waitForCmsPageSaveButton"/>
20+
<waitForElementVisible time="10" selector="{{baseContent}}" stepKey="waitForCmsPageSaveButton"/>
1721
</actionGroup>
1822
<actionGroup name="saveEditPanelSettings">
1923
<arguments>
2024
<argument name="baseContent" defaultValue="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" type="string"/>
2125
</arguments>
22-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
26+
<waitForPageLoad stepKey="waitForPageLoad"/>
2327
<waitForElementVisible time="5" selector="{{EditPanelForm.editFormSave}}" stepKey="waitForSaveButton"/>
2428
<click selector="{{EditPanelForm.editFormSave}}" stepKey="clickSaveButton"/>
2529
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
@@ -30,7 +34,7 @@
3034
<arguments>
3135
<argument name="property"/>
3236
</arguments>
33-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
37+
<waitForPageLoad stepKey="waitForPageLoad"/>
3438
<waitForElementVisible time="5" selector="{{EditPanelForm.editFormSave}}" stepKey="waitForColumnSaveButton"/>
3539
<click selector="{{EditPanelForm.editFormSave}}" stepKey="clickSaveColumn"/>
3640
<waitForElementVisible selector="{{EditPanelForm.panelFieldValidationError(property.section, property.fieldName)}}" stepKey="waitForErrorField"/>
@@ -42,14 +46,14 @@
4246
<argument name="form" defaultValue="EditPanelForm"/>
4347
<argument name="property"/>
4448
</arguments>
45-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
49+
<waitForPageLoad stepKey="waitForPageLoad"/>
4650
<waitForElementVisible time="5" selector="{{form.editFormSave}}" stepKey="waitForSaveButton"/>
4751
<click selector="{{form.editFormSave}}" stepKey="clickSaveButton"/>
4852
<waitForElementVisible selector="{{EditPanelForm.panelFieldValidationError(property.section, property.fieldName)}}" stepKey="waitForErrorField"/>
4953
<waitForElementVisible selector="{{EditPanelForm.panelFieldValidationErrorMessage(property.section, property.fieldName, property.errorMessage)}}" stepKey="waitForErrorMessage"/>
5054
</actionGroup>
5155
<actionGroup name="saveEditPanelSettingsFullScreen">
52-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
56+
<waitForPageLoad stepKey="waitForPageLoad"/>
5357
<waitForElementVisible time="5" selector="{{EditPanelForm.editFormSave}}" stepKey="waitForColumnSaveButton" />
5458
<click selector="{{EditPanelForm.editFormSave}}" stepKey="clickSaveColumn"/>
5559
<waitForPageLoad stepKey="waitForSavePanelClose"/>
@@ -100,7 +104,7 @@
100104
<arguments>
101105
<argument name="property"/>
102106
</arguments>
103-
<waitForLoadingMaskToDisappear stepKey="waitForSpinner"/>
107+
<waitForPageLoad stepKey="waitForPageLoad"/>
104108
<waitForElement time="2" selector="{{EditPanelForm.panelFieldControl(property.section, property.fieldName)}}" stepKey="waitForElementVisible"/>
105109
<see userInput="{{property.name}}" selector="{{EditPanelForm.panelFieldLabel(property.section, property.fieldName, property.section, property.name)}}" stepKey="seePropertyLabel"/>
106110
<fillField selector="{{EditPanelForm.panelFieldControl(property.section, property.fieldName)}}" userInput="{{property.value}}" stepKey="fillPropertyField"/>
@@ -127,19 +131,46 @@
127131
<argument name="selection" type="string"/>
128132
<argument name="newTab"/>
129133
</arguments>
130-
<waitForElementVisible time="10" selector="{{PageBuilderSection.LinkSelect(property.fieldName)}}" stepKey="waitForLinkSelect"/>
134+
<waitForElementVisible time="10" selector="{{PageBuilderLinkAttributeAdmin.LinkSelect(property.fieldName)}}" stepKey="waitForLinkSelect"/>
131135
<waitForElement time="10" selector="{{EditPanelForm.panelFieldControl(property.section, property.fieldName)}}" stepKey="waitForElementVisible"/>
132136
<selectOption selector="{{EditPanelForm.panelFieldControl(property.section, property.fieldName)}}" userInput="{{selection}}" stepKey="selectOption"/>
133-
<fillField selector="{{PageBuilderSection.LinkInput(property.fieldName)}}" userInput="{{property.value}}" stepKey="inputLink"/>
137+
<fillField selector="{{PageBuilderLinkAttributeAdmin.LinkInput(property.fieldName)}}" userInput="{{property.value}}" stepKey="inputLink"/>
134138
<conditionalClick selector="{{EditPanelForm.panelFieldControlSwitch(newTab.fieldName)}}" dependentSelector="{{EditPanelForm.panelFieldControlCheckboxState(newTab.fieldName, newTab.value)}}" visible="false" stepKey="conditionalClickNewTab"/>
135139
<waitForElementVisible selector="{{EditPanelForm.panelFieldControlCheckboxState(newTab.fieldName, newTab.value)}}" stepKey="waitForNewTabStateChange"/>
136140
<click selector="{{EditPanelForm.panelFieldLabel((property.section, property.fieldName, property.section, property.name)}}" stepKey="clickOnFieldLabel"/>
137141
</actionGroup>
142+
<actionGroup name="fillOutUrlInput">
143+
<arguments>
144+
<argument name="fieldName"/>
145+
<argument name="linkName"/>
146+
<argument name="searchString"/>
147+
<argument name="searchResult"/>
148+
</arguments>
149+
<waitForElementVisible selector="{{PageBuilderLinkAttributeAdmin.LinkSelect('fieldName')}}" stepKey="waitForButtonLinkSelect"/>
150+
<seeElement selector="{{PageBuilderLinkAttributeAdmin.LinkSelect('fieldName')}}" stepKey="seeButtonLinkSelect"/>
151+
<selectOption selector="{{EditPanelForm.panelFieldControl(PageBuilderButtonItemLink_NotSecure.section, PageBuilderButtonItemLink_NotSecure.fieldName)}}" userInput="{{linkName}}" stepKey="selectOption" />
152+
<!--See dropdown beside Button Link Select-->
153+
<waitForElementVisible selector="{{PageBuilderLinkAttributeAdmin.LinkDropdown}}" stepKey="waitButtonLinkDropdownInput" />
154+
<seeElement selector="{{PageBuilderLinkAttributeAdmin.LinkDropdown}}" stepKey="seeButtonLinkDropdownInput" />
155+
<click selector="{{PageBuilderLinkAttributeAdmin.LinkDropdown}}" stepKey="expandButtonLinkDropdownInput1" />
156+
<!--Type 2 first letters into Search box-->
157+
<click selector="{{PageBuilderLinkAttributeAdmin.LinkSearch}}" stepKey="focusOnField"/>
158+
<fillField selector="{{PageBuilderLinkAttributeAdmin.LinkSearch}}" userInput="{{searchString}}" stepKey="fill2FirstLetters"/>
159+
<waitForElementVisible selector="{{PageBuilderLinkAttributeAdmin.SearchResult(searchResult)}}" stepKey="waitForSearchResult" />
160+
<seeElement selector="{{PageBuilderLinkAttributeAdmin.SearchResult(searchResult)}}" stepKey="seeCMSPageAOnSearchResult"/>
161+
<click selector="{{PageBuilderLinkAttributeAdmin.SearchResult(searchResult)}}" stepKey="selectResult"/>
162+
<dontSee selector="{{PageBuilderLinkAttributeAdmin.SearchResultBox}}" stepKey="dropdownCollapses" />
163+
<grabTextFrom selector="{{PageBuilderLinkAttributeAdmin.DropdownInput}}" stepKey="textFromDropDown1"/>
164+
<assertEquals stepKey="assertEquals1" message="pass">
165+
<expectedResult type="string">{{searchResult}}</expectedResult>
166+
<actualResult type="variable">textFromDropDown1</actualResult>
167+
</assertEquals>
168+
</actionGroup>
138169
<actionGroup name="clearSlideOutPanelFieldGeneral">
139170
<arguments>
140171
<argument name="property"/>
141172
</arguments>
142-
<waitForLoadingMaskToDisappear stepKey="waitForSpinner"/>
173+
<waitForPageLoad stepKey="waitForPageLoad"/>
143174
<waitForElement time="2" selector="{{EditPanelForm.panelFieldControl(property.section, property.fieldName)}}" stepKey="waitForElementVisible"/>
144175
<see userInput="{{property.name}}" selector="{{EditPanelForm.panelFieldLabel(property.section, property.fieldName, property.section, property.name)}}" stepKey="seePropertyLabel"/>
145176
<clearField selector="{{EditPanelForm.panelFieldControl(property.section, property.fieldName)}}" stepKey="clearPropertyField"/>
@@ -161,7 +192,7 @@
161192
<waitForElement time="2" selector="{{EditPanelForm.panelFieldControl(property.section, property.fieldName)}}" stepKey="waitForElementVisible"/>
162193
<see userInput="{{property.name}}" selector="{{EditPanelForm.panelFieldLabel(property.section, property.fieldName, property.section, property.name)}}" stepKey="seePropertyLabel"/>
163194
<selectOption selector="{{EditPanelForm.panelFieldControl(property.section, property.fieldName)}}" userInput="{{property.value}}" stepKey="selectPropertyField"/>
164-
<waitForLoadingMaskToDisappear stepKey="waitForSpinner"/>
195+
<waitForPageLoad stepKey="waitForPageLoad"/>
165196
<click selector="{{EditPanelForm.panelFieldLabel(property.section, property.fieldName, property.section, property.name)}}" stepKey="clickOnFieldLabel"/>
166197
</actionGroup>
167198
<actionGroup name="conditionalClickSlideOutPanelFieldGeneral">
@@ -293,10 +324,10 @@
293324
<argument name="selection" type="string"/>
294325
<argument name="newTab"/>
295326
</arguments>
296-
<waitForElementVisible time="10" selector="{{PageBuilderSection.LinkSelect(property.fieldName)}}" stepKey="waitForLinkSelect"/>
327+
<waitForElementVisible time="10" selector="{{PageBuilderLinkAttributeAdmin.LinkSelect(property.fieldName)}}" stepKey="waitForLinkSelect"/>
297328
<waitForElement time="10" selector="{{EditPanelForm.panelFieldControl(property.section, property.fieldName)}}" stepKey="waitForElementVisible"/>
298329
<seeInField selector="{{EditPanelForm.panelFieldControl(property.section, property.fieldName)}}" userInput="{{selection}}" stepKey="seeOptionIsSelected"/>
299-
<seeInField selector="{{PageBuilderSection.LinkInput(property.fieldName)}}" userInput="{{property.value}}" stepKey="seeInField"/>
330+
<seeInField selector="{{PageBuilderLinkAttributeAdmin.LinkInput(property.fieldName)}}" userInput="{{property.value}}" stepKey="seeInField"/>
300331
<waitForElementVisible time="10" selector="{{EditPanelForm.panelFieldControlCheckboxState(newTab.fieldName, newTab.value)}}" stepKey="waitForNewTab"/>
301332
</actionGroup>
302333
<actionGroup name="validateSlideOutPanelFieldIsDisabled">

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,16 @@
4141
</arguments>
4242
<waitForElement time="30" selector="{{PageBuilderStoreFront.contentTypeInsideContainerStorefront(containerTargetType.role, containerTargetIndex, contentType.role, contentTypeIndex)}}" stepKey="waitForContentTypeStorefront"/>
4343
</actionGroup>
44+
<actionGroup name="verifyCmsPageLinkOnFrontend">
45+
<arguments>
46+
<argument name="CMSPage"/>
47+
<argument name="index"/>
48+
<argument name="section"/>
49+
</arguments>
50+
<scrollTo selector="{{section.base('index')}}" stepKey="waitForButtonElementStorefront"/>
51+
<seeElement selector="{{PageBuilderLinkAttributeStoreFront.ExternalURLContainsLink(CMSPage.identifier)}}" stepKey="seePageLinkOnStoreFront"/>
52+
<click selector="{{PageBuilderLinkAttributeStoreFront.ExternalURLContainsLink(CMSPage.identifier)}}" stepKey="clickLink"/>
53+
<waitForPageLoad stepKey="waitForPageLoad"/>
54+
<see userInput="{{CMSPage.title}}" stepKey="seePageName"/>
55+
</actionGroup>
4456
</actionGroups>

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

Lines changed: 0 additions & 50 deletions
This file was deleted.

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

Lines changed: 0 additions & 28 deletions
This file was deleted.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
<element name="buttonItemTextByButtonGroup" type="button" selector="((//div[@data-content-type='buttons'])[{{arg1}}]//div[@data-content-type='button-item'])[{{arg2}}]//span[@data-element='link_text' and contains(.,'{{arg3}}')]" parameterized="true"/>
102102
<element name="buttonItemType" type="button" selector="(//div[@data-content-type='button-item'])[{{arg1}}]//a[@class='{{arg2}}']" parameterized="true"/>
103103
<element name="buttonItemUrl" type="button" selector="(//div[@data-content-type='button-item'])[{{arg1}}]//a[@href='{{arg2}}']" parameterized="true"/>
104+
<element name="buttonItemContainsUrl" type="button" selector="(//div[@data-content-type='button-item'])[{{arg1}}]//a[contains(@href,'{{arg2}}')]" parameterized="true"/>
104105
<element name="buttonItemNewTab" type="button" selector="(//div[@data-content-type='button-item'])[{{arg1}}]//a[@target='{{arg2}}']" parameterized="true"/>
105106
<!-- Advanced Configuration -->
106107
<element name="defaultStyle" type="button" selector="(//div[@data-content-type='button-item'])[{{arg1}}]//a[not(@style)]" parameterized="true"/>

0 commit comments

Comments
 (0)