Skip to content

Commit cfa777b

Browse files
committed
MC-2258: Automate MFTF
1 parent 854c0c2 commit cfa777b

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/ContentTypeBlockActionGroup.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,13 @@
1919
<click selector="{{BlockOnGrid.selectBtn(block.identifier)}}" stepKey="clickSelectBtn"/>
2020
<click selector="{{BlockOnGrid.addSelectedBtn}}" stepKey="clickAddSelected"/>
2121
</actionGroup>
22+
<actionGroup name="verifyBlockOnStage">
23+
<arguments>
24+
<argument name="contentType"/>
25+
<argument name="block"/>
26+
</arguments>
27+
<moveMouseOver selector="{{PageBuilderStage.contentTypeInStage(contentType.role)}}" x="10" y="0" stepKey="onMouseOverContentTypeStage"/>
28+
<see selector="{{PageBuilderContentTypeOptionsMenu.contentTypeOptionsMenu(contentType.role)}}" userInput="{{block.title}}" stepKey="seeOptionMenuTitle"/>
29+
<see userInput="{{block.content}}" stepKey="seeBlockContentOnStage"/>
30+
</actionGroup>
2231
</actionGroups>

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,23 @@
7878
<actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid">
7979
<argument name="block" value="$$createPreReqBlock$$"/>
8080
</actionGroup>
81-
<!--<seeElement selector="{{BlockOnStage.title('$$createPreReqBlock.title$$')}}" stepKey="seeBlockTitle"/>-->
81+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
82+
<seeElement selector="{{BlockOnStage.title('$$createPreReqBlock.title$$')}}" stepKey="seeBlockTitleOnForm"/>
8283
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
84+
<actionGroup ref="verifyBlockOnStage" stepKey="verifyBlockOnStage">
85+
<argument name="contentType" value="PageBuilderBlockContentType"/>
86+
<argument name="block" value="$$createPreReqBlock$$"/>
87+
</actionGroup>
8388
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
8489
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
85-
<waitForElementVisible selector="{{BlockOnStage.hr('1')}}" stepKey="waitForHrElementVisible" />
86-
<waitForElementVisible selector="{{BlockOnStage.identifier('1', PageBuilderBlockIdentifierProperty.value)}}" stepKey="waitForIdentifier" />
90+
<actionGroup ref="verifyBlockOnStage" stepKey="verifyBlockOnStageAfterSave">
91+
<argument name="contentType" value="PageBuilderBlockContentType"/>
92+
<argument name="block" value="$$createPreReqBlock$$"/>
93+
</actionGroup>
8794
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront">
8895
<argument name="contentType" value="PageBuilderBlockContentType"/>
8996
</actionGroup>
90-
<seeElement selector="{{BlockOnStorefront.hr('1')}}" stepKey="seeBlockContentFrontend"/>
97+
<see userInput="$$createPreReqBlock.content$$" stepKey="seeBlockContentOnStage"/>
9198
</test>
9299
<test name="BlockDelete">
93100
<annotations>

0 commit comments

Comments
 (0)