|
817 | 817 | <seeElement selector="{{TabOnStorefront.tabContentBackgroundColor('1', PageBuilderTabBackgroundColorPink.rgb)}}" stepKey="seeTab1BackgroundColor"/>
|
818 | 818 | <see userInput="$$createPreReqBlock.content$$" stepKey="seeBlockContentOnCmsStage1"/>
|
819 | 819 | </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> |
820 | 892 | </tests>
|
0 commit comments