Skip to content

Commit 7ca7b87

Browse files
committed
MC-3308: Automate MFTF for MC-1416
1 parent e113f67 commit 7ca7b87

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
<see userInput="{{PageBuilderTextContentTypeDefault.value}}" stepKey="seeTextContentType"/>
122122
<seeElement selector="{{StorefrontCMSPageSection.imageSource(ImageUpload3.fileName)}}" stepKey="assertMediaSource"/>
123123
<seeElement selector="{{TextOnStorefront.text('1', _ENV.MAGENTO_BASE_URL)}}" stepKey="waitForVariableStorefront"/>
124-
<seeElement selector="{{TextOnStorefront.textAreaWidget('1', 'text', $$createCMSPageB.identifier$$)}}" stepKey="waitForWidgetStorefront"/>
124+
<seeElement selector="{{TextOnStorefront.textAreaWidget('1', '{{_ENV.MAGENTO_BASE_URL}}', $$createCMSPageB.identifier$$)}}" stepKey="waitForWidgetStorefront"/>
125125
</test>
126126
<test name="ColumnAddToRowAndHeightAdjusts">
127127
<annotations>

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2626
<actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" />
2727
<createData entity="_defaultCmsPage" stepKey="createCMSPage" />
28+
<createData entity="_defaultCmsPage" stepKey="createCMSPageB" />
2829
</before>
2930
<after>
3031
<deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage" />
32+
<deleteData createDataKey="createCMSPageB" stepKey="deletePreReqCMSPageB" />
3133
<actionGroup ref="logout" stepKey="logout"/>
3234
</after>
3335
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage1">
@@ -47,6 +49,9 @@
4749
<waitForElementVisible selector="{{TabOnStage.tabContent('1')}}" stepKey="waitForFirstTabContent"/>
4850
<waitForElementVisible selector="{{TabOnStage.tabHeader('1')}}" stepKey="waitForFirstTabHeader"/>
4951
<!-- Add Text to Tab -->
52+
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroupText">
53+
<argument name="group" value="PageBuilderTextContentType"/>
54+
</actionGroup>
5055
<actionGroup ref="dragContentTypeToContainer" stepKey="dragTextOntoTab">
5156
<argument name="contentType" value="PageBuilderTextContentType"/>
5257
<argument name="containerTargetType" value="PageBuilderTabContentType"/>
@@ -121,8 +126,8 @@
121126
<amOnPage url="$$createCMSPage.identifier$$" stepKey="amOnPageTestPage"/>
122127
<see userInput="{{PageBuilderTextContentTypeDefault.value}}" stepKey="seeTextContentType"/>
123128
<seeElement selector="{{StorefrontCMSPageSection.imageSource(ImageUpload3.fileName)}}" stepKey="assertMediaSource"/>
124-
<seeElement selector="{{TextOnStorefront.text('1', _ENV.MAGENTO_BASE_URL)}}" stepKey="waitForVariableStorefront"/>
125-
<seeElement selector="{{TextOnStorefront.textAreaWidget('1', 'text', $$createCMSPageB.identifier$$)}}" stepKey="waitForWidgetStorefront"/>
129+
<seeElement selector="{{TextOnStorefront.text('1', '{{_ENV.MAGENTO_BASE_URL}}')}}" stepKey="waitForVariableStorefront"/>
130+
<seeElement selector="{{TextOnStorefront.textAreaWidget('1', '{{_ENV.MAGENTO_BASE_URL}}', $$createCMSPageB.identifier$$)}}" stepKey="waitForWidgetStorefront"/>
126131
</test>
127132
<test name="CanAddTextToTab">
128133
<annotations>
@@ -149,7 +154,7 @@
149154
</actionGroup>
150155
<!-- Add Tabs to Stage -->
151156
<comment userInput="Add Tabs to Stage" stepKey="addTabsToStage"/>
152-
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup">
157+
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup1">
153158
<argument name="group" value="PageBuilderTabsContentType"/>
154159
</actionGroup>
155160
<actionGroup ref="dragContentTypeToStage" stepKey="dragTabsIntoStage">

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,9 @@
860860
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup">
861861
<argument name="group" value="PageBuilderTextContentType"/>
862862
</actionGroup>
863+
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroupText">
864+
<argument name="group" value="PageBuilderTextContentType"/>
865+
</actionGroup>
863866
<actionGroup ref="dragContentTypeToStage" stepKey="dragIntoStage">
864867
<argument name="contentType" value="PageBuilderTextContentType"/>
865868
</actionGroup>
@@ -1258,7 +1261,7 @@
12581261
</actionGroup>
12591262
<!-- Validate Storefront -->
12601263
<comment userInput="Validate Storefront" stepKey="commentValidateStorefront"/>
1261-
<waitForElementVisible selector="{{TextOnStorefront.textAreaWidget('1', 'text', PageBuilderPageTitle.pageName)}}" stepKey="waitForTextStorefront"/>
1264+
<waitForElementVisible selector="{{TextOnStorefront.textAreaWidget('1', '{{_ENV.MAGENTO_BASE_URL}}', PageBuilderPageTitle.pageName)}}" stepKey="waitForTextStorefront"/>
12621265
</test>
12631266
<test name="TextDisabledWYSIWYGAddVariable">
12641267
<annotations>

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/content-type/wysiwyg.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
*/
55

66
import $ from "jquery";
7-
import WysiwygSetup from "mage/adminhtml/wysiwyg/tiny_mce/setup";
87
import wysiwygEvents from "mage/adminhtml/wysiwyg/events";
98
import events from "Magento_PageBuilder/js/events";
109
import _ from "underscore";
11-
import WysiwygInstance from "wysiwygAdapter";
10+
import WysiwygInstanceInterface from "wysiwygAdapter";
1211
import {AdditionalDataConfigInterface} from "../content-type-config";
1312
import DataStore from "../data-store";
1413
import WysiwygFactory from "./wysiwyg-factory";
@@ -27,7 +26,7 @@ export default class Wysiwyg {
2726
/**
2827
* Wysiwyg adapter instance
2928
*/
30-
private wysiwygAdapter: WysiwygInstance;
29+
private wysiwygAdapter: WysiwygInstanceInterface;
3130

3231
/**
3332
* Content type's data store
@@ -101,7 +100,7 @@ export default class Wysiwyg {
101100
}
102101

103102
/**
104-
* @returns {WysiwygSetup}
103+
* @returns {WysiwygInstanceInterface}
105104
*/
106105
public getAdapter() {
107106
return this.wysiwygAdapter;

0 commit comments

Comments
 (0)