Skip to content

Commit 60e7c71

Browse files
author
Hwashiang Yu
committed
Merge remote-tracking branch 'upstream/develop' into MC-34573
2 parents 00aa25e + 3128528 commit 60e7c71

File tree

31 files changed

+1179
-17
lines changed

31 files changed

+1179
-17
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<waitForLoadingMaskToDisappear stepKey="waitForSelectPageModal"/>
2424
<waitForElementVisible selector="{{WidgetSection.SelectPageFilterInput('chooser_title')}}" stepKey="waitForGrid"/>
2525
<fillField selector="{{WidgetSection.SelectPageFilterInput('chooser_identifier')}}" userInput="{{page}}" stepKey="enterPageName"/>
26-
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickSearch"/>
26+
<click selector=".modal-slide._show {{AdminProductGridFilterSection.applyFilters}}" stepKey="clickSearch"/>
2727
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear3"/>
2828
<waitForElementVisible selector="//td[contains(@class,'col-url')][contains(text(),'{{page}}')]" stepKey="waitForSearchResult"/>
2929
<click selector="//td[contains(@class,'col-url')][contains(text(),'{{page}}')]" stepKey="clickCmsPageLinkRow"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="ClickTinyMCEInsertImageButtonActionGroup">
11+
<annotations>
12+
<description>Clicks the Insert Link button from the TinyMCE.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="section" defaultValue="TinyMCESection"/>
16+
<argument name="wysiwygArea" defaultValue="{{WYSIWYGOnPageBuilderInline.notCss}}" type="string"/>
17+
</arguments>
18+
<waitForElementVisible selector="{{wysiwygArea}} {{section.InsertLink}}" stepKey="waitForTinyMCEInsertLinkButton"/>
19+
<click selector="{{wysiwygArea}} {{section.InsertLink}}" stepKey="clickTinyMCEInsertLinkButton"/>
20+
<waitForElementVisible selector="{{WYSIWYGInsertLinkModal.modal}}" stepKey="waitForWYSIWYGInsertLinkModal"/>
21+
</actionGroup>
22+
</actionGroups>
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="FillTinyMCEInsertImageModalAndSaveActionGroup">
11+
<annotations>
12+
<description>Adds text to Text To Display field from the TinyMCE Insert Link Modal window.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="textToDisplay" defaultValue="" type="string"/>
16+
</arguments>
17+
<waitForElementVisible selector="{{WYSIWYGInsertLinkModal.textToDisplayInput}}" stepKey="waitForTinyMCELinkModalTextToDisplayInput"/>
18+
<fillField selector="{{WYSIWYGInsertLinkModal.textToDisplayInput}}" userInput="{{textToDisplay}}" stepKey="insertTinyMCELinkModalTextToDisplayInput"/>
19+
<waitForElementVisible selector="{{WYSIWYGInsertLinkModal.okButton}}" stepKey="waitForTinyMCEInsertLinkModalOkButton"/>
20+
<click selector="{{WYSIWYGInsertLinkModal.okButton}}" stepKey="clickTinyMCEInsertLinkModalOkButton"/>
21+
<waitForElementNotVisible selector="{{WYSIWYGInsertLinkModal.modal}}" stepKey="waitForTinyMCEInsertLinkModalNotVisible"/>
22+
</actionGroup>
23+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="GoToMediaGalleryFromTinyMCEImageModalActionGroup">
11+
<annotations>
12+
<description>Clicks the Browse Media Gallery button from the TinyMCE Insert Link Modal window.</description>
13+
</annotations>
14+
<waitForElementVisible selector="{{WYSIWYGInsertLinkModal.browseMediaGalleryButton}}" stepKey="waitForWYSIWYGInsertLinkModalBrowseMediaGalleryButton"/>
15+
<click selector="{{WYSIWYGInsertLinkModal.browseMediaGalleryButton}}" stepKey="clickWYSIWYGInsertLinkModalBrowseMediaGalleryButton"/>
16+
<waitForPageLoad stepKey="waitForTinyMCEImageSelectorBrowseModal"/>
17+
</actionGroup>
18+
</actionGroups>

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@
3838
<data key="errorMessage">Adding link in both content and outer element is not allowed.</data>
3939
<data key="stageErrorMessage">We are unable to support links within the content field whilst having a link set on the content type. Please remove the content type link if you'd like to set a link within the content. We will automatically remove the links within the content field.</data>
4040
</entity>
41+
<entity name="PageBuilderBannerMessageInvalidWidgetProperty" type="pagebuilder_banner_message_property">
42+
<data key="name">Message Text</data>
43+
<data key="section">contents</data>
44+
<data key="fieldName">message</data>
45+
<data key="errorMessage">Adding widget in content and link in outer element is not allowed.</data>
46+
<data key="stageErrorMessage">We are unable to support widget within the content field whilst having a link set on the content type. Please remove the content type link if you'd like to set a widget within the content. We will automatically remove the widget within the content field.</data>
47+
</entity>
4148
<!-- Background Color -->
4249
<entity name="PageBuilderBannerBackgroundColor_Empty" type="pagebuilder_banner_background_color_property">
4350
<data key="name">Background Color</data>
@@ -82,6 +89,12 @@
8289
<data key="fieldName">link_url</data>
8390
<data key="errorMessage">Adding link in both content and outer element is not allowed.</data>
8491
</entity>
92+
<entity name="PageBuilderBannerLinkUrlInvalidWidgetProperty" type="pagebuilder_banner_linkUrl_property">
93+
<data key="name">Link</data>
94+
<data key="section">contents</data>
95+
<data key="fieldName">link_url</data>
96+
<data key="errorMessage">Adding link in outer element and widget in content is not allowed.</data>
97+
</entity>
8598
<!-- Show Button -->
8699
<entity name="PageBuilderBannerShowButtonDefaultProperty" type="pagebuilder_banner_show_button_property">
87100
<data key="name">Show Button</data>

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@
7070
<data key="fieldName">link_url</data>
7171
<data key="errorMessage">Adding link in both content and outer element is not allowed.</data>
7272
</entity>
73+
<entity name="PageBuilderSlideItemLinkUrlInvalidWidgetProperty" type="pagebuilder_slide_item_link_url_property">
74+
<data key="name">Link</data>
75+
<data key="section">general</data>
76+
<data key="fieldName">link_url</data>
77+
<data key="errorMessage">Adding link in outer element and widget in content is not allowed.</data>
78+
</entity>
7379
<!-- Show Button -->
7480
<entity name="PageBuilderSlideItemShowButton_Always" type="pagebuilder_slide_item_show_button_property">
7581
<data key="name">Show Button</data>
@@ -240,4 +246,11 @@
240246
<data key="errorMessage">Adding link in both content and outer element is not allowed.</data>
241247
<data key="stageErrorMessage">We are unable to support links within the content field whilst having a link set on the content type. Please remove the content type link if you'd like to set a link within the content. We will automatically remove the links within the content field.</data>
242248
</entity>
249+
<entity name="PageBuilderSlideItemMessageInvalidWidgetProperty" type="pagebuilder_slide_item_message__property">
250+
<data key="name">Message Text</data>
251+
<data key="section">general</data>
252+
<data key="fieldName">content</data>
253+
<data key="errorMessage">Adding widget in content and link in outer element is not allowed.</data>
254+
<data key="stageErrorMessage">We are unable to support widget within the content field whilst having a link set on the content type. Please remove the content type link if you'd like to set a widget within the content. We will automatically remove the widget within the content field.</data>
255+
</entity>
243256
</entities>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderBannerCommonTest/BannerCannotHaveInlineWysiwygLinkAndLinkUrlTest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@
7373
<argument name="textToDisplay" value="{{ExternalLink.googleUrl}}"/>
7474
<argument name="wysiwygArea" value=""/>
7575
</actionGroup>
76-
<seeElement selector="{{PageBuilderStage.modal(PageBuilderBannerMessageInvalidProperty.stageErrorMessage)}}" stepKey="seeCorrectErrorModal"/>
76+
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unfocusOnEditorArea"/>
77+
<waitForElementVisible selector="{{PageBuilderStage.modal(PageBuilderBannerMessageInvalidProperty.stageErrorMessage)}}" stepKey="seeCorrectErrorModal"/>
7778
<actionGroup ref="confirmRemovalModal" stepKey="confirmNestingLinkModal"/>
7879
<!-- Checks for a tags within the tinyMCE with regex -->
7980
<executeJS function="return (/&lt;a[\s]+([^&gt;]+)&gt;|&lt;a&gt;|&lt;\/a&gt;/igm).test(tinymce.activeEditor.getContent());" stepKey="grabIfAnchorInWysiwygBoolean"/>

0 commit comments

Comments
 (0)