Skip to content

Commit 94d29e7

Browse files
committed
MC-3333: Automate MFTF for MC-1405
1 parent 0bbfa14 commit 94d29e7

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

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

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,4 +817,76 @@
817817
<seeElement selector="{{TabOnStorefront.tabContentBackgroundColor('1', PageBuilderTabBackgroundColorPink.rgb)}}" stepKey="seeTab1BackgroundColor"/>
818818
<see userInput="$$createPreReqBlock.content$$" stepKey="seeBlockContentOnCmsStage1"/>
819819
</test>
820+
<test name="AddBlockWithEmptyImageToCmsPage">
821+
<annotations>
822+
<features value="PageBuilder"/>
823+
<stories value="Block"/>
824+
<title value="Add Block with Empty Image to CMS Page"/>
825+
<description value="Verify that admin are able to add a block instance type with tab content to Block Content Block and see it on frontend"/>
826+
<severity value="CRITICAL"/>
827+
<testCaseId value="MC-3740"/>
828+
<useCaseId value="MC-1405"/>
829+
<group value="pagebuilder"/>
830+
<group value="pagebuilder-block"/>
831+
</annotations>
832+
<before>
833+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
834+
<createData entity="_defaultCmsPage" stepKey="createCMSPage"/>
835+
<createData entity="_defaultBlock" stepKey="createPreReqBlock"/>
836+
</before>
837+
<after>
838+
<deleteData createDataKey="createPreReqBlock" stepKey="deletePreReqBlock"/>
839+
<deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage"/>
840+
<actionGroup ref="logout" stepKey="logout"/>
841+
</after>
842+
<!--Add Image to block-->
843+
<comment userInput="Adding image to block" stepKey="commentAddingImageToBlock"/>
844+
<actionGroup ref="navigateToCreatedCMSBlockPage" stepKey="navigateToCreatedCMSBlockPage1">
845+
<argument name="CMSBlockPage" value="$$createPreReqBlock$$"/>
846+
</actionGroup>
847+
<comment userInput="Add Image to Stage" stepKey="addImageToStage"/>
848+
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup">
849+
<argument name="group" value="PageBuilderImageContentType"/>
850+
</actionGroup>
851+
<actionGroup ref="dragContentTypeToStage" stepKey="dragImageIntoStage">
852+
<argument name="contentType" value="PageBuilderImageContentType"/>
853+
</actionGroup>
854+
<click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="clickSaveBlock"/>
855+
<waitForPageLoad stepKey="waitForPageToLoad"/>
856+
<!--User goes to created CMS page-->
857+
<comment userInput="User goes to created CMS page" stepKey="NavigateToCMSPage"/>
858+
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage">
859+
<argument name="CMSPage" value="$$createCMSPage$$"/>
860+
</actionGroup>
861+
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandGroupAddContent">
862+
<argument name="group" value="PageBuilderBlockContentType"/>
863+
</actionGroup>
864+
<actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage">
865+
<argument name="contentType" value="PageBuilderBlockContentType"/>
866+
</actionGroup>
867+
<waitForElementVisible selector="{{BlockOnForm.title('Not Selected')}}" stepKey="seeNotSelectedBlock"/>
868+
<actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid">
869+
<argument name="block" value="$$createPreReqBlock$$"/>
870+
</actionGroup>
871+
<waitForElementVisible selector="{{BlockOnForm.title('$$createPreReqBlock.title$$')}}" stepKey="waitToSeeBlockTitle"/>
872+
<seeElement selector="{{BlockOnForm.title('$$createPreReqBlock.title$$')}}" stepKey="seeBlockTitleOnForm"/>
873+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings2"/>
874+
<!--Check that image was not rendered on the stage-->
875+
<comment userInput="Check that image was not rendered on the stage" stepKey="commentCheckingThatImageIsNotRenderedOnTheStage"/>
876+
<executeJS function="return jQuery('.pagebuilder-block').css('height');" stepKey="height"/>
877+
<assertGreaterThanOrEqual stepKey="assertElementHight">
878+
<actualResult type="variable">height</actualResult>
879+
<expectedResult type="string">10px</expectedResult>
880+
</assertGreaterThanOrEqual>
881+
<dontSeeElement selector="{{ImageOnStorefront.imageDisplay}}" stepKey="notSeeImageOnStage"/>
882+
<actionGroup ref="openOptionsMenu" stepKey="openEditMenuOnStage3">
883+
<argument name="contentType" value="PageBuilderBlockContentType"/>
884+
</actionGroup>
885+
<seeElement selector="{{BlockOnStage.overlay}}" stepKey="seeOverlayOnBlock"/>
886+
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
887+
<amOnPage url="$$createCMSPage.identifier$$" stepKey="amOnPageTestPage"/>
888+
<!--Verify block on the frontend-->
889+
<comment userInput="Verify Block On Store front" stepKey="commentCheckingThatImageIsNotRenderedOnTheStoreFront"/>
890+
<dontSeeElement selector="{{ImageOnStorefront.imageDisplay}}" stepKey="notSeeImageOnFrontend"/>
891+
</test>
820892
</tests>

0 commit comments

Comments
 (0)