Skip to content

Commit 66aca0b

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into MC-4182-update-installation-docs
2 parents ec37482 + 7e43bb1 commit 66aca0b

File tree

114 files changed

+1257
-1682
lines changed

Some content is hidden

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

114 files changed

+1257
-1682
lines changed

app/code/Magento/PageBuilder/Model/Wysiwyg/DefaultConfigProvider.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,18 @@ public function __construct(
3232
$this->additionalSettings = $additionalSettings;
3333
}
3434
/**
35-
* {@inheritdoc}
35+
* Returns configuration data
36+
*
37+
* @param \Magento\Framework\DataObject $config
38+
* @return \Magento\Framework\DataObject
3639
*/
3740
public function getConfig(\Magento\Framework\DataObject $config): \Magento\Framework\DataObject
3841
{
3942
$config->addData([
4043
'tinymce4' => [
41-
'toolbar' => 'undo redo | styleselect | fontsizeselect | forecolor backcolor | bold italic underline' .
42-
' | alignleft aligncenter alignright | numlist bullist | link image table charmap',
44+
'toolbar' => 'undo redo | styleselect | fontsizeselect | lineheightselect | forecolor backcolor ' .
45+
'| bold italic underline | alignleft aligncenter alignright | numlist bullist ' .
46+
'| link image table charmap',
4347

4448
'plugins' => implode(
4549
' ',
@@ -59,7 +63,8 @@ public function getConfig(\Magento\Framework\DataObject $config): \Magento\Frame
5963
'table',
6064
'textcolor',
6165
'image',
62-
'colorpicker'
66+
'colorpicker',
67+
'lineheight'
6368
]
6469
),
6570
'content_css' => [
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="clickOutsideTextInlineEditing">
12+
<comment userInput="Click outside text editable area" stepKey="commentClickOutside"/>
13+
<moveMouseOver selector="{{PageBuilderPanel.searchPanel}}" stepKey="moveMouseOutsideLiveEdit"/>
14+
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="clickOutsideLiveEdit"/>
15+
<waitForPageLoad stepKey="waitForAnimation"/>
16+
</actionGroup>
17+
</actionGroups>

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

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,19 @@
2727
<argument name="variable" defaultValue=""/>
2828
</arguments>
2929
<comment userInput="Adding Variable To Tiny MCE" stepKey="commentAddVariableToTinyMCE"/>
30-
<waitForElementVisible selector="{{TinyMCESection.InsertVariableIcon}}" stepKey="waitForInsertVariable1"/>
31-
<click selector="{{TinyMCESection.InsertVariableIcon}}" stepKey="clickInsertVariable1"/>
30+
<waitForElementVisible selector="{{WYSIWYGOnPageBuilderInline.notCss}} {{TinyMCESection.InsertVariableIcon}}" stepKey="waitForInsertVariable1"/>
31+
<click selector="{{WYSIWYGOnPageBuilderInline.notCss}} {{TinyMCESection.InsertVariableIcon}}" stepKey="clickInsertVariable1"/>
3232
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
3333
<waitForElementVisible selector="{{VariableSection.Radio(variable.variableName)}}" stepKey="waitForVariable1"/>
3434
<checkOption selector="{{VariableSection.Radio(variable.variableName)}}" stepKey="selectVariable"/>
3535
<waitForElementVisible selector="{{VariableSection.InsertWidget}}" stepKey="waitForInsertVariable2"/>
3636
<click selector="{{VariableSection.InsertWidget}}" stepKey="clickInsertVariable2"/>
3737
<waitForElementNotVisible selector="{{VariableSection.InsertWidget}}" stepKey="waitForVariableModalToClose"/>
3838
</actionGroup>
39+
<actionGroup name="addVariableToTinyMCEInline" extends="addVariableToTinyMCE">
40+
<waitForElementVisible selector="{{TinyMCESection.InsertVariableIcon}}" stepKey="waitForInsertVariable1"/>
41+
<click selector="{{TinyMCESection.InsertVariableIcon}}" stepKey="clickInsertVariable1"/>
42+
</actionGroup>
3943
<actionGroup name="addVariableToTinyMCE3" extends="addVariableToTinyMCE">
4044
<arguments>
4145
<argument name="variable" defaultValue=""/>
@@ -67,8 +71,8 @@
6771
<argument name="page" defaultValue="" type="string"/>
6872
</arguments>
6973
<comment userInput="Adding Widget To Tiny MCE" stepKey="commentAddWidget"/>
70-
<waitForElementVisible selector="{{TinyMCESection.InsertWidgetIcon}}" stepKey="waitForInsertWidget1"/>
71-
<click selector="{{TinyMCESection.InsertWidgetIcon}}" stepKey="clickAddWidgetBtn"/>
74+
<waitForElementVisible selector="{{WYSIWYGOnPageBuilderInline.notCss}} {{TinyMCESection.InsertWidgetIcon}}" stepKey="waitForInsertWidget1"/>
75+
<click selector="{{WYSIWYGOnPageBuilderInline.notCss}} {{TinyMCESection.InsertWidgetIcon}}" stepKey="clickAddWidgetBtn"/>
7276
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
7377
<waitForElementVisible selector="{{WidgetSection.WidgetType}}" stepKey="waitForWidgetType"/>
7478
<selectOption selector="{{WidgetSection.WidgetType}}" userInput="{{TinyMCEWidgetCMSPageLink.widgetType}}" stepKey="selectCMSPageLinkWidget"/>
@@ -90,6 +94,10 @@
9094
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear5"/>
9195
<waitForElementNotVisible selector="{{WidgetSection.InsertWidget}}" stepKey="waitForInsertWidgetModalToClose"/>
9296
</actionGroup>
97+
<actionGroup name="addPageLinkWidgetToTinyMCEInline" extends="addPageLinkWidgetToTinyMCE">
98+
<waitForElementVisible selector="{{TinyMCESection.InsertWidgetIcon}}" stepKey="waitForInsertWidget1"/>
99+
<click selector="{{TinyMCESection.InsertWidgetIcon}}" stepKey="clickAddWidgetBtn"/>
100+
</actionGroup>
93101
<actionGroup name="addPageLinkWidgetToTinyMCE3" extends="addPageLinkWidgetToTinyMCE">
94102
<arguments>
95103
<argument name="widget" defaultValue=""/>
@@ -131,8 +139,8 @@
131139
<argument name="title" type="string" defaultValue=""/>
132140
</arguments>
133141
<comment userInput="insertLinkInWYSIWYG" stepKey="comment"/>
134-
<waitForElementVisible selector="{{section.InsertLink}}" stepKey="waitForInsertLinkButton"/>
135-
<click selector="{{section.InsertLink}}" stepKey="clickInsertLinkButton"/>
142+
<waitForElementVisible selector="{{WYSIWYGOnPageBuilderInline.notCss}} {{section.InsertLink}}" stepKey="waitForInsertLinkButton"/>
143+
<click selector="{{WYSIWYGOnPageBuilderInline.notCss}} {{section.InsertLink}}" stepKey="clickInsertLinkButton"/>
136144
<waitForPageLoad stepKey="waitForPageLoad"/>
137145
<waitForElementVisible selector="{{WYSIWYGInsertLinkModal.modal}}" stepKey="waitForInsertLinkModal"/>
138146
<fillField selector="{{WYSIWYGInsertLinkModal.urlInput}}" userInput="{{url}}" stepKey="insertUrl"/>

app/code/Magento/PageBuilder/Test/Mftf/Data/CmsPageData.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<data key="content">&lt;div class=&quot;my-div&quot;&gt;&lt;/div&gt;</data>
1313
</entity>
1414
<entity name="cmsPageWithImage" type="cms_page">
15-
<data key="content">&lt;img src=&quot;{{media url=&quot;wysiwyg/home/home-t-shirts.png&quot;}}&quot;/&gt;</data>
15+
<data key="content">&lt;img src=&quot;{{media url='wysiwyg/home/home-t-shirts.png'}}&quot;/&gt;</data>
1616
</entity>
1717
<entity name="cmsPageNonexistentDataRole" type="cms_page">
1818
<data key="content">&lt;div data-role=&quot;row&quot;&gt;&lt;div data-role=&quot;non-existent-content-type&quot;&gt;&lt;/div&gt;&lt;/div&gt;</data>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<element name="content" type="button" selector="//div[contains(@class, 'pagebuilder-html')][1]//div[contains(text(), '&lt;div class=&quot;my-div&quot;&gt;&lt;/div&gt;')]"/>
4949
</section>
5050
<section name="HtmlOnBackendWithImage">
51-
<element name="content" type="button" selector="//div[contains(@class, 'pagebuilder-html')][1]/img[not(contains(@src, '{{media'))]"/>
51+
<element name="content" type="button" selector="//div[contains(@class, 'pagebuilder-html')][1]/div[contains(@class, 'placeholder-html-code') and contains(text(), '{{media')]"/>
5252
</section>
5353
<section name="HtmlOnFrontendWithImage">
5454
<element name="content" type="button" selector="//div[@data-role='html'][1]/img[not(contains(@src, '{{media'))]"/>

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

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
<element name="text" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]/div//*[contains(.,'{{arg2}}')]" parameterized="true"/>
1717
<element name="directive" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]/div//span[contains(.,'{{arg2}}')]" parameterized="true"/>
1818
<element name="mcePlaceholder" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]/div//*[starts-with(@id, '{{arg2}}')]" parameterized="true"/>
19-
<element name="variablePlaceholder" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg}}]//*[@data-bind='html: data.main.html']//*[contains(@class, 'magento-variable magento-placeholder')]" parameterized="true"/>
20-
<element name="widgetPlaceholder" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg}}]//*[@data-bind='html: data.main.html']//*[contains(@class, 'magento-placeholder magento-widget')]" parameterized="true"/>
19+
<element name="variablePlaceholder" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg}}]/div//*[contains(@class, 'magento-variable magento-placeholder')]" parameterized="true"/>
20+
<element name="widgetPlaceholder" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg}}]/div//*[contains(@class, 'magento-placeholder magento-widget')]" parameterized="true"/>
2121
<element name="placeholder" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]//div[contains(@class, 'placeholder-text') and text()='Edit Text']" parameterized="true"/>
2222
<element name="textArea" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg}}]//textarea[contains(@class,'inline-wysiwyg-textarea')]" parameterized="true"/>
2323
<element name="textareaPlaceholder" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]//textarea[contains(@class, 'inline-wysiwyg-textarea') and contains(@placeholder,'Edit Text')]" parameterized="true"/>
@@ -55,7 +55,6 @@
5555
<element name="tinyMCE3" type="text" selector="#pagebuilder_text_form_content_tbl"/>
5656
<element name="tinyMCE3VariableBtn" type="text" selector="#pagebuilder_text_form_content_magentovariable"/>
5757
<element name="tinyMCE3WidgetBtn" type="text" selector="#pagebuilder_text_form_content_magentowidget"/>
58-
<element name="panelFieldValidationErrorMessage" type="button" selector="//div[contains(@class,'_insert_form')]//div[@data-index='{{arg1}}']//div[contains(@class,'admin__control-wysiwig')]//..//../label[.='{{arg2}}']" parameterized="true"/>
5958
<!-- WYSIWYG Disabled -->
6059
<element name="textArea" type="text" selector="#pagebuilder_text_form_content"/>
6160
<element name="textAreaId" type="text" selector="pagebuilder_text_form_content"/>
@@ -96,25 +95,9 @@
9695
<element name="noPadding" type="text" selector="(//div[@data-role='text'])[{{arg1}}][not(contains(@style,'padding:'))]" parameterized="true"/>
9796
<element name="emptyText" type="text" selector="//div[@data-role='text']/p[not(text())]"/>
9897
</section>
99-
<section name="TextOnBackend">
100-
<element name="textInstance" type="button" selector='//div[contains(@class, "pagebuilder-text")][1]/div[1]'/>
101-
<element name="textArea" type="text" selector='#pagebuilder_text_form_content'/>
102-
<element name="triggerValidation" type="button" selector='div.modal-content div.mce-edit-area'/>
103-
</section>
104-
<section name="TextOnSlider">
105-
<element name="textArea" type="text" selector="#pagebuilder_slide_form_content"/>
106-
</section>
10798
<!-- Move the below elements to CE after code freeze -->
10899
<section name="moveToCE">
109100
<element name="SelectPageButton" type="button" selector="//button[@title='Select Page...']"/>
110101
<element name="generalFilter" type="input" selector="input.admin__control-text[name='{{arg1}}']" parameterized="true"/>
111102
</section>
112-
<section name="WYSIWYGOnPageBuilder">
113-
<element name="undo" type="button" selector="div[aria-label='Undo']"/>
114-
<element name="redo" type="button" selector="div[aria-label='Redo']"/>
115-
<element name="fontSize" type="button" selector="div[aria-label='Font Sizes']"/>
116-
<element name="textColor" type="button" selector="div[aria-label='Text color']"/>
117-
<element name="backgroundColor" type="button" selector="div[aria-label='Background color']"/>
118-
<element name="formatSelector" type="button" selector="//span[text()='Formats']"/>
119-
</section>
120103
</sections>

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,23 @@
2020
<element name="okButton" type="button" selector="//div[@aria-label='Insert link']//button//span[.='Ok']"/>
2121
<element name="cancelButton" type="button" selector="//div[@aria-label='Insert link']//button//span[.='Cancel']"/>
2222
</section>
23+
<section name="WYSIWYGOnPageBuilder">
24+
<element name="undo" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline) div[aria-label='Undo']"/>
25+
<element name="redo" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline) div[aria-label='Redo']"/>
26+
<element name="fontSize" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline) div[aria-label='Font Sizes']"/>
27+
<element name="lineHeight" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline) div[aria-label='Line Height']"/>
28+
<element name="textColor" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline) div[aria-label='Text color']"/>
29+
<element name="backgroundColor" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline) div[aria-label='Background color']"/>
30+
<element name="formatSelector" type="button" selector="//div[contains(@class, 'mce-tinymce') and not(contains(@class, 'mce-tinymce-inline'))]//span[text()='Formats']"/>
31+
</section>
32+
<section name="WYSIWYGOnPageBuilderInline">
33+
<element name="notCss" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline)"/>
34+
<element name="undo" type="button" selector=".mce-tinymce-inline div[aria-label='Undo']"/>
35+
<element name="redo" type="button" selector=".mce-tinymce-inline div[aria-label='Redo']"/>
36+
<element name="fontSize" type="button" selector=".mce-tinymce-inline div[aria-label='Font Sizes']"/>
37+
<element name="lineHeight" type="button" selector=".mce-tinymce-inline div[aria-label='Line Height']"/>
38+
<element name="textColor" type="button" selector=".mce-tinymce-inline div[aria-label='Text color']"/>
39+
<element name="backgroundColor" type="button" selector=".mce-tinymce-inline div[aria-label='Background color']"/>
40+
<element name="formatSelector" type="button" selector="//div[contains(@class, 'mce-tinymce')]//span[text()='Formats']"/>
41+
</section>
2342
</sections>

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="AdminAddImageToWYSIWYGProductTest">
12-
<annotations>
13-
<skip>
14-
<issueId value="MAGETWO-94438"/>
15-
</skip>
16-
</annotations>
17-
</test>
1811
<test name="RowCanAddAdditionalRowOnProduct">
1912
<annotations>
2013
<features value="PageBuilder - Catalog Products"/>

0 commit comments

Comments
 (0)