|
76 | 76 | <waitForPageLoad stepKey="waitForPageLoadProductPage"/>
|
77 | 77 | <actionGroup ref="verifyFullWidthLayout" stepKey="verifyFullWidthLayout"/>
|
78 | 78 | </test>
|
| 79 | + <test name="AdminCreateProductWithPageBuilderDescriptionAndInvalidLayoutTest"> |
| 80 | + <annotations> |
| 81 | + <features value="PageBuilder"/> |
| 82 | + <stories value="Page Layout"/> |
| 83 | + <title value="Product description should display in full width"/> |
| 84 | + <description value="Product description should display in full width"/> |
| 85 | + <severity value="MAJOR"/> |
| 86 | + <useCaseId value="MC-936"/> |
| 87 | + <testCaseId value="MC-309"/> |
| 88 | + <group value="pagebuilder"/> |
| 89 | + <group value="pagebuilder-fullwidth"/> |
| 90 | + </annotations> |
| 91 | + <before> |
| 92 | + <createData entity="_defaultCategory" stepKey="createPreReqCategory"/> |
| 93 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 94 | + <actionGroup ref="FillAdminSimpleProductForm" stepKey="fillProductFieldsInAdmin"> |
| 95 | + <argument name="category" value="$$createPreReqCategory$$"/> |
| 96 | + <argument name="simpleProduct" value="_defaultProduct"/> |
| 97 | + </actionGroup> |
| 98 | + </before> |
| 99 | + <after> |
| 100 | + <actionGroup ref="logout" stepKey="logout"/> |
| 101 | + <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> |
| 102 | + </after> |
| 103 | + <!-- Add PageBuilder description --> |
| 104 | + <comment userInput="Add PageBuilder description" stepKey="commentAddDescription"/> |
| 105 | + <click selector="{{AdminProductContentSection.sectionHeader}}" stepKey="openContentSection"/> |
| 106 | + <waitForPageLoad stepKey="waitForPageLoadContentSection"/> |
| 107 | + <waitForElementVisible selector="{{PageBuilderCatalog.openPageBuilder}}" stepKey="waitForPageBuilderBtn" /> |
| 108 | + <see userInput="Edit with Page Builder" stepKey="seePageBuilderBtn"/> |
| 109 | + <click selector="{{PageBuilderCatalog.openPageBuilder}}" stepKey="clickOnPageBuilderBtn" /> |
| 110 | + <waitForPageLoad stepKey="waitForPageLoadPageBuilder"/> |
| 111 | + <waitForElementVisible selector="{{PageBuilderPanel.generalGroup}}" stepKey="waiForPageBuilderVisible" /> |
| 112 | + <seeElement selector="{{PageBuilderStage.stageWrapperFullScreen}}" stepKey="seePageBuilderFullSizeScreen" /> |
| 113 | + <!-- Set background color of row --> |
| 114 | + <comment userInput="Set background color of row" stepKey="commentSetRowBackgroundColor"/> |
| 115 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage"> |
| 116 | + <argument name="contentType" value="PageBuilderRowContentType"/> |
| 117 | + </actionGroup> |
| 118 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBackgroundColor"> |
| 119 | + <argument name="property" value="PageBuilderBackgroundColor_HSV_Orange"/> |
| 120 | + </actionGroup> |
| 121 | + <actionGroup ref="saveEditPanelSettingsFullScreen" stepKey="saveEditPanelSettings"/> |
| 122 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragHeadingOntoStage"> |
| 123 | + <argument name="contentType" value="PageBuilderHeadingContentType"/> |
| 124 | + </actionGroup> |
| 125 | + <!-- Add heading to stage --> |
| 126 | + <comment userInput="Add heading to stage" stepKey="commentAddHeadingToStage"/> |
| 127 | + <actionGroup ref="enterHeadingOnStage" stepKey="enterHeadingOnStage"> |
| 128 | + <argument name="headingText" value="PageBuilderHeadingTextProperty"/> |
| 129 | + </actionGroup> |
| 130 | + <click selector="{{PageBuilderStage.exitFullScreen}}" stepKey="exitPageBuilderFullScreen" /> |
| 131 | + <waitForPageLoad stepKey="waitForPageLoadExitFullScreen"/> |
| 132 | + <!-- Use Category Full Width layout --> |
| 133 | + <comment userInput="Set Layout to Category - Full Width" stepKey="commentSetLayout"/> |
| 134 | + <actionGroup ref="setLayout" stepKey="setCategoryFullWidthLayout"> |
| 135 | + <argument name="designSection" value="ProductDesignSection"/> |
| 136 | + <argument name="layoutOption" value="PageBuilderFullWidthLayout.category"/> |
| 137 | + </actionGroup> |
| 138 | + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct"/> |
| 139 | + <waitForPageLoad stepKey="waitForPageLoadSaveProduct"/> |
| 140 | + <waitForElementVisible selector="{{AdminProductMessagesSection.successMessage}}" stepKey="assertSaveMessageSuccess"/> |
| 141 | + <!-- Check that content is displayed on storefront --> |
| 142 | + <comment userInput="Check that content is displayed on storefront" stepKey="commentSeeContent"/> |
| 143 | + <amOnPage url="{{_defaultProduct.urlKey}}.html" stepKey="navigateToProductPage"/> |
| 144 | + <waitForPageLoad stepKey="waitForPageLoadProductPage"/> |
| 145 | + <waitForElementVisible selector="{{HeadingOnStorefront.headingText(PageBuilderHeadingTypeProperty_H2.value, PageBuilderHeadingTextProperty.value, '1')}}" stepKey="waitForStorefrontHeadingText"/> |
| 146 | + <seeElement selector="{{HeadingOnStorefront.headingText(PageBuilderHeadingTypeProperty_H2.value, PageBuilderHeadingTextProperty.value, '1')}}" stepKey="seeStorefrontHeadingText"/> |
| 147 | + <!-- Edit product in admin panel --> |
| 148 | + <comment userInput="Edit product in admin panel" stepKey="commentEditProduct"/> |
| 149 | + <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForProduct"> |
| 150 | + <argument name="product" value="$$createSimpleProduct$$"/> |
| 151 | + </actionGroup> |
| 152 | + <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct"> |
| 153 | + <argument name="product" value="_defaultProduct"/> |
| 154 | + </actionGroup> |
| 155 | + <!-- Use Page Full Width layout --> |
| 156 | + <comment userInput="Set Layout to Page - Full Width" stepKey="commentSetLayout2"/> |
| 157 | + <actionGroup ref="setLayout" stepKey="setPageFullWidthLayout"> |
| 158 | + <argument name="designSection" value="ProductDesignSection"/> |
| 159 | + <argument name="layoutOption" value="PageBuilderFullWidthLayout.cms"/> |
| 160 | + </actionGroup> |
| 161 | + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct2"/> |
| 162 | + <waitForPageLoad stepKey="waitForPageLoadSaveProduct2"/> |
| 163 | + <waitForElementVisible selector="{{AdminProductMessagesSection.successMessage}}" stepKey="assertSaveMessageSuccess2"/> |
| 164 | + <!-- Check that content is displayed on storefront --> |
| 165 | + <comment userInput="Check that content is displayed on storefront" stepKey="commentSeeContent2"/> |
| 166 | + <amOnPage url="{{_defaultProduct.urlKey}}.html" stepKey="navigateToProductPage2"/> |
| 167 | + <waitForPageLoad stepKey="waitForPageLoadProductPage2"/> |
| 168 | + <waitForElementVisible selector="{{HeadingOnStorefront.headingText(PageBuilderHeadingTypeProperty_H2.value, PageBuilderHeadingTextProperty.value, '1')}}" stepKey="waitForStorefrontHeadingText2"/> |
| 169 | + <seeElement selector="{{HeadingOnStorefront.headingText(PageBuilderHeadingTypeProperty_H2.value, PageBuilderHeadingTextProperty.value, '1')}}" stepKey="seeStorefrontHeadingText2"/> |
| 170 | + </test> |
79 | 171 | </tests>
|
0 commit comments