Skip to content

Commit cc9df4f

Browse files
committed
MC-1438: Editing Text Content Block from the Stage with WYSIWYG turned off completely or by default
1 parent e7f2fbe commit cc9df4f

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<section name="TextOnStorefront">
6262
<element name="base" type="text" selector="(//div[@data-role='text'])[{{arg1}}]" parameterized="true"/>
6363
<element name="baseJs" type="text" selector="document.querySelectorAll('[data-role=\'text\']')[{{arg1}}]" parameterized="true"/>
64-
<element name="textAreaText" type="text" selector="(//div[@data-role='text'])[{{arg1}}][.='{{arg2}}']" parameterized="true"/>
64+
<element name="textAreaText" type="text" selector="(//div[@data-role='text'])[{{arg1}}][contains(text(),'{{arg2}}')]" parameterized="true"/>
6565
<element name="textAreaWidget" type="text" selector="(//div[@data-role='text'])[{{arg1}}]//a[contains(@href,'{{arg2}}{{arg3}}{{arg4}}')]" parameterized="true"/>
6666
<element name="textAreaVariable" type="text" selector="(//div[@data-role='text'])[{{arg1}}]//a[contains(@href,'{{arg2}}{{arg3}}')]" parameterized="true"/>
6767
<element name="text" type="text" selector="(//div[@data-role='text'])[{{arg1}}]//*[contains(text(),'{{arg2}}')]" parameterized="true"/>

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

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,18 @@
317317
</actionGroup>
318318
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
319319
<!-- Validate Stage After Save -->
320-
<executeJS function="return '{{TinyMCEWidgetCMSPageLink.stageValue}}{{TinyMCEVariableBaseURL.stageValue}}{{PageBuilderTextProperty.value}}'" stepKey="expectedData"/>
321320
<comment userInput="Validate Stage After Save" stepKey="commentValidateStage2"/>
322321
<executeJS function="return document.evaluate(&quot;{{TextOnStage.textArea('1')}}&quot;, document.body).iterateNext().value" stepKey="actualData"/>
323-
<assertContains stepKey="assertTextValue">
324-
<expectedResult type="variable">expectedData</expectedResult>
322+
<assertContains stepKey="assertVariable">
323+
<expectedResult type="string">{{TinyMCEVariableBaseURL.stageValue}}</expectedResult>
324+
<actualResult type="variable">actualData</actualResult>
325+
</assertContains>
326+
<assertContains stepKey="assertWidget">
327+
<expectedResult type="string">{{TinyMCEWidgetCMSPageLink.stageValue}}</expectedResult>
328+
<actualResult type="variable">actualData</actualResult>
329+
</assertContains>
330+
<assertContains stepKey="assertText">
331+
<expectedResult type="string">{{PageBuilderTextProperty.value}}</expectedResult>
325332
<actualResult type="variable">actualData</actualResult>
326333
</assertContains>
327334
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage2"/>
@@ -332,7 +339,9 @@
332339
</actionGroup>
333340
<!-- Validate Storefront -->
334341
<comment userInput="Validate Storefront" stepKey="commentValidateStorefront"/>
335-
<waitForElementVisible selector="{{TextOnStorefront.textAreaText('1', '$grabBaseURL')}}" stepKey="waitForVariableStorefront"/>
342+
<see userInput="{{PageBuilderTextProperty.value}}" stepKey="seeTextOnStorefront"/>
343+
<seeElement selector="{{TextOnStorefront.textAreaText('1', '$grabBaseURL')}}" stepKey="waitForVariableStorefront"/>
344+
<see userInput="$$createCMSPageB.title$$" stepKey="waitForWidgetStorefront"/>
336345
</test>
337346
<test name="TextAddWYSIWYGContentTypeToTabOnStage">
338347
<annotations>

0 commit comments

Comments
 (0)