|
2609 | 2609 | <waitForElementVisible selector="{{TextOnConfiguration.textArea}}" stepKey="waitForTextOnEditPanel" before="enterText"/>
|
2610 | 2610 | <fillField selector="{{TextOnConfiguration.textArea}}" userInput="{{PageBuilderTextProperty.value}}" stepKey="enterText"/>
|
2611 | 2611 | </test>
|
| 2612 | + <test name="TextHeightConsistencyBetweenStageAndStorefront"> |
| 2613 | + <annotations> |
| 2614 | + <features value="PageBuilder"/> |
| 2615 | + <stories value="Text"/> |
| 2616 | + <title value="Height consistency PageBuilder stage and storefront"/> |
| 2617 | + <description value="Verify height consistent when switching between stage and storefront"/> |
| 2618 | + <severity value="AVERAGE"/> |
| 2619 | + <useCaseId value="MC-4254"/> |
| 2620 | + <testCaseId value="MC-6268"/> |
| 2621 | + <group value="pagebuilder"/> |
| 2622 | + <group value="pagebuilder-text"/> |
| 2623 | + </annotations> |
| 2624 | + <before> |
| 2625 | + <createData entity="_defaultCmsPage" stepKey="createCMSPage" /> |
| 2626 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 2627 | + </before> |
| 2628 | + <after> |
| 2629 | + <deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage" /> |
| 2630 | + <actionGroup ref="logout" stepKey="logout"/> |
| 2631 | + </after> |
| 2632 | + <actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage1"> |
| 2633 | + <argument name="CMSPage" value="$$createCMSPage$$"/> |
| 2634 | + </actionGroup> |
| 2635 | + <actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup1"> |
| 2636 | + <argument name="group" value="PageBuilderTextContentType"/> |
| 2637 | + </actionGroup> |
| 2638 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragButtonsOntoStage"> |
| 2639 | + <argument name="contentType" value="PageBuilderTextContentType"/> |
| 2640 | + </actionGroup> |
| 2641 | + <!--Input text into stage--> |
| 2642 | + <comment userInput="Input text into stage" stepKey="commentInputTextIntoStage"/> |
| 2643 | + <click selector="{{TextOnStage.tinymce('1')}}" stepKey="focusOnEditorArea"/> |
| 2644 | + <pressKey selector="{{TextOnStage.tinymce('1')}}" userInput="{{PageBuilderTextProperty.value}}" stepKey="fillTextToTinyMCE4"/> |
| 2645 | + <click selector="{{PageBuilderPanel.searchPanel}}" stepKey="lostFocusFromWYSIWYG1"/> |
| 2646 | + <executeJS function="return document.evaluate("{{TextOnStage.base('1'))}}", document.body).iterateNext().offsetHeight;" stepKey="getTextOnStageHeight"/> |
| 2647 | + <actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage2"/> |
| 2648 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage2"/> |
| 2649 | + <!--Get storefront information--> |
| 2650 | + <comment userInput="Get storefront information" stepKey="commentGetStorefrontInformation"/> |
| 2651 | + <amOnPage url="$$createCMSPage.identifier$$" stepKey="amOnPageTestPage"/> |
| 2652 | + <waitForPageLoad stepKey="waitForStorefront"/> |
| 2653 | + <waitForElement selector="{{TextOnStorefront.base('1')}}" stepKey="waitForTextOnStorefront"/> |
| 2654 | + <executeJS function="return document.evaluate("{{TextOnStorefront.base('1'))}}", document.body).iterateNext().offsetHeight;" stepKey="getTextOnStorefrontHeight"/> |
| 2655 | + <executeJS function="return Math.abs({$getTextOnStageHeight} - ${getTextOnStorefrontHeight}) <= 2" stepKey="getStageAndStorefrontHeightDifference"/> |
| 2656 | + <assertTrue stepKey="assertStageAndStorefrontHeightAreClose"> |
| 2657 | + <actualResult type="variable">getStageAndStorefrontHeightDifference</actualResult> |
| 2658 | + </assertTrue> |
| 2659 | + </test> |
2612 | 2660 | </tests>
|
0 commit comments