|
971 | 971 | <argument name="containerTargetIndex" value="1"/>
|
972 | 972 | </actionGroup>
|
973 | 973 | </test>
|
| 974 | + <test name="TabMaintainsDefaultMinimumHeightWithContent"> |
| 975 | + <annotations> |
| 976 | + <features value="PageBuilder"/> |
| 977 | + <stories value="Tabs"/> |
| 978 | + <title value="Tabs Content - Add Heading to Tabs container and verify minimum height on Admin and Storefront"/> |
| 979 | + <description value="As a Content Manager I want tab to be a container so that I can add any content inside the Tab, not only text"/> |
| 980 | + <severity value="MAJOR"/> |
| 981 | + <useCaseId value="MC-4112"/> |
| 982 | + <testCaseId value="MC-4209"/> |
| 983 | + <group value="pagebuilder"/> |
| 984 | + <group value="pagebuilder-tabs-content"/> |
| 985 | + </annotations> |
| 986 | + <before> |
| 987 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 988 | + <actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/> |
| 989 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> |
| 990 | + </before> |
| 991 | + <after> |
| 992 | + <actionGroup ref="logout" stepKey="logout"/> |
| 993 | + </after> |
| 994 | + <actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle"> |
| 995 | + <argument name="contentType" value="PageBuilderTabsContentType"/> |
| 996 | + </actionGroup> |
| 997 | + <!-- Add Tabs to Stage --> |
| 998 | + <comment userInput="Add Tabs to Stage" stepKey="addTabsToStage"/> |
| 999 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragTabsIntoStage"> |
| 1000 | + <argument name="contentType" value="PageBuilderTabsContentType"/> |
| 1001 | + </actionGroup> |
| 1002 | + <!-- Add Heading to Tab --> |
| 1003 | + <comment userInput="Add Heading to Tab" stepKey="addHeadingToTab"/> |
| 1004 | + <actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup"> |
| 1005 | + <argument name="group" value="PageBuilderHeadingContentType"/> |
| 1006 | + </actionGroup> |
| 1007 | + <actionGroup ref="dragContentTypeToContainer" stepKey="dragHeadingOntoTab"> |
| 1008 | + <argument name="contentType" value="PageBuilderHeadingContentType"/> |
| 1009 | + <argument name="containerTargetType" value="PageBuilderTabContentType"/> |
| 1010 | + <argument name="containerTargetIndex" value="1" /> |
| 1011 | + </actionGroup> |
| 1012 | + <actionGroup ref="enterHeadingOnStage" stepKey="enterHeadingOnStage"> |
| 1013 | + <argument name="index" value="1"/> |
| 1014 | + <argument name="headingText" value="PageBuilderHeadingTextProperty"/> |
| 1015 | + <argument name="headingType" value="PageBuilderHeadingTypeProperty_H1"/> |
| 1016 | + <argument name="headingAlignment" value="PageBuilderHeadingAlignmentProperty_center"/> |
| 1017 | + </actionGroup> |
| 1018 | + <actionGroup ref="clickOutsideLiveEditHeading" stepKey="clickOutsideLiveEditHeading"> |
| 1019 | + <argument name="index" value="1"/> |
| 1020 | + </actionGroup> |
| 1021 | + <!-- Add Button to Tab --> |
| 1022 | + <actionGroup ref="dragContentTypeToContainer" stepKey="dragButtonOntoTab"> |
| 1023 | + <argument name="contentType" value="PageBuilderButtonsContentType"/> |
| 1024 | + <argument name="containerTargetType" value="PageBuilderTabContentType"/> |
| 1025 | + <argument name="containerTargetIndex" value="1" /> |
| 1026 | + </actionGroup> |
| 1027 | + <!-- Verify Tab height on stage --> |
| 1028 | + <comment userInput="Verify Tab height on stage" stepKey="verifyTabOnStage"/> |
| 1029 | + <executeJS function="return {{TabOnStage.tabContentHeightJS('0')}}" stepKey="tabContentHeightStage"/> |
| 1030 | + <executeJS function="return {{PageBuilderTabMinimumHeightDefaultProperty.value}} + {{PageBuilderPaddingProperty40.paddingTop}} + {{PageBuilderPaddingProperty40.paddingBottom}}" stepKey="tabExpectedHeight"/> |
| 1031 | + <assertEquals stepKey="assertTabHeightStage"> |
| 1032 | + <expectedResult type="variable">tabExpectedHeight</expectedResult> |
| 1033 | + <actualResult type="variable">tabContentHeightStage</actualResult> |
| 1034 | + </assertEquals> |
| 1035 | + <actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/> |
| 1036 | + <!-- Verify Tab height on storefront --> |
| 1037 | + <comment userInput="Verify Tab height on storefront" stepKey="viewTabOnStorefront"/> |
| 1038 | + <actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront"> |
| 1039 | + <argument name="contentType" value="PageBuilderTabsContentType"/> |
| 1040 | + </actionGroup> |
| 1041 | + <waitForElementVisible selector="{{TabOnStorefront.tabContent('1')}}" stepKey="waitForTabContentVisible"/> |
| 1042 | + <executeJS function="return {{TabsOnFrontend.tabsContentHeightJS('0')}}" stepKey="tabContentHeightStorefront"/> |
| 1043 | + <assertEquals stepKey="assertTabHeightStorefrontEqualsStage"> |
| 1044 | + <expectedResult type="variable">tabContentHeightStage</expectedResult> |
| 1045 | + <actualResult type="variable">tabContentHeightStorefront</actualResult> |
| 1046 | + </assertEquals> |
| 1047 | + </test> |
974 | 1048 | </tests>
|
0 commit comments