|
| 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="PageBuilderCategoryAddAndEditRowColumnSlide"> |
| 12 | + <annotations> |
| 13 | + <features value="PageBuilder"/> |
| 14 | + <stories value="Catalog Category"/> |
| 15 | + <title value="Add and Edit Row, Column, and Slider to PageBuilder in Catalog Category Description"/> |
| 16 | + <description value="This test is intended to ensure that basic adding and editing of multiple content types work correctly in the Catalog Category area of PageBuilder."/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <useCaseId value="MC-3330"/> |
| 19 | + <testCaseId value="MC-13959"/> |
| 20 | + <group value="pagebuilder"/> |
| 21 | + <group value="pagebuilder-row"/> |
| 22 | + <group value="pagebuilder-column"/> |
| 23 | + <group value="pagebuilder-slide"/> |
| 24 | + <group value="pagebuilder-catalog-category"/> |
| 25 | + </annotations> |
| 26 | + <before> |
| 27 | + <createData entity="_defaultCategory" stepKey="createPreReqCategory"/> |
| 28 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 29 | + <actionGroup ref="navigateToCreatedCategory" stepKey="navigateToCreatedCategory"> |
| 30 | + <argument name="Category" value="$$createPreReqCategory$$"/> |
| 31 | + </actionGroup> |
| 32 | + <conditionalClick selector="{{AdminCategoryContentSection.sectionHeader}}" dependentSelector="{{AdminCategoryContentSection.uploadButton}}" visible="false" stepKey="openContentSection"/> |
| 33 | + <actionGroup ref="openPageBuilderForAttribute" stepKey="openPageBuilderForDescription"/> |
| 34 | + </before> |
| 35 | + <after> |
| 36 | + <deleteData createDataKey="createPreReqCategory" stepKey="deleteCreatedCategory"/> |
| 37 | + <actionGroup ref="logout" stepKey="logout"/> |
| 38 | + </after> |
| 39 | + <!-- Add 2nd Row --> |
| 40 | + <comment userInput="Add 2nd Row" stepKey="commentAddRow"/> |
| 41 | + <actionGroup ref="dragContentTypeToDropZone" stepKey="dragRowToStage"> |
| 42 | + <argument name="contentType" value="PageBuilderRowContentType"/> |
| 43 | + <argument name="contentTypeIndex" value="2"/> |
| 44 | + <argument name="containerTargetType" value="PageBuilderStage"/> |
| 45 | + <argument name="dropZoneIndex" value="2"/> |
| 46 | + </actionGroup> |
| 47 | + <!-- Edit 2nd Row --> |
| 48 | + <comment userInput="Edit 2nd Row" stepKey="commentEditRow"/> |
| 49 | + <actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuForRow2"> |
| 50 | + <argument name="contentType" value="PageBuilderRowContentType"/> |
| 51 | + <argument name="contentTypeIndex" value="2"/> |
| 52 | + </actionGroup> |
| 53 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBackgroundColorRow"> |
| 54 | + <argument name="property" value="PageBuilderBackgroundColor_Hex_Grey"/> |
| 55 | + </actionGroup> |
| 56 | + <actionGroup ref="saveEditPanelSettingsFullScreen" stepKey="saveEditFormForRow"/> |
| 57 | + <!-- Add Column to 2nd Row --> |
| 58 | + <comment userInput="Add Column to 2nd Row" stepKey="commentAddColumn"/> |
| 59 | + <actionGroup ref="dragContentTypeToContainer" stepKey="dragColumnToRow2"> |
| 60 | + <argument name="contentType" value="PageBuilderColumnContentType"/> |
| 61 | + <argument name="contentTypeIndex" value="1"/> |
| 62 | + <argument name="containerTargetType" value="PageBuilderRowContentType"/> |
| 63 | + <argument name="containerTargetIndex" value="2"/> |
| 64 | + </actionGroup> |
| 65 | + <!-- Edit Column --> |
| 66 | + <comment userInput="Edit Column" stepKey="commentEditColumn"/> |
| 67 | + <actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditMenuForColumn2"> |
| 68 | + <argument name="contentType" value="PageBuilderColumnContentType"/> |
| 69 | + <argument name="contentTypeIndex" value="2"/> |
| 70 | + </actionGroup> |
| 71 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBackgroundColorColumn"> |
| 72 | + <argument name="property" value="PageBuilderBackgroundColor_Hex_White"/> |
| 73 | + </actionGroup> |
| 74 | + <actionGroup ref="saveEditPanelSettingsFullScreen" stepKey="saveEditFormForColumn"/> |
| 75 | + <!-- Add Slider to 2nd Column --> |
| 76 | + <comment userInput="Add Slider to 2nd Column" stepKey="commentAddSlider"/> |
| 77 | + <actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup"> |
| 78 | + <argument name="group" value="PageBuilderSliderContentType"/> |
| 79 | + </actionGroup> |
| 80 | + <actionGroup ref="dragContentTypeToContainer" stepKey="dragSliderToColumn2"> |
| 81 | + <argument name="contentType" value="PageBuilderSliderContentType"/> |
| 82 | + <argument name="contentTypeIndex" value="1"/> |
| 83 | + <argument name="containerTargetType" value="PageBuilderColumnContentType"/> |
| 84 | + <argument name="containerTargetIndex" value="2"/> |
| 85 | + </actionGroup> |
| 86 | + <!-- Edit Slide Item --> |
| 87 | + <comment userInput="Edit Slide Item" stepKey="commentEditSlide"/> |
| 88 | + <actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditMenuForSlide"> |
| 89 | + <argument name="section" value="SlideOnBackend"/> |
| 90 | + </actionGroup> |
| 91 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBackgroundColorSlide1"> |
| 92 | + <argument name="property" value="PageBuilderBackgroundColor_Plaintext_Green"/> |
| 93 | + </actionGroup> |
| 94 | + <actionGroup ref="saveEditPanelSettingsFullScreen" stepKey="saveEditFormForSlide"/> |
| 95 | + <!-- Add Slide 2 --> |
| 96 | + <comment userInput="Add Slide 2" stepKey="commentAddSlide"/> |
| 97 | + <actionGroup ref="addChildContentTypeFromOptionMenu" stepKey="add2ndSlide"> |
| 98 | + <argument name="contentType" value="PageBuilderSliderContentType"/> |
| 99 | + </actionGroup> |
| 100 | + <!-- Edit Slide 2 --> |
| 101 | + <comment userInput="Edit Slide 2" stepKey="commentEditSlide2"/> |
| 102 | + <actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditMenuForSlide2"> |
| 103 | + <argument name="section" value="SlideOnBackend"/> |
| 104 | + <argument name="targetIndex" value="2"/> |
| 105 | + </actionGroup> |
| 106 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBackgroundColorSlide2"> |
| 107 | + <argument name="property" value="PageBuilderBackgroundColor_RGB_Blue"/> |
| 108 | + </actionGroup> |
| 109 | + <actionGroup ref="saveEditPanelSettingsFullScreen" stepKey="saveEditFormForSlide2"/> |
| 110 | + <!-- Validate Stage --> |
| 111 | + <comment userInput="Validate Stage" stepKey="commentValidateStage"/> |
| 112 | + <seeNumberOfElements selector="{{RowOnStage.allRows}}" userInput="2" stepKey="see2RowsStage"/> |
| 113 | + <seeElement selector="{{RowOnStage.backgroundColor('2', PageBuilderBackgroundColor_Hex_Grey.rgb)}}" stepKey="seeBackgroundColorRowStage"/> |
| 114 | + <seeNumberOfElements selector="{{ColumnOnBackend.allColumns}}" userInput="2" stepKey="see2ColumnsStage"/> |
| 115 | + <seeElement selector="{{ColumnOnBackend.backgroundColor('2', PageBuilderBackgroundColor_Hex_White.rgb)}}" stepKey="seeBackgroundColorColumnStage"/> |
| 116 | + <seeElement selector="{{SlideOnBackend.backgroundColor('2', PageBuilderBackgroundColor_RGB_Blue.rgb)}}" stepKey="seeBackgroundColorSlide2Stage"/> |
| 117 | + <actionGroup ref="switchSlide" stepKey="switchSlideStage"> |
| 118 | + <argument name="slideIndex" value="1"/> |
| 119 | + </actionGroup> |
| 120 | + <seeElement selector="{{SlideOnBackend.backgroundColor('1', PageBuilderBackgroundColor_Plaintext_Green.rgb)}}" stepKey="seeBackgroundColorSlide1Stage"/> |
| 121 | + <!-- Save Category --> |
| 122 | + <comment userInput="Save Category" stepKey="commentSaveCategory"/> |
| 123 | + <actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen"/> |
| 124 | + <actionGroup ref="saveCategoryForm" stepKey="saveCategory"/> |
| 125 | + <waitForPageLoad stepKey="waitForPageLoadSaveCategory"/> |
| 126 | + <conditionalClick selector="{{AdminCategoryContentSection.sectionHeader}}" dependentSelector="{{AdminCategoryContentSection.uploadButton}}" visible="false" stepKey="openContentSectionAgain"/> |
| 127 | + <actionGroup ref="openPageBuilderForAttribute" stepKey="openPageBuilderForDescription"/> |
| 128 | + <!-- Validate Stage After Save --> |
| 129 | + <comment userInput="Validate Stage After Save" stepKey="commentValidateStageAfterSave"/> |
| 130 | + <seeNumberOfElements selector="{{RowOnStage.allRows}}" userInput="2" stepKey="see2RowsStageAfterSave"/> |
| 131 | + <seeElement selector="{{RowOnStage.backgroundColor('2', PageBuilderBackgroundColor_Hex_Grey.rgb)}}" stepKey="seeBackgroundColorRowStageAfterSave"/> |
| 132 | + <seeNumberOfElements selector="{{ColumnOnBackend.allColumns}}" userInput="2" stepKey="see2ColumnsStageAfterSave"/> |
| 133 | + <seeElement selector="{{ColumnOnBackend.backgroundColor('2', PageBuilderBackgroundColor_Hex_White.rgb)}}" stepKey="seeBackgroundColorColumnStageAfterSave"/> |
| 134 | + <seeElement selector="{{SlideOnBackend.backgroundColor('1', PageBuilderBackgroundColor_Plaintext_Green.rgb)}}" stepKey="seeBackgroundColorSlide1StageAfterSave"/> |
| 135 | + <actionGroup ref="switchSlide" stepKey="switchSlideStageAfterSave"> |
| 136 | + <argument name="slideIndex" value="2"/> |
| 137 | + </actionGroup> |
| 138 | + <seeElement selector="{{SlideOnBackend.backgroundColor('2', PageBuilderBackgroundColor_RGB_Blue.rgb)}}" stepKey="seeBackgroundColorSlide2StageAfterSave"/> |
| 139 | + <!-- Validate Storefront --> |
| 140 | + <comment userInput="Validate Storefront" stepKey="commentValidateStorefront"/> |
| 141 | + <amOnPage url="$$createPreReqCategory.name$$.html" stepKey="navigateToCategoryPage"/> |
| 142 | + <scrollTo selector="//div[@class='category-description']" stepKey="scrollToCategoryDescription"/> |
| 143 | + <seeNumberOfElements selector="{{RowOnStorefront.allRows}}" userInput="2" stepKey="see2RowsStorefront"/> |
| 144 | + <seeElement selector="{{RowOnStorefront.backgroundColor('2', PageBuilderBackgroundColor_Hex_Grey.rgb)}}" stepKey="seeBackgroundColorRowStorefront"/> |
| 145 | + <seeNumberOfElements selector="{{ColumnOnFrontend.allColumns}}" userInput="2" stepKey="see2ColumnsStorefront"/> |
| 146 | + <seeElement selector="{{ColumnOnFrontend.backgroundColor('2', PageBuilderBackgroundColor_Hex_White.rgb)}}" stepKey="seeBackgroundColorColumnStorefront"/> |
| 147 | + <seeElement selector="{{SlideOnFrontend.backgroundColor('2', PageBuilderBackgroundColor_Plaintext_Green.rgb)}}" stepKey="seeBackgroundColorSlide1Storefront"/> |
| 148 | + <actionGroup ref="switchSlide" stepKey="switchSlideStorefront"> |
| 149 | + <argument name="sliderSection" value="SliderOnFrontend"/> |
| 150 | + <argument name="slideSection" value="SlideOnFrontend"/> |
| 151 | + <argument name="slideIndex" value="2"/> |
| 152 | + </actionGroup> |
| 153 | + <seeElement selector="{{SlideOnFrontend.backgroundColor('3', PageBuilderBackgroundColor_RGB_Blue.rgb)}}" stepKey="seeBackgroundColorSlide2Storefront"/> |
| 154 | + </test> |
| 155 | +</tests> |
0 commit comments