Skip to content

Commit d3ba14d

Browse files
committed
#419: Nested Links If User Adds Link Attribute & Link Widget to Banner/Slide, mftf refactoring.
1 parent e8b3678 commit d3ba14d

7 files changed

+103
-180
lines changed
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="clickTinyMCEInsertImageButtonActionGroup">
11+
<annotations>
12+
<description>Clicks the Insert Link button from the TinyMCE.</description>
13+
</annotations>
14+
<waitForElementVisible selector="{{WYSIWYGOnPageBuilderInline.notCss}} {{TinyMCESection.InsertLink}}" stepKey="waitForTinyMCEInsertLinkButton">
15+
<click selector="{{WYSIWYGOnPageBuilderInline.notCss}} {{TinyMCESection.InsertLink}}" stepKey="clickTinyMCEInsertLinkButton"/>
16+
<waitForElementVisible selector="{{WYSIWYGInsertLinkModal.modal}}" stepKey="waitForWYSIWYGInsertLinkModal"/>
17+
</actionGroup>
18+
</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/Test/AdminPageBuilderBannerCommonTest/BannerCannotHaveInlineWysiwygLinkAndLinkUrlTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
<argument name="wysiwygArea" value=""/>
7575
</actionGroup>
7676
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unfocusOnEditorArea"/>
77-
<waitForElementVisible selector="{{PageBuilderStage.modal(PageBuilderBannerMessageInvalidProperty.stageErrorMessage)}}" stepKey="waitForCorrectErrorModal"/>
77+
<waitForElementVisible selector="{{PageBuilderStage.modal(PageBuilderBannerMessageInvalidProperty.stageErrorMessage)}}" stepKey="seeCorrectErrorModal"/>
7878
<actionGroup ref="confirmRemovalModal" stepKey="confirmNestingLinkModal"/>
7979
<!-- Checks for a tags within the tinyMCE with regex -->
8080
<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)