|
1094 | 1094 | <dontSeeElementInDOM selector="{{ProductsOnStorefront.hidden('1')}}" stepKey="dontSeeHiddenElement"/>
|
1095 | 1095 | <seeElement selector="{{ProductsOnStorefront.base('1')}}" stepKey="waitForContentTypeVisible" />
|
1096 | 1096 | </test>
|
| 1097 | + <test name="ProductsWrapsInsideTinyColumn"> |
| 1098 | + <annotations> |
| 1099 | + <features value="PageBuilder"/> |
| 1100 | + <stories value="Products"/> |
| 1101 | + <title value="Product Content Type wraps inside tiny column"/> |
| 1102 | + <description value="As a Content Manager I want products to be wrapped inside tiny column"/> |
| 1103 | + <severity value="CRITICAL"/> |
| 1104 | + <useCaseId value="MC-4096"/> |
| 1105 | + <testCaseId value="MC-4301"/> |
| 1106 | + <group value="pagebuilder"/> |
| 1107 | + <group value="pagebuilder-column"/> |
| 1108 | + <group value="pagebuilder-products"/> |
| 1109 | + <group value="pagebuilder-addToColumn"/> |
| 1110 | + </annotations> |
| 1111 | + <before> |
| 1112 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 1113 | + <createData entity="PageBuilderProductsSubCategory" stepKey="createPreReqCategory"/> |
| 1114 | + <createData entity="_defaultProduct" stepKey="createPreReqProduct1"> |
| 1115 | + <requiredEntity createDataKey="createPreReqCategory"/> |
| 1116 | + </createData> |
| 1117 | + <actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/> |
| 1118 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> |
| 1119 | + </before> |
| 1120 | + <after> |
| 1121 | + <deleteData createDataKey="createPreReqProduct1" stepKey="deletePreReqProduct1"/> |
| 1122 | + <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> |
| 1123 | + <actionGroup ref="logout" stepKey="logout"/> |
| 1124 | + </after> |
| 1125 | + <actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle"> |
| 1126 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1127 | + </actionGroup> |
| 1128 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragColumnIntoStage"> |
| 1129 | + <argument name="contentType" value="PageBuilderColumnContentType"/> |
| 1130 | + </actionGroup> |
| 1131 | + <!-- Drag new column onto column group to make 1/12 column --> |
| 1132 | + <comment userInput="Drag new column onto column group to make 1/12 column" stepKey="commentDragNewColumnToGroupMakeFirstColumnSmall"/> |
| 1133 | + <actionGroup ref="dragContentTypeToContainer" stepKey="dragColumnIntoFirstColumnGroup"> |
| 1134 | + <argument name="contentType" value="PageBuilderColumnContentType"/> |
| 1135 | + <argument name="contentTypeIndex" value="3"/> |
| 1136 | + <argument name="containerTargetType" value="PageBuilderColumnContentType"/> |
| 1137 | + <argument name="containerTargetIndex" value="1"/> |
| 1138 | + </actionGroup> |
| 1139 | + <!-- Add Products to Stage --> |
| 1140 | + <comment userInput="Add Products to Stage" stepKey="addProductsToStage"/> |
| 1141 | + <actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandGroupAddContent"> |
| 1142 | + <argument name="group" value="PageBuilderProductsContentType"/> |
| 1143 | + </actionGroup> |
| 1144 | + <actionGroup ref="dragContentTypeToContainer" stepKey="dragProductsOntoColumn"> |
| 1145 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1146 | + <argument name="containerTargetType" value="PageBuilderColumnContentType"/> |
| 1147 | + <argument name="containerTargetIndex" value="1" /> |
| 1148 | + </actionGroup> |
| 1149 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/> |
| 1150 | + <!-- Validate Stage --> |
| 1151 | + <comment userInput="User sees Products displayed in column on Stage" stepKey="confirmProductsOnStage"/> |
| 1152 | + <actionGroup ref="validateContentTypeInsideContainerStage" stepKey="checkContentTypeInContainerStage"> |
| 1153 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1154 | + <argument name="containerTargetType" value="PageBuilderColumnContentType"/> |
| 1155 | + <argument name="contentTypeIndex" value="1"/> |
| 1156 | + <argument name="containerTargetIndex" value="1"/> |
| 1157 | + </actionGroup> |
| 1158 | + <!-- Validating products is smaller than column --> |
| 1159 | + <comment userInput="Validating products is smaller than column" stepKey="commentValidatingProductsIsSmallerThanColumn"/> |
| 1160 | + <waitForElementVisible selector="{{ColumnOnBackend.displayLabel('1','1/12')}}" stepKey="validateFirstColumnWidth"/> |
| 1161 | + <executeJS function="return document.querySelectorAll('{{ColumnOnBackend.columnX('1')}}')[0].clientWidth" stepKey="firstColumnWidth"/> |
| 1162 | + <executeJS function="return document.querySelectorAll('{{ProductsOnStage.productImageCSS}}')[0].clientWidth" stepKey="productImageWidth"/> |
| 1163 | + <executeJS function="return document.querySelectorAll('{{ProductsOnStage.productPriceContainer}}')[0].clientWidth" stepKey="productPriceContainerWidth"/> |
| 1164 | + <executeJS function="return document.querySelectorAll('{{ProductsOnStage.productActions}}')[0].clientWidth" stepKey="productActionsWidth"/> |
| 1165 | + <assertGreaterThan stepKey="assertColumnIsWiderThanProductImage"> |
| 1166 | + <actualResult type="variable">firstColumnWidth</actualResult> |
| 1167 | + <expectedResult type="variable">productImageWidth</expectedResult> |
| 1168 | + </assertGreaterThan> |
| 1169 | + <assertGreaterThan stepKey="assertColumnIsWiderThanProductPriceContainer"> |
| 1170 | + <actualResult type="variable">firstColumnWidth</actualResult> |
| 1171 | + <expectedResult type="variable">productPriceContainerWidth</expectedResult> |
| 1172 | + </assertGreaterThan> |
| 1173 | + <assertGreaterThan stepKey="assertColumnIsWiderThanProductActions"> |
| 1174 | + <actualResult type="variable">firstColumnWidth</actualResult> |
| 1175 | + <expectedResult type="variable">productActionsWidth</expectedResult> |
| 1176 | + </assertGreaterThan> |
| 1177 | + <actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/> |
| 1178 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage2"/> |
| 1179 | + <!-- Validate Stage After Save --> |
| 1180 | + <comment userInput="Validate stage after save" stepKey="validateProductsOnStage"/> |
| 1181 | + <actionGroup ref="validateContentTypeInsideContainerStage" stepKey="checkContentTypeInContainerStage2"> |
| 1182 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1183 | + <argument name="containerTargetType" value="PageBuilderColumnContentType"/> |
| 1184 | + <argument name="contentTypeIndex" value="1"/> |
| 1185 | + <argument name="containerTargetIndex" value="1"/> |
| 1186 | + </actionGroup> |
| 1187 | + <!-- Validating products is smaller than column after save --> |
| 1188 | + <comment userInput="Validating products is smaller than column after save" stepKey="commentValidatingProductsIsSmallerThanColumnAfterSave"/> |
| 1189 | + <waitForElementVisible selector="{{ColumnOnBackend.displayLabel('1','1/12')}}" stepKey="validateFirstColumnWidthAfterSave"/> |
| 1190 | + <executeJS function="return document.querySelectorAll('{{ColumnOnBackend.columnX('1')}}')[0].clientWidth" stepKey="firstColumnWidthAfterSave"/> |
| 1191 | + <executeJS function="return document.querySelectorAll('{{ProductsOnStage.productImageCSS}}')[0].clientWidth" stepKey="productImageWidthAfterSave"/> |
| 1192 | + <executeJS function="return document.querySelectorAll('{{ProductsOnStage.productPriceContainer}}')[0].clientWidth" stepKey="productPriceContainerWidthAfterSave"/> |
| 1193 | + <executeJS function="return document.querySelectorAll('{{ProductsOnStage.productActions}}')[0].clientWidth" stepKey="productActionsWidthAfterSave"/> |
| 1194 | + <assertGreaterThan stepKey="assertColumnIsWiderThanProductImageAfterSave"> |
| 1195 | + <actualResult type="variable">firstColumnWidthAfterSave</actualResult> |
| 1196 | + <expectedResult type="variable">productImageWidthAfterSave</expectedResult> |
| 1197 | + </assertGreaterThan> |
| 1198 | + <assertGreaterThan stepKey="assertColumnIsWiderThanProductPriceContainerAfterSave"> |
| 1199 | + <actualResult type="variable">firstColumnWidthAfterSave</actualResult> |
| 1200 | + <expectedResult type="variable">productPriceContainerWidthAfterSave</expectedResult> |
| 1201 | + </assertGreaterThan> |
| 1202 | + <assertGreaterThan stepKey="assertColumnIsWiderThanProductActionsAfterSave"> |
| 1203 | + <actualResult type="variable">firstColumnWidthAfterSave</actualResult> |
| 1204 | + <expectedResult type="variable">productActionsWidthAfterSave</expectedResult> |
| 1205 | + </assertGreaterThan> |
| 1206 | + <!-- Validate Storefront --> |
| 1207 | + <comment userInput="View Products inside column on storefront" stepKey="viewProductsOnStorefront"/> |
| 1208 | + <actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront"> |
| 1209 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1210 | + </actionGroup> |
| 1211 | + <!-- Validating products is smaller than column Storefront --> |
| 1212 | + <comment userInput="Validating products is smaller than column storefront" stepKey="commentValidatingProductsIsSmallerThanColumnStoreFront"/> |
| 1213 | + <executeJS function="return document.querySelectorAll('{{ColumnOnFrontend.columnX('1')}}')[0].clientWidth" stepKey="firstColumnWidthFrontend"/> |
| 1214 | + <executeJS function="return document.querySelectorAll('{{ProductsOnStorefront.productImageCSS}}')[0].clientWidth" stepKey="productImageWidthFrontend"/> |
| 1215 | + <executeJS function="return document.querySelectorAll('{{ProductsOnStorefront.productPriceContainer}}')[0].clientWidth" stepKey="productPriceContainerWidthFrontend"/> |
| 1216 | + <executeJS function="return document.querySelectorAll('{{ProductsOnStorefront.productActions}}')[0].clientWidth" stepKey="productActionsWidthFrontend"/> |
| 1217 | + <assertGreaterThan stepKey="assertColumnIsWiderThanProductImageFrontend"> |
| 1218 | + <actualResult type="variable">firstColumnWidthFrontend</actualResult> |
| 1219 | + <expectedResult type="variable">productImageWidthFrontend</expectedResult> |
| 1220 | + </assertGreaterThan> |
| 1221 | + <assertGreaterThan stepKey="assertColumnIsWiderThanProductPriceContainerFrontend"> |
| 1222 | + <actualResult type="variable">firstColumnWidthFrontend</actualResult> |
| 1223 | + <expectedResult type="variable">productPriceContainerWidthFrontend</expectedResult> |
| 1224 | + </assertGreaterThan> |
| 1225 | + <assertGreaterThan stepKey="assertColumnIsWiderThanProductActionsFrontend"> |
| 1226 | + <actualResult type="variable">firstColumnWidthFrontend</actualResult> |
| 1227 | + <expectedResult type="variable">productActionsWidthFrontend</expectedResult> |
| 1228 | + </assertGreaterThan> |
| 1229 | + </test> |
1097 | 1230 | </tests>
|
0 commit comments