|
1140 | 1140 | </actionGroup>
|
1141 | 1141 | <dontSeeElementInDOM selector="{{ProductsOnStorefront.product('1')}}" stepKey="validateNoProductsOnStorefront" after="navigateToCMSPageStorefront2"/>
|
1142 | 1142 | </test>
|
| 1143 | + <test name="AdminPageBuilderVerifySwatchDisplayedInPreviewGrid"> |
| 1144 | + <annotations> |
| 1145 | + <features value="PageBuilder"/> |
| 1146 | + <stories value="Products"/> |
| 1147 | + <title value="Verify products display swatches within the admin for grid appearance"/> |
| 1148 | + <description value="Verify that a product which has swatches display the swatches within the admin for grid appearance"/> |
| 1149 | + <severity value="MAJOR"/> |
| 1150 | + <useCaseId value="PB-76"/> |
| 1151 | + <testCaseId value="MC-22763"/> |
| 1152 | + <group value="pagebuilder"/> |
| 1153 | + <group value="pagebuilder-products"/> |
| 1154 | + <group value="pagebuilder-productsGrid"/> |
| 1155 | + </annotations> |
| 1156 | + <before> |
| 1157 | + <createData entity="_emptyCmsPage" stepKey="createCMSPage"/> |
| 1158 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 1159 | + </before> |
| 1160 | + <after> |
| 1161 | + <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> |
| 1162 | + <actionGroup ref="deleteProductBySku" stepKey="deleteProduct"> |
| 1163 | + <argument name="sku" value="{{BaseConfigurableProduct.sku}}"/> |
| 1164 | + </actionGroup> |
| 1165 | + <actionGroup ref="deleteProductAttributeByLabel" stepKey="deleteAttribute"> |
| 1166 | + <argument name="ProductAttribute" value="visualSwatchAttribute"/> |
| 1167 | + </actionGroup> |
| 1168 | + <actionGroup ref="logout" stepKey="logout"/> |
| 1169 | + </after> |
| 1170 | + <!-- Create a configurable swatch product via the UI --> |
| 1171 | + <comment userInput="Create a configurable swatch product via the UI" stepKey="commentCreateConfigurableProduct" /> |
| 1172 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductIndex"/> |
| 1173 | + <waitForPageLoad stepKey="waitForProductPage"/> |
| 1174 | + <actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage"> |
| 1175 | + <argument name="product" value="BaseConfigurableProduct"/> |
| 1176 | + </actionGroup> |
| 1177 | + <actionGroup ref="fillMainProductForm" stepKey="fillProductForm"> |
| 1178 | + <argument name="product" value="BaseConfigurableProduct"/> |
| 1179 | + </actionGroup> |
| 1180 | + <!-- Add swatch attribute to configurable product --> |
| 1181 | + <comment userInput="Add swatch attribute to configurable product" stepKey="commentAddSwatchesToProduct"/> |
| 1182 | + <actionGroup ref="AddVisualSwatchToProductWithStorefrontConfigActionGroup" stepKey="addSwatchToProduct"/> |
| 1183 | + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct"/> |
| 1184 | + <!-- Add product to Page Builder Products content type --> |
| 1185 | + <comment userInput="Add product to Page Builder Products content type" stepKey="commentAddProductToPageBuilder"/> |
| 1186 | + <actionGroup ref="navigateToCMSPage" stepKey="navigateToCMSPage"> |
| 1187 | + <argument name="CMSPage" value="$$createCMSPage$$"/> |
| 1188 | + </actionGroup> |
| 1189 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> |
| 1190 | + <actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandMenuSectionAddContent"> |
| 1191 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1192 | + </actionGroup> |
| 1193 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragProductsIntoStage"> |
| 1194 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1195 | + </actionGroup> |
| 1196 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditAfterDrop"> |
| 1197 | + <argument name="contentType" value="PageBuilderProductsContentType"/> |
| 1198 | + </actionGroup> |
| 1199 | + <actionGroup ref="chooseVisualSelectOption" stepKey="chooseSelectProductsBy"> |
| 1200 | + <argument name="property" value="PageBuilderProductsSelectProductsBySKU"/> |
| 1201 | + </actionGroup> |
| 1202 | + <actionGroup ref="addSKUsToSelectProductsBySKU" stepKey="addProductsSKUsToInputField"> |
| 1203 | + <argument name="SKUs" value="{{BaseConfigurableProduct.sku}}"/> |
| 1204 | + </actionGroup> |
| 1205 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/> |
| 1206 | + <actionGroup ref="validateProductCountInProducts" stepKey="validateProductsCountStage"> |
| 1207 | + <argument name="page" value="ProductsOnStage"/> |
| 1208 | + <argument name="count" value="1"/> |
| 1209 | + </actionGroup> |
| 1210 | + <!-- Verify displayed swatches --> |
| 1211 | + <comment userInput="Verify displayed swatches" stepKey="commentVerifySwatches"/> |
| 1212 | + <seeElement selector="{{StorefrontProductInfoMainSection.productSwatch(visualSwatchOption1.default_label)}}" stepKey="assertAddedWidgetS"/> |
| 1213 | + <seeElement selector="{{StorefrontProductInfoMainSection.productSwatch(visualSwatchOption2.default_label)}}" stepKey="assertAddedWidgetM"/> |
| 1214 | + <!-- Save page and verify swatches display on reload --> |
| 1215 | + <comment userInput="Save page and verify swatches display on reload" stepKey="commentSaveAndReload"/> |
| 1216 | + <actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/> |
| 1217 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage2"/> |
| 1218 | + <actionGroup ref="validateProductCountInProducts" stepKey="validateProductsCountStage2"> |
| 1219 | + <argument name="page" value="ProductsOnStage"/> |
| 1220 | + <argument name="count" value="1"/> |
| 1221 | + </actionGroup> |
| 1222 | + <seeElement selector="{{StorefrontProductInfoMainSection.productSwatch(visualSwatchOption1.default_label)}}" stepKey="assertAddedWidgetS2"/> |
| 1223 | + <seeElement selector="{{StorefrontProductInfoMainSection.productSwatch(visualSwatchOption2.default_label)}}" stepKey="assertAddedWidgetM2"/> |
| 1224 | + </test> |
1143 | 1225 | </tests>
|
0 commit comments