Skip to content

Commit ceb1536

Browse files
committed
MC-3308: Automate MFTF for MC-1416
1 parent 0b58a17 commit ceb1536

File tree

3 files changed

+37
-15
lines changed

3 files changed

+37
-15
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<element name="base" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]/div" parameterized="true"/>
1212
<element name="textAreaText" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]/div[.='{{arg2}}']" parameterized="true"/>
1313
<element name="textAreaTextContains" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]/div[contains(.,'{{arg2}}')]" parameterized="true"/>
14-
<element name="text" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]/div//p[contains(.,'{{arg2}}')]" parameterized="true"/>
14+
<element name="text" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]/div//p[contains(.,'{{arg2}}')]/span" parameterized="true"/>
1515
<!-- Advanced Configuration -->
1616
<element name="alignment" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]/div[contains(@style,'text-align: {{arg2}};')]" parameterized="true"/>
1717
<element name="noAlignment" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]/div[not(contains(@style,'text-align:'))]" parameterized="true"/>

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,27 @@
1111
<test name="CanAddTextToTab">
1212
<annotations>
1313
<features value="PageBuilder"/>
14-
<stories value="Tabs"/>
14+
<stories value="Text"/>
1515
<title value="Tabs Content - Add Text to Tabs container and view on Admin and Storefront"/>
1616
<description value="As a Content Manager I want tab to be a container so that I can add any content inside the Tab, not only text"/>
1717
<severity value="CRITICAL"/>
1818
<useCaseId value=""/>
1919
<testCaseId value=""/>
2020
<group value="pagebuilder"/>
21+
<group value="pagebuilder-text"/>
2122
<group value="pagebuilder-tabs-content"/>
2223
</annotations>
2324
<before>
2425
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
25-
<actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/>
26-
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
26+
<actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" />
27+
<createData entity="_defaultCmsPage" stepKey="createCMSPage" />
2728
</before>
2829
<after>
30+
<deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage" />
2931
<actionGroup ref="logout" stepKey="logout"/>
3032
</after>
31-
<actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle">
32-
<argument name="contentType" value="PageBuilderTabsContentType"/>
33+
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage1">
34+
<argument name="CMSPage" value="$$createCMSPage$$"/>
3335
</actionGroup>
3436
<!-- Add Tabs to Stage -->
3537
<comment userInput="Add Tabs to Stage" stepKey="addTabsToStage"/>

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

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
<features value="PageBuilder"/>
1414
<stories value="Text"/>
1515
<title value="Verify Text placeholder and save empty Text Content Block"/>
16-
<description value="Verify Text placeholder and save empty Text Content Block"/>
16+
<description value="Verify placeholder and empty text content block, make sure there is no content display on storefront when saving an empty Text Content Block"/>
1717
<severity value="CRITICAL"/>
1818
<useCaseId value=""/>
19-
<testCaseId value=""/>
19+
<testCaseId value="MC-3464"/>
2020
<group value="pagebuilder"/>
2121
<group value="pagebuilder-text"/>
2222
</annotations>
@@ -52,7 +52,7 @@
5252
<description value="Verify that user are able to add text into Text Content Block and see it on storefront "/>
5353
<severity value="CRITICAL"/>
5454
<useCaseId value=""/>
55-
<testCaseId value=""/>
55+
<testCaseId value="MC-3465"/>
5656
<group value="pagebuilder"/>
5757
<group value="pagebuilder-text"/>
5858
</annotations>
@@ -96,7 +96,7 @@
9696
<description value="Verify that user are able to add image into Text Content Block and see it on storefront "/>
9797
<severity value="CRITICAL"/>
9898
<useCaseId value=""/>
99-
<testCaseId value=""/>
99+
<testCaseId value="MC-3466"/>
100100
<group value="pagebuilder"/>
101101
<group value="pagebuilder-text"/>
102102
</annotations>
@@ -129,6 +129,16 @@
129129
<actionGroup ref="saveImage" stepKey="insertImage"/>
130130
<actionGroup ref="fillOutUploadImagePopup" stepKey="fillOutUploadImagePopup" />
131131
<seeElementInDOM selector="{{CmsWYSIWYGSection.imageSource(ImageUpload3.fileName)}}" stepKey="assertMediaSourceOnStage"/>
132+
<!--Verify inputed image on slideout-->
133+
<comment userInput="Verify inputed variable on slideout" stepKey="commentVerifyVariableOnSlideout"/>
134+
<click selector="{{CmsNewPagePageBasicFieldsSection.contentHeading}}" stepKey="lostFocusFromWYSIWYG"/>
135+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
136+
<argument name="contentType" value="PageBuilderTextContentType"/>
137+
</actionGroup>
138+
<switchToIFrame selector="{{TextOnConfiguration.tinyMCEIFrame}}" stepKey="switchToIFrame"/>
139+
<waitForElementVisible selector="{{TextOnConfiguration.tinyMCEImage(ImageUpload3.fileName)}}" stepKey="waitForImage3"/>
140+
<switchToIFrame stepKey="exitIFrame"/>
141+
<actionGroup ref="closeEditPanelSettings" stepKey="closeEditPanelSettings"/>
132142
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage2"/>
133143
<!--Verify empty Content Block on storefront-->
134144
<comment userInput="Verify empty Content Block on storefront" stepKey="commentVerifyEmptyBlock"/>
@@ -143,7 +153,7 @@
143153
<description value="Verify that user are able to add variable into Text Content Block and see it on storefront "/>
144154
<severity value="CRITICAL"/>
145155
<useCaseId value=""/>
146-
<testCaseId value=""/>
156+
<testCaseId value="MC-3467"/>
147157
<group value="pagebuilder"/>
148158
<group value="pagebuilder-text"/>
149159
</annotations>
@@ -171,8 +181,8 @@
171181
<comment userInput="Select another variable" stepKey="selectAnotherVariable"/>
172182
<doubleClick selector="{{TextOnStage.text('1', TinyMCEVariableCountry.editPanelValue)}}" stepKey="doubleClickOnVariablePlaceholder"/>
173183
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
174-
<waitForElementVisible selector="{{VariableSection.Radio(TinyMCEVariableCountry.variableName)}}" stepKey="waitForVariable1"/>
175-
<checkOption selector="{{VariableSection.Radio(TinyMCEVariableCountry.variableName)}}" stepKey="selectVariable"/>
184+
<waitForElementVisible selector="{{VariableSection.Radio(TinyMCEVariableBaseURL.variableName)}}" stepKey="waitForVariable1"/>
185+
<checkOption selector="{{VariableSection.Radio(TinyMCEVariableBaseURL.variableName)}}" stepKey="selectVariable"/>
176186
<waitForElementVisible selector="{{VariableSection.InsertWidget}}" stepKey="waitForInsertVariable2"/>
177187
<click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariable2"/>
178188
<waitForElementNotVisible selector="{{VariableSection.InsertWidget}}" stepKey="waitForVariableModalToClose"/>
@@ -201,7 +211,7 @@
201211
<description value="Verify that user are able to add widget into Text Content Block and see it on storefront "/>
202212
<severity value="CRITICAL"/>
203213
<useCaseId value=""/>
204-
<testCaseId value=""/>
214+
<testCaseId value="MC-3468"/>
205215
<group value="pagebuilder"/>
206216
<group value="pagebuilder-text"/>
207217
</annotations>
@@ -228,6 +238,16 @@
228238
<argument name="page" value="$$createCMSPageB.identifier$$"/>
229239
</actionGroup>
230240
<waitForElementVisible selector="{{TextOnStage.text('1', TinyMCEWidgetCMSPageLink.editPanelValue)}}" stepKey="waitForWidgetStage"/>
241+
<!--Verify widget edit page-->
242+
<comment userInput="Verify widget edit page" stepKey="commentVerifyEditWidget"/>
243+
<doubleClick selector="{{TextOnStage.text('1', TinyMCEWidgetCMSPageLink.editPanelValue)}}" stepKey="doubleClickOnWidgetPlaceholder"/>
244+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
245+
<waitForElementVisible selector="{{WidgetSection.WidgetType}}" stepKey="waitForWidgetType"/>
246+
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget2"/>
247+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear5"/>
248+
<waitForElementNotVisible selector="{{WidgetSection.InsertWidget}}" stepKey="waitForInsertWidgetModalToClose"/>
249+
<!--Verify inputed widget on slideout-->
250+
<comment userInput="Verify inputed widget on slideout" stepKey="commentVerifyInputedWidget"/>
231251
<click selector="{{CmsNewPagePageBasicFieldsSection.contentHeading}}" stepKey="lostFocusFromWYSIWYG"/>
232252
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
233253
<argument name="contentType" value="PageBuilderTextContentType"/>
@@ -250,7 +270,7 @@
250270
<description value="Verify buttons on WYSIWYG toolbar inside PageBuilder"/>
251271
<severity value="CRITICAL"/>
252272
<useCaseId value="MC-1412"/>
253-
<testCaseId value="MAGETWO-90274"/>
273+
<testCaseId value="MC-3463"/>
254274
<group value="pagebuilder"/>
255275
<group value="pagebuilder-text"/>
256276
</annotations>

0 commit comments

Comments
 (0)