Skip to content

Commit 7e43bb1

Browse files
author
Cari Spruiell
authored
Merge pull request #136 from magento-obsessive-owls/cms-team-1-delivery
[CMS Team 1] Bug Fixes
2 parents 6c8cade + c25f5b5 commit 7e43bb1

File tree

19 files changed

+315
-918
lines changed

19 files changed

+315
-918
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' => [

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
<argument name="variable" defaultValue=""/>
2828
</arguments>
2929
<comment userInput="Adding Variable To Tiny MCE" stepKey="commentAddVariableToTinyMCE"/>
30-
<waitForElementVisible selector="{{WYSIWYGInline.notCss}} {{TinyMCESection.InsertVariableIcon}}" stepKey="waitForInsertVariable1"/>
31-
<click selector="{{WYSIWYGInline.notCss}} {{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"/>
@@ -71,8 +71,8 @@
7171
<argument name="page" defaultValue="" type="string"/>
7272
</arguments>
7373
<comment userInput="Adding Widget To Tiny MCE" stepKey="commentAddWidget"/>
74-
<waitForElementVisible selector="{{WYSIWYGInline.notCss}} {{TinyMCESection.InsertWidgetIcon}}" stepKey="waitForInsertWidget1"/>
75-
<click selector="{{WYSIWYGInline.notCss}} {{TinyMCESection.InsertWidgetIcon}}" stepKey="clickAddWidgetBtn"/>
74+
<waitForElementVisible selector="{{WYSIWYGOnPageBuilderInline.notCss}} {{TinyMCESection.InsertWidgetIcon}}" stepKey="waitForInsertWidget1"/>
75+
<click selector="{{WYSIWYGOnPageBuilderInline.notCss}} {{TinyMCESection.InsertWidgetIcon}}" stepKey="clickAddWidgetBtn"/>
7676
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
7777
<waitForElementVisible selector="{{WidgetSection.WidgetType}}" stepKey="waitForWidgetType"/>
7878
<selectOption selector="{{WidgetSection.WidgetType}}" userInput="{{TinyMCEWidgetCMSPageLink.widgetType}}" stepKey="selectCMSPageLinkWidget"/>
@@ -139,8 +139,8 @@
139139
<argument name="title" type="string" defaultValue=""/>
140140
</arguments>
141141
<comment userInput="insertLinkInWYSIWYG" stepKey="comment"/>
142-
<waitForElementVisible selector="{{WYSIWYGInline.notCss}} {{section.InsertLink}}" stepKey="waitForInsertLinkButton"/>
143-
<click selector="{{WYSIWYGInline.notCss}} {{section.InsertLink}}" stepKey="clickInsertLinkButton"/>
142+
<waitForElementVisible selector="{{WYSIWYGOnPageBuilderInline.notCss}} {{section.InsertLink}}" stepKey="waitForInsertLinkButton"/>
143+
<click selector="{{WYSIWYGOnPageBuilderInline.notCss}} {{section.InsertLink}}" stepKey="clickInsertLinkButton"/>
144144
<waitForPageLoad stepKey="waitForPageLoad"/>
145145
<waitForElementVisible selector="{{WYSIWYGInsertLinkModal.modal}}" stepKey="waitForInsertLinkModal"/>
146146
<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: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -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,33 +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=".mce-tinymce:not(.mce-tinymce-inline) div[aria-label='Undo']"/>
114-
<element name="redo" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline) div[aria-label='Redo']"/>
115-
<element name="fontSize" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline) div[aria-label='Font Sizes']"/>
116-
<element name="textColor" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline) div[aria-label='Text color']"/>
117-
<element name="backgroundColor" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline) div[aria-label='Background color']"/>
118-
<element name="formatSelector" type="button" selector="//div[contains(@class, 'mce-tinymce') and not(contains(@class, 'mce-tinymce-inline'))]//span[text()='Formats']"/>
119-
</section>
120-
<section name="WYSIWYGOnPageBuilderInline">
121-
<element name="undo" type="button" selector=".mce-tinymce-inline div[aria-label='Undo']"/>
122-
<element name="redo" type="button" selector=".mce-tinymce-inline div[aria-label='Redo']"/>
123-
<element name="fontSize" type="button" selector=".mce-tinymce-inline div[aria-label='Font Sizes']"/>
124-
<element name="textColor" type="button" selector=".mce-tinymce-inline div[aria-label='Text color']"/>
125-
<element name="backgroundColor" type="button" selector=".mce-tinymce-inline div[aria-label='Background color']"/>
126-
<element name="formatSelector" type="button" selector="//div[contains(@class, 'mce-tinymce')]//span[text()='Formats']"/>
127-
</section>
128103
</sections>

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

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11-
<section name="WYSIWYGInline">
12-
<element name="notCss" type="button" selector=".mce-tinymce:not(.mce-tinymce-inline)"/>
13-
</section>
1411
<section name="WYSIWYGInsertLinkModal">
1512
<element name="modal" type="input" selector="[aria-label='Insert link']"/>
1613
<element name="title" type="input" selector="//div[@aria-label='Insert link']//div[contains(@id,'-title') and .='Insert link']"/>
@@ -23,4 +20,23 @@
2320
<element name="okButton" type="button" selector="//div[@aria-label='Insert link']//button//span[.='Ok']"/>
2421
<element name="cancelButton" type="button" selector="//div[@aria-label='Insert link']//button//span[.='Cancel']"/>
2522
</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>
2642
</sections>

0 commit comments

Comments
 (0)