|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 6 | + */ |
| 7 | +--> |
| 8 | + |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="PageBuilderCMSPageVerifyPageFullWidthLayoutTest"> |
| 12 | + <annotations> |
| 13 | + <features value="PageBuilder"/> |
| 14 | + <stories value="CMS Page"/> |
| 15 | + <title value="Verify Page – Full Width Layout Width and Order of Contents"/> |
| 16 | + <description value="Verify page builder Full Width layout renders storefront contents correctly for CMS |
| 17 | + Pages. Verify correct width of page builder contents."/> |
| 18 | + <severity value="BLOCKER"/> |
| 19 | + <testCaseId value="MC-15482"/> |
| 20 | + <group value="pagebuilder"/> |
| 21 | + <group value="pagebuilder-layout"/> |
| 22 | + <group value="pagebuilder-cms-page"/> |
| 23 | + </annotations> |
| 24 | + |
| 25 | + <before> |
| 26 | + <!-- Create CMS Page --> |
| 27 | + <createData entity="_emptyCmsPage" stepKey="createCMSPage"/> |
| 28 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 29 | + </before> |
| 30 | + |
| 31 | + <after> |
| 32 | + <!-- Delete Data --> |
| 33 | + <resizeWindow width="1280" height="1024" stepKey="resizeWindowToDesktop"/> |
| 34 | + <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> |
| 35 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 36 | + </after> |
| 37 | + |
| 38 | + <!-- Add Row & Heading to CMS Page --> |
| 39 | + <actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToContentCreatedCMSPage1"> |
| 40 | + <argument name="CMSPage" value="$$createCMSPage$$"/> |
| 41 | + </actionGroup> |
| 42 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> |
| 43 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragRowToRootContainer"> |
| 44 | + <argument name="contentType" value="PageBuilderRowContentType"/> |
| 45 | + <argument name="containerTargetType" value="PageBuilderRootContainerContentType"/> |
| 46 | + </actionGroup> |
| 47 | + <actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuOnStage"> |
| 48 | + <argument name="contentType" value="PageBuilderRowContentType"/> |
| 49 | + </actionGroup> |
| 50 | + <actionGroup ref="chooseVisualSelectOption" stepKey="enterAppearance"> |
| 51 | + <argument name="property" value="PageBuilderRowAppearance_FullBleed"/> |
| 52 | + </actionGroup> |
| 53 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBackgroundColor"> |
| 54 | + <argument name="property" value="PageBuilderBackgroundColor_Sprout"/> |
| 55 | + </actionGroup> |
| 56 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/> |
| 57 | + <actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSection"> |
| 58 | + <argument name="contentType" value="PageBuilderHeadingContentType"/> |
| 59 | + </actionGroup> |
| 60 | + <actionGroup ref="dragContentTypeToContainer" stepKey="dragHeadingIntoStage"> |
| 61 | + <argument name="contentType" value="PageBuilderHeadingContentType"/> |
| 62 | + </actionGroup> |
| 63 | + <actionGroup ref="enterHeadingOnStage" stepKey="enterHeadingOnStage"> |
| 64 | + <argument name="headingText" value="PageBuilderHeadingText_PageContent"/> |
| 65 | + </actionGroup> |
| 66 | + <actionGroup ref="clickOutsideLiveEditHeading" stepKey="clickOutsideLiveEditHeading"> |
| 67 | + <argument name="index" value="1"/> |
| 68 | + </actionGroup> |
| 69 | + <actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen"/> |
| 70 | + |
| 71 | + <!-- Set Page - Full Width layout --> |
| 72 | + <actionGroup ref="SetLayoutActionGroup" stepKey="setPageFullWidthLayout"> |
| 73 | + <argument name="designSection" value="CmsDesignSection"/> |
| 74 | + <argument name="layoutOption" value="PageBuilderFullWidthLayout.cms"/> |
| 75 | + </actionGroup> |
| 76 | + |
| 77 | + <!-- Save CMS Page --> |
| 78 | + <actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage"/> |
| 79 | + |
| 80 | + <!-- Storefront 1600px: Verify Contents Visible --> |
| 81 | + <actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToCMSPageStorefront"> |
| 82 | + <argument name="page" value="$$createCMSPage.identifier$$"/> |
| 83 | + </actionGroup> |
| 84 | + <resizeWindow width="1600" height="1024" stepKey="resizeWindowWidth1"/> |
| 85 | + <waitForElementVisible selector="{{HeadingOnStorefront.headingText(PageBuilderHeadingTypeProperty_H2.value, PageBuilderHeadingText_PageContent.value, '1')}}" stepKey="waitForStorefrontHeadingText"/> |
| 86 | + |
| 87 | + <!-- Storefront 1600px: Assert Page Builder Contents Are Correct Width --> |
| 88 | + <executeJS function="return document.querySelector('[class=page-wrapper]').clientWidth" stepKey="pageWidth"/> |
| 89 | + <executeJS function="return document.querySelectorAll('{{RowOnStorefront.baseCSS}}')[0].clientWidth" stepKey="rowWidth"/> |
| 90 | + <executeJS function="return document.querySelectorAll("{{HeadingOnStorefront.all}}")[0].clientWidth" stepKey="headingWidth"/> |
| 91 | + <assertEquals stepKey="assertRowWidthEqualsWindowWidth"> |
| 92 | + <expectedResult type="variable">pageWidth</expectedResult> |
| 93 | + <actualResult type="variable">rowWidth</actualResult> |
| 94 | + </assertEquals> |
| 95 | + <assertEquals stepKey="assertHeadingWidthEqualsRowWidth"> |
| 96 | + <expectedResult type="variable">rowWidth</expectedResult> |
| 97 | + <actualResult type="variable">headingWidth</actualResult> |
| 98 | + </assertEquals> |
| 99 | + |
| 100 | + <!-- Storefront 767px: Verify Contents Visible --> |
| 101 | + <resizeWindow width="767" height="1000" stepKey="resizeWindowWidth2"/> |
| 102 | + <waitForElementVisible selector="{{HeadingOnStorefront.headingText(PageBuilderHeadingTypeProperty_H2.value, PageBuilderHeadingText_PageContent.value, '1')}}" stepKey="waitForStorefrontHeadingText2"/> |
| 103 | + |
| 104 | + <!-- Storefront 767px: Assert Page Builder Contents Are Correct Width --> |
| 105 | + <executeJS function="return document.querySelector('[class=page-wrapper]').clientWidth" stepKey="pageWidth2"/> |
| 106 | + <executeJS function="return document.querySelectorAll('{{RowOnStorefront.baseCSS}}')[0].clientWidth" stepKey="rowWidth2"/> |
| 107 | + <executeJS function="return document.querySelectorAll("{{HeadingOnStorefront.all}}")[0].clientWidth" stepKey="headingWidth2"/> |
| 108 | + <assertEquals stepKey="assertRowWidthEqualsWindowWidth2"> |
| 109 | + <expectedResult type="variable">pageWidth2</expectedResult> |
| 110 | + <actualResult type="variable">rowWidth2</actualResult> |
| 111 | + </assertEquals> |
| 112 | + <assertEquals stepKey="assertHeadingWidthEqualsRowWidth2"> |
| 113 | + <expectedResult type="variable">rowWidth2</expectedResult> |
| 114 | + <actualResult type="variable">headingWidth2</actualResult> |
| 115 | + </assertEquals> |
| 116 | + </test> |
| 117 | +</tests> |
0 commit comments