Skip to content

Commit 2a2e633

Browse files
committed
Merge remote-tracking branch 'mainline/develop' into cms-team-1-tabs
2 parents 9b68213 + 7d1c8ed commit 2a2e633

File tree

61 files changed

+3357
-1115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+3357
-1115
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Suite/etc/suiteSchema.xsd">
9+
<suite name="PageBuilderWithWYSIWYG">
10+
<before>
11+
<createData stepKey="enablePageBuilderAndWYSIWYG" entity="enablePageBuilderAndWYSIWYGForm"/>
12+
</before>
13+
<after>
14+
<createData stepKey="DisabledWYSIWYG" entity="disableWYSYWYGForm"/>
15+
</after>
16+
<include>
17+
<group name="pagebuilder"/>
18+
</include>
19+
<exclude>
20+
<group name="pagebuilder-customBeforeAfter"/>
21+
</exclude>
22+
</suite>
23+
</suites>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Banner/Test/AdminPageBuilderEnabledTest.xml

Lines changed: 73 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -10,65 +10,77 @@
1010

1111
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1212
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
13-
<!--<test name="VerifyPageBuilderOnDynamicBlock">-->
14-
<!--<annotations>-->
15-
<!--<title value="Admin are able to see PageBuilder on Dynmic Block after enable PageBuilder from Configuration"/>-->
16-
<!--<description value="Admin are able to see PageBuilder on Dynmic Block after enable PageBuilder from Configuration"/>-->
17-
<!--<severity value="CRITICAL"/>-->
18-
<!--<group value="pagebuilder"/>-->
19-
<!--</annotations>-->
20-
<!--<before>-->
21-
<!--<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>-->
22-
<!--<actionGroup ref="enablePageBuilderSetting" stepKey="enablePageBuilder"/>-->
23-
<!--</before>-->
24-
<!--<after>-->
25-
<!--<actionGroup ref="dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Banner/Test/AdminPageBuilderEnabledTest.xml:23logout" stepKey="logout"/>-->
26-
<!--</after>-->
27-
<!--&lt;!&ndash;Verify PageBuilder visible on Dynamic Block creation form &ndash;&gt;-->
28-
<!--<amOnPage url="{{AdminBannerPage.url}}" stepKey="openNewBannerForm"/>-->
29-
<!--<waitForPageLoad stepKey="waitForPageLoad5"/>-->
30-
<!--<actionGroup ref="verifyPageBuilderVisibleOnPage" stepKey="verifyBluefootVisibleOnBlockPage"/>-->
31-
<!--</test>-->
32-
<!--<test name="VerifyPageBuilderDisableOnDynamicBlockWhenPageBuilderDisabledAndWYSIWYGEnabled">-->
33-
<!--<annotations>-->
34-
<!--<title value="Admin should not be able to see PageBuilder on Dynamic Block Page after disable PageBuilder and disable WYSIWYG from Configuration"/>-->
35-
<!--<description value="Admin should not be able to see PageBuilder on Dynamic Block Page after disable PageBuilder and disable WYSIWYG from Configuration"/>-->
36-
<!--<severity value="CRITICAL"/>-->
37-
<!--<group value="pagebuilder"/>-->
38-
<!--</annotations>-->
39-
<!--<before>-->
40-
<!--<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>-->
41-
<!--<actionGroup ref="DisabledWYSIWYG" stepKey="disableWYSIWYG"/>-->
42-
<!--<actionGroup ref="enablePageBuilderSetting" stepKey="enablePageBuilder"/>-->
43-
<!--</before>-->
44-
<!--<after>-->
45-
<!--<actionGroup ref="logout" stepKey="logout"/>-->
46-
<!--</after>-->
47-
<!--&lt;!&ndash;Create Dynamic Block using PageBuilder&ndash;&gt;-->
48-
<!--<amOnPage url="{{AdminBannerPage.url}}" stepKey="goToNewBannerPage" />-->
49-
<!--<waitForPageLoad stepKey="waitForPageLoad" />-->
50-
<!--<actionGroup ref="fillDynamicBlockName" stepKey="fillDynamicBlockName">-->
51-
<!--<argument name="Banner" value="sampleBanner"/>-->
52-
<!--</actionGroup>-->
53-
<!--<actionGroup ref="dragContentBlockToStage" stepKey="dragButtonsOntoStage">-->
54-
<!--<argument name="contentBlockType" value="PageBuilderTextContentBlock"/>-->
55-
<!--</actionGroup>-->
56-
<!--<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">-->
57-
<!--<argument name="contentBlockType" value="PageBuilderTextContentBlock"/>-->
58-
<!--</actionGroup>-->
59-
<!--<waitForLoadingMaskToDisappear stepKey="waitForEditPanelSpinner"/>-->
60-
<!--<fillField selector="{{TextOnConfiguration.textArea}}" userInput="Hello Dynamic Block from PageBuilder" stepKey="addTextToEditor"/>-->
61-
<!--<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>-->
62-
<!--<see userInput="Hello Dynamic Block from PageBuilder" stepKey="seeTypedTextOnStorefront"/>-->
63-
<!--<click selector="{{AdminBannerBasicActionSection.Save}}" stepKey="clickSaveBanner" />-->
64-
<!--&lt;!&ndash;Enable WYSIWYG&ndash;&gt;-->
65-
<!--<actionGroup ref="EnabledWYSIWYG" stepKey="enableWYSIWYG"/>-->
66-
<!--&lt;!&ndash;Disable PageBuilder from Configuration&ndash;&gt;-->
67-
<!--<actionGroup ref="disablePageBuilderSetting" stepKey="disablePageBuilderSetting"/>-->
68-
<!--<actionGroup ref="navigateToCreatedDynamicBlock" stepKey="navigateToCreatedDynamicBlock">-->
69-
<!--<argument name="Banner" value="sampleBanner"/>-->
70-
<!--</actionGroup>-->
71-
<!--<seeElement selector="{{TinyMCESection.TinyMCE4}}" stepKey="seeTinyMCE4Visible" />-->
72-
<!--&lt;!&ndash;Missing step of asserting PageBuilder text convert to TinyMCE4 (blocked by current testing framework - unable to grab text from TinyMCE4)&ndash;&gt;-->
73-
<!--</test>-->
13+
<test name="VerifyPageBuilderOnDynamicBlock">
14+
<annotations>
15+
<features value="Pagebuilder"/>
16+
<stories value="MAGETWO-71404: Enabling PageBuilder on Webstore"/>
17+
<title value="Admin are able to see PageBuilder on Dynamic Block after enable PageBuilder from Configuration"/>
18+
<description value="Admin are able to see PageBuilder on Dynamic Block after enable PageBuilder from Configuration"/>
19+
<severity value="CRITICAL"/>
20+
<group value="pagebuilder"/>
21+
<group value="pagebuilder-ee"/>
22+
</annotations>
23+
<before>
24+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
25+
</before>
26+
<after>
27+
<actionGroup ref="logout" stepKey="logout"/>
28+
</after>
29+
<!--Verify PageBuilder visible on Dynamic Block creation form -->
30+
<comment userInput="Verify PageBuilder visible on Dynamic Block creation form " stepKey="commentValidation"/>
31+
<amOnPage url="{{AdminBannerPage.url}}" stepKey="openNewBannerForm"/>
32+
<waitForPageLoad stepKey="waitForPageLoad5"/>
33+
<actionGroup ref="verifyPageBuilderVisibleOnPage" stepKey="verifyBluefootVisibleOnBlockPage"/>
34+
</test>
35+
<test name="VerifyPageBuilderDisableOnDynamicBlockWhenPageBuilderDisabledAndWYSIWYGEnabled">
36+
<annotations>
37+
<features value="Pagebuilder"/>
38+
<stories value="MAGETWO-71404: Enabling PageBuilder on Webstore"/>
39+
<title value="Admin should not be able to see PageBuilder on Dynamic Block Page after disable PageBuilder and disable WYSIWYG from Configuration"/>
40+
<description value="Admin should not be able to see PageBuilder on Dynamic Block Page after disable PageBuilder and disable WYSIWYG from Configuration"/>
41+
<severity value="CRITICAL"/>
42+
<group value="pagebuilder"/>
43+
<group value="pagebuilder-ee"/>
44+
<group value="pagebuilder-customBeforeAfter"/>
45+
</annotations>
46+
<before>
47+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
48+
<actionGroup ref="DisabledWYSIWYG" stepKey="disableWYSIWYG"/>
49+
<actionGroup ref="enablePageBuilderSetting" stepKey="enablePageBuilder"/>
50+
</before>
51+
<after>
52+
<actionGroup ref="logout" stepKey="logout"/>
53+
</after>
54+
<!--Create Dynamic Block using PageBuilder-->
55+
<amOnPage url="{{AdminBannerPage.url}}" stepKey="goToNewBannerPage" />
56+
<waitForPageLoad stepKey="waitForPageLoad" />
57+
<actionGroup ref="fillDynamicBlockName" stepKey="fillDynamicBlockName">
58+
<argument name="Banner" value="sampleBanner"/>
59+
</actionGroup>
60+
<actionGroup ref="dragContentBlockToStage" stepKey="dragButtonsOntoStage">
61+
<argument name="contentBlockType" value="PageBuilderTextContentBlock"/>
62+
</actionGroup>
63+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
64+
<argument name="contentBlockType" value="PageBuilderTextContentBlock"/>
65+
</actionGroup>
66+
<waitForLoadingMaskToDisappear stepKey="waitForEditPanelSpinner"/>
67+
<fillField selector="{{TextOnConfiguration.textArea}}" userInput="Hello Dynamic Block from PageBuilder" stepKey="addTextToEditor"/>
68+
<click selector="{{PageBuilderActionsSection.editFormSave}}" stepKey="clickSaveColumn"/>
69+
<waitForElementNotVisible time="5" selector="{{PageBuilderActionsSection.editForm}}" stepKey="waitForEditFormNotVisible" />
70+
<see userInput="Hello Dynamic Block from PageBuilder" stepKey="seeTypedTextOnStorefront"/>
71+
<click selector="{{AdminBannerBasicActionSection.Save}}" stepKey="clickSaveBanner" />
72+
<!--Enable WYSIWYG-->
73+
<actionGroup ref="EnabledWYSIWYG" stepKey="enableWYSIWYG"/>
74+
<!--Disable PageBuilder from Configuration-->
75+
<actionGroup ref="disablePageBuilderSetting" stepKey="disablePageBuilderSetting"/>
76+
<actionGroup ref="navigateToCreatedDynamicBlock" stepKey="navigateToCreatedDynamicBlock">
77+
<argument name="Banner" value="sampleBanner"/>
78+
</actionGroup>
79+
<seeElement selector="{{TinyMCESection.TinyMCE4}}" stepKey="seeTinyMCE4Visible" />
80+
<executeJS function="return (function() {var div = document.createElement('div'); div.innerHTML = tinymce.activeEditor.getContent(); return div.innerText.trim();}())" stepKey="textFromPageBuilder"/>
81+
<assertEquals stepKey="assertEquals1" message="pass">
82+
<expectedResult type="string">Hello Dynamic Block from PageBuilder</expectedResult>
83+
<actualResult type="variable">textFromPageBuilder</actualResult>
84+
</assertEquals>
85+
</test>
7486
</tests>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageBuilder/ActionGroup/ActionGroup.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,12 @@
179179
<arguments>
180180
<argument name="contentBlockType" defaultValue=""/>
181181
<argument name="contentBlockNumber" defaultValue="2" type="string"/>
182+
<argument name="x" defaultValue="null" type="string"/>
183+
<argument name="y" defaultValue="null" type="string"/>
182184
</arguments>
183185
<seeElement selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockNumber)}}" stepKey="seeContentTypeInStage" />
184186
<waitForElementVisible time="20" selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockNumber)}}" stepKey="waitForContentBlockInStageVisible" />
185-
<moveMouseOver selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockNumber)}}" x="10" y="0" stepKey="onMouseOverContentBlockStage"/>
187+
<moveMouseOver selector="{{PageBuilderActionsSection.contentBlockInStageByIndex(contentBlockType.role, contentBlockNumber)}}" x="{{x}}" y="{{y}}" stepKey="onMouseOverContentBlockStage"/>
186188
<wait time="0.5" stepKey="waitForMouseOverAnimation" />
187189
<waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentBlockOptionsMenuByIndex(contentBlockType.role, contentBlockNumber)}}" stepKey="waitForOptions" />
188190
<click selector="{{PageBuilderActionsSection.contentBlockRemoveByIndex(contentBlockType.role, contentBlockNumber)}}" stepKey="clickRemoveContentBlock"/>
@@ -194,6 +196,7 @@
194196
<wait time="1" stepKey="waitForModalEventBinding" />
195197
<click selector="{{PageBuilderActionsSection.modalOk}}" stepKey="confirmRemoveModal"/>
196198
<waitForElementNotVisible time="1" selector="{{PageBuilderActionsSection.modalOk}}" stepKey="waitForModalHide" />
199+
<waitForPageLoad stepKey="waitForPageLoad"/>
197200
</actionGroup>
198201

199202
<!-- Remove a content block which has been configured with data or has children -->
@@ -616,6 +619,11 @@
616619
<waitForElementVisible selector="{{PageBuilderActionsSection.identifyPageBuilder}}" stepKey="seePageBuilderVisible" />
617620
<dontSee userInput="Enable Advanced CMS" stepKey="dontSeeEnableAdvancedCMSBtn"/>
618621
</actionGroup>
622+
<actionGroup name="verifyPageBuilderVisibleOnStaging">
623+
<scrollTo selector="{{PageBuilderActionsSection.identifyPageBuilder}}" stepKey="scrollToIdentifyPageBuilder"/>
624+
<waitForElementVisible selector="{{PageBuilderActionsSection.identifyPageBuilder}}" stepKey="seePageBuilderVisible" />
625+
<dontSee userInput="Enable Advanced CMS" stepKey="dontSeeEnableAdvancedCMSBtn"/>
626+
</actionGroup>
619627
<actionGroup name="verifyPageBuilderNotVisibleOnPage">
620628
<dontSee userInput="Enable Advanced CMS" stepKey="dontSeeEnableAdvancedCMSBtn"/>
621629
<dontSee selector="{{PageBuilderActionsSection.identifyPageBuilder}}" stepKey="seePageBuilderVisible" />

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageBuilder/ActionGroup/DividerActionGroup.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,40 @@
2121
<waitForElementVisible selector="{{page.thickness(index, thickness.value)}}" stepKey="waitForThicknessVisible"/>
2222
<waitForElementVisible selector="{{page.width(index, width.value)}}" stepKey="waitForWidthVisible"/>
2323
</actionGroup>
24+
<actionGroup name="validateDividerWithoutColor">
25+
<arguments>
26+
<argument name="page" defaultValue=""/>
27+
<argument name="index" defaultValue="1" type="string"/>
28+
<argument name="thickness" defaultValue="PageBuilderDividerLineThickness_Default"/>
29+
<argument name="width" defaultValue="PageBuilderDividerLineWidth_Default"/>
30+
</arguments>
31+
<waitForElementVisible selector="{{page.base(index)}}" stepKey="waitForElementVisible"/>
32+
<waitForElementVisible selector="{{page.noColor(index)}}" stepKey="waitForColorVisible"/>
33+
<waitForElementVisible selector="{{page.thickness(index, thickness.value)}}" stepKey="waitForThicknessVisible"/>
34+
<waitForElementVisible selector="{{page.width(index, width.value)}}" stepKey="waitForWidthVisible"/>
35+
</actionGroup>
36+
<actionGroup name="validateDividerWithoutThickness">
37+
<arguments>
38+
<argument name="page" defaultValue=""/>
39+
<argument name="index" defaultValue="1" type="string"/>
40+
<argument name="color" defaultValue="PageBuilderDividerLineColor_Default"/>
41+
<argument name="width" defaultValue="PageBuilderDividerLineWidth_Default"/>
42+
</arguments>
43+
<waitForElementVisible selector="{{page.base(index)}}" stepKey="waitForElementVisible"/>
44+
<waitForElementVisible selector="{{page.color(index, color.rgb)}}" stepKey="waitForColorVisible"/>
45+
<waitForElementVisible selector="{{page.noThickness(index)}}" stepKey="waitForThicknessVisible"/>
46+
<waitForElementVisible selector="{{page.width(index, width.value)}}" stepKey="waitForWidthVisible"/>
47+
</actionGroup>
48+
<actionGroup name="validateDividerWithoutWidth">
49+
<arguments>
50+
<argument name="page" defaultValue=""/>
51+
<argument name="index" defaultValue="1" type="string"/>
52+
<argument name="color" defaultValue="PageBuilderDividerLineColor_Default"/>
53+
<argument name="thickness" defaultValue="PageBuilderDividerLineThickness_Default"/>
54+
</arguments>
55+
<waitForElementVisible selector="{{page.base(index)}}" stepKey="waitForElementVisible"/>
56+
<waitForElementVisible selector="{{page.color(index, color.rgb)}}" stepKey="waitForColorVisible"/>
57+
<waitForElementVisible selector="{{page.thickness(index, thickness.value)}}" stepKey="waitForThicknessVisible"/>
58+
<waitForElementVisible selector="{{page.noWidth(index)}}" stepKey="waitForWidthVisible"/>
59+
</actionGroup>
2460
</actionGroups>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/PageBuilder/Data/AnchorData.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<data key="section">general</data>
1515
<data key="fieldName">id</data>
1616
<data key="text">Anchor</data>
17+
<data key="errorMessage">This is a required field.</data>
1718
</entity>
1819
<entity name="PageBuilderAnchorIdentifier" type="pagebuilder_anchor_identifier_property">
1920
<data key="name">Identifier</data>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="enablePageBuilderAndWYSIWYGForm" type="config">
12+
<data key="config_state[cms_wysiwyg]">true</data>
13+
<data key="groups[wysiwyg][fields][enabled][value]">enabled</data>
14+
<data key="groups[wysiwyg][fields][editor][inherit]">true</data>
15+
<data key="groups[wysiwyg][fields][use_static_urls_in_catalog][value]">false</data>
16+
<data key="config_state[cms_pagebuilder]">true</data>
17+
<data key="groups[pagebuilder][fields][enabled][value]">true</data>
18+
</entity>
19+
<entity name="disableWYSYWYGForm" type="config">
20+
<data key="config_state[cms_wysiwyg]">false</data>
21+
<data key="groups[wysiwyg][fields][enabled][value]">disabled</data>
22+
<data key="groups[wysiwyg][fields][editor][inherit]">true</data>
23+
<data key="groups[wysiwyg][fields][use_static_urls_in_catalog][value]">false</data>
24+
<data key="config_state[cms_pagebuilder]">false</data>
25+
<data key="groups[pagebuilder][fields][enabled][value]">true</data>
26+
</entity>
27+
</entities>

0 commit comments

Comments
 (0)