Skip to content

Commit f6d78e6

Browse files
committed
MC-3308: Automate MFTF for MC-1416
1 parent 38038db commit f6d78e6

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<element name="tinymce" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg}}]//div[contains(@class, 'inline-wysiwyg')]" parameterized="true"/>
1818
<element name="importantStyle" type="text" selector="//span[text()='Important']"/>
1919
<element name="textInImportantStyle" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]//div[contains(normalize-space(@class), 'cms-content-important') and text()='{{arg2}}']" parameterized="true"/>
20+
<element name="emptyTextInImportantStyle" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]//div[contains(normalize-space(@class), 'cms-content-important')]" parameterized="true"/>
2021
<!-- Advanced Configuration -->
2122
<element name="alignment" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]/div[contains(@style,'text-align: {{arg2}};')]" parameterized="true"/>
2223
<element name="noAlignment" type="text" selector="(//div[contains(@class,'pagebuilder-text')])[{{arg1}}]/div[not(contains(@style,'text-align:'))]" parameterized="true"/>
@@ -58,6 +59,7 @@
5859
<element name="text" type="text" selector="(//div[@data-role='text'])[{{arg1}}]//*[contains(text(),'{{arg2}}')]" parameterized="true"/>
5960
<element name="empty" type="text" selector="//div[@data-role='text'][{{arg1}}][not(*)]" parameterized="true"/>
6061
<element name="image" type="text" selector="//div[@data-role='text'][{{arg1}}]//img[contains(@src,'{{arg2}}')]" parameterized="true"/>
62+
<element name="textInImportantStyle" type="text" selector="//div[contains(normalize-space(@class), 'cms-content-important') and text()='{{arg1}}']" parameterized="true"/>
6163
<!-- Advanced Configuration -->
6264
<element name="alignment" type="text" selector="(//div[@data-role='text'])[{{arg1}}][contains(@style,'text-align: {{arg2}};')]" parameterized="true"/>
6365
<element name="noAlignment" type="text" selector="(//div[@data-role='text'])[{{arg1}}][not(contains(@style,'text-align:'))]" parameterized="true"/>

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@
445445
<testCaseId value="MC-3463"/>
446446
<group value="pagebuilder"/>
447447
<group value="pagebuilder-text"/>
448+
<group value="ira"/>
448449
</annotations>
449450
<before>
450451
<createData entity="_defaultCmsPage" stepKey="createCMSPage" />
@@ -498,21 +499,21 @@
498499
<!--Verify FontStyle on preview-->
499500
<comment userInput="Verify FontStyle on preview" stepKey="commentVerifyFontsizeOnPreview"/>
500501
<click selector="{{TextOnStage.tinymce('1')}}" stepKey="focusOnEditorArea"/>
501-
<fillField selector="{{TextOnStage.tinymce('1')}}" userInput="{{PageBuilderTextContentTypeDefault.value}}" stepKey="fillTextToTinyMCE4"/>
502+
<fillField selector="{{TextOnStage.tinymce('1')}}" userInput="{{PageBuilderTextProperty.value}}" stepKey="fillTextToTinyMCE4"/>
502503
<click selector="{{WYSIWYGOnPageBuilder.formatSelector}}" stepKey="expandFormatList"/>
503504
<see userInput="Important" stepKey="seeImportantStyle"/>
504505
<click selector="{{TextOnStage.importantStyle('1')}}" stepKey="selectFormatStyle" />
505-
<seeElement selector="{{TextOnStage.textInImportantStyle('1',PageBuilderTextContentTypeDefault.value)}}" stepKey="seeTextInImportantStyleOnPreview1" />
506+
<seeElement selector="{{TextOnStage.textInImportantStyle('1',PageBuilderTextProperty.value)}}" stepKey="seeTextInImportantStyleOnPreview1" />
506507
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage2"/>
507508
<!--Verify FontStyle on stage-->
508509
<comment userInput="Verify FontStyle on stage" stepKey="commentVerifyFontStyleOnStage"/>
509510
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage2"/>
510-
<seeElement selector="{{TextOnStage.textInImportantStyle('1',PageBuilderTextContentTypeDefault.value)}}" stepKey="seeTextInImportantStyleOnPreview2" />
511+
<seeElement selector="{{TextOnStage.textInImportantStyle('1',PageBuilderTextProperty.value)}}" stepKey="seeTextInImportantStyleOnPreview2" />
511512
<!--Verify FontStyle on Storeview-->
512513
<comment userInput="Verify FontStyle on Storeview" stepKey="commentVerifyFontStyleOnStoreview"/>
513514
<amOnPage url="$$createCMSPage.identifier$$" stepKey="amOnPageTestPage2"/>
514515
<waitForPageLoad stepKey="waitForPageLoad3"/>
515-
<seeElement selector="{{TextOnStage.textInImportantStyle('1',PageBuilderTextContentTypeDefault.value)}}" stepKey="seeTextInImportantStyleOnStorefront" />
516+
<seeElement selector="{{TextOnStorefront.textInImportantStyle(PageBuilderTextProperty.value)}}" stepKey="seeTextInImportantStyleOnStorefront" />
516517
</test>
517518
<test name="TextAddTextWithCustomTinyMCE">
518519
<annotations>
@@ -523,6 +524,7 @@
523524
<severity value="CRITICAL"/>
524525
<useCaseId value="MC-1412"/>
525526
<testCaseId value="MAGETWO-90274"/>
527+
<!--<group value="ira"/>-->
526528
<group value="pagebuilder"/>
527529
<group value="pagebuilder-text"/>
528530
</annotations>
@@ -582,13 +584,14 @@
582584
<see userInput="Important" stepKey="seeImportantStyle"/>
583585
<click selector="//span[text()='Important']" stepKey="selectFormatStyle" />
584586
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
585-
<seeElement selector="//div/div[contains(normalize-space(@class), 'cms-content-important') and text()='{{PageBuilderTextContentTypeDefault.value}}']" stepKey="seeTextInImportantStyleOnPreview" />
587+
<seeElement selector="{{TextOnStage.emptyTextInImportantStyle('1')}}" stepKey="seeTextInImportantStyleOnPreview" />
588+
<grabValueFrom selector="{{TextOnStage.emptyTextInImportantStyle('1')}}" stepKey="grabTextFromEditor"/>
589+
<assertEmpty stepKey="assertTextIsEmpty" actual="grabTextFromEditor" actualType="variable"/>
586590
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage2"/>
587-
588591
<!--Verify FontStyle on Storeview-->
589592
<amOnPage url="$$createCMSPage.identifier$$" stepKey="amOnPageTestPage2"/>
590593
<waitForPageLoad stepKey="waitForPageLoad3"/>
591-
<seeElement selector="//div[contains(normalize-space(@class), 'cms-content-important') and text()='{{PageBuilderTextContentTypeDefault.value}}']" stepKey="seeTextInImportantStyleOnStorefront" />
594+
<seeElement selector="//div[contains(normalize-space(@class), 'cms-content-important') and not(text())]" stepKey="seeTextInImportantStyleOnStorefront" />
592595
</test>
593596
<test name="TextAddTextWithTinyMCE">
594597
<annotations>

0 commit comments

Comments
 (0)