|
729 | 729 | <argument name="containerTargetIndex" value="2"/>
|
730 | 730 | </actionGroup>
|
731 | 731 | </test>
|
| 732 | + <test name="AddBlockWithTabToCmsPage"> |
| 733 | + <annotations> |
| 734 | + <features value="PageBuilder"/> |
| 735 | + <stories value="Block"/> |
| 736 | + <title value="Add Block with Tab to CMS Page"/> |
| 737 | + <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"/> |
| 738 | + <severity value="CRITICAL"/> |
| 739 | + <!--<testCaseId value="MC-2289"/>--> |
| 740 | + <useCaseId value="MC-1405"/> |
| 741 | + <group value="pagebuilder"/> |
| 742 | + <group value="pagebuilder-block"/> |
| 743 | + </annotations> |
| 744 | + <before> |
| 745 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 746 | + <createData entity="_defaultCmsPage" stepKey="createCMSPage" /> |
| 747 | + <createData entity="_defaultBlock" stepKey="createPreReqBlock" /> |
| 748 | + </before> |
| 749 | + <after> |
| 750 | + <deleteData createDataKey="createPreReqBlock" stepKey="deletePreReqBlock" /> |
| 751 | + <deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage" /> |
| 752 | + <actionGroup ref="logout" stepKey="logout"/> |
| 753 | + </after> |
| 754 | + <!--Add Tab to block--> |
| 755 | + <comment userInput="Adding Tab to block" stepKey="commentAddingTabToBlock"/> |
| 756 | + <actionGroup ref="navigateToCreatedCMSBlockPage" stepKey="navigateToCreatedCMSBlockPage1"> |
| 757 | + <argument name="CMSBlockPage" value="$$createPreReqBlock$$"/> |
| 758 | + </actionGroup> |
| 759 | + <!-- Add Tabs to Stage --> |
| 760 | + <comment userInput="Add Tabs to Stage" stepKey="addTabsToStage"/> |
| 761 | + <actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup"> |
| 762 | + <argument name="group" value="PageBuilderTabsContentType"/> |
| 763 | + </actionGroup> |
| 764 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragTabsIntoStage"> |
| 765 | + <argument name="contentType" value="PageBuilderTabsContentType"/> |
| 766 | + </actionGroup> |
| 767 | + <!-- Open Tabs Panel --> |
| 768 | + <comment userInput="User sees tabs displayed with 1st default tab item created by default" stepKey="AC1"/> |
| 769 | + <actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditPanel1"> |
| 770 | + <argument name="section" value="TabOnStage"/> |
| 771 | + </actionGroup> |
| 772 | + <comment userInput="User configures custom tab name, min height, color for first tab" stepKey="AC2"/> |
| 773 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterFirstTabName"> |
| 774 | + <argument name="property" value="PageBuilderTabNameRandom1"/> |
| 775 | + </actionGroup> |
| 776 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterFirstTabMinHeight"> |
| 777 | + <argument name="property" value="PageBuilderTabMinimumHeight200Property"/> |
| 778 | + </actionGroup> |
| 779 | + <comment userInput="I fill out color using Color Picker" stepKey="comment"/> |
| 780 | + <actionGroup ref="fillOutColorPicker" stepKey="fillOutColor"> |
| 781 | + <argument name="colorCode" value="PageBuilderTabBackgroundColorPink"/> |
| 782 | + </actionGroup> |
| 783 | + <actionGroup ref="seeInFieldSlideOutProperty" stepKey="seeHEXInField7"> |
| 784 | + <argument name="property" value="PageBuilderTabBackgroundColorPink"/> |
| 785 | + </actionGroup> |
| 786 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/> |
| 787 | + <comment userInput="User updates tab settings and saves configuration" stepKey="saveBlock"/> |
| 788 | + <click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="clickSaveBlock"/> |
| 789 | + <waitForPageLoad stepKey="waitForPageToLoad"/> |
| 790 | + <comment userInput="User goes to created CMS page" stepKey="NavigateToCMSPage"/> |
| 791 | + <actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage"> |
| 792 | + <argument name="CMSPage" value="$$createCMSPage$$"/> |
| 793 | + </actionGroup> |
| 794 | + <actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandGroupAddContent"> |
| 795 | + <argument name="group" value="PageBuilderBlockContentType"/> |
| 796 | + </actionGroup> |
| 797 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragBlockIntoStage"> |
| 798 | + <argument name="contentType" value="PageBuilderBlockContentType"/> |
| 799 | + </actionGroup> |
| 800 | + <waitForElementVisible selector="{{BlockOnForm.title('Not Selected')}}" stepKey="seeNotSelectedBlock"/> |
| 801 | + <actionGroup ref="searchBlockInGrid" stepKey="searchBlockInGrid"> |
| 802 | + <argument name="block" value="$$createPreReqBlock$$"/> |
| 803 | + </actionGroup> |
| 804 | + <waitForElementVisible selector="{{BlockOnForm.title('$$createPreReqBlock.title$$')}}" stepKey="waitToSeeBlockTitle"/> |
| 805 | + <seeElement selector="{{BlockOnForm.title('$$createPreReqBlock.title$$')}}" stepKey="seeBlockTitleOnForm"/> |
| 806 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings2"/> |
| 807 | + <comment userInput="Check that tab was rendered on the stage" stepKey="commentCheckingThatTabAreRenderedOnTHeStage"/> |
| 808 | + <see selector="{{TabOnStorefront.tabHeader('1')}}" userInput="{{PageBuilderTabNameRandom1.value}}" stepKey="seeTab1TitleStorefront2"/> |
| 809 | + <seeElement selector="{{TabOnStorefront.tabContentBackgroundColor('1', PageBuilderTabBackgroundColorPink.rgb)}}" stepKey="seeTab1BackgroundColor2"/> |
| 810 | + <actionGroup ref="openOptionsMenu" stepKey="openEditMenuOnStage3"> |
| 811 | + <argument name="contentType" value="PageBuilderBlockContentType"/> |
| 812 | + </actionGroup> |
| 813 | + <seeElement selector="{{BlockOnStage.overlay}}" stepKey="seeOverlsayOnBlock"/> |
| 814 | + <actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/> |
| 815 | + <amOnPage url="$$createCMSPage.identifier$$" stepKey="amOnPageTestPage"/> |
| 816 | + <see selector="{{TabOnStorefront.tabHeader('1')}}" userInput="{{PageBuilderTabNameRandom1.value}}" stepKey="seeTab1TitleStorefront"/> |
| 817 | + <seeElement selector="{{TabOnStorefront.tabContentBackgroundColor('1', PageBuilderTabBackgroundColorPink.rgb)}}" stepKey="seeTab1BackgroundColor"/> |
| 818 | + <see userInput="$$createPreReqBlock.content$$" stepKey="seeBlockContentOnCmsStage1"/> |
| 819 | + </test> |
732 | 820 | </tests>
|
0 commit comments