|
| 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="StorefrontReviewWithProductFullWidthLayoutTest"> |
| 12 | + <annotations> |
| 13 | + <features value="PageBuilder"/> |
| 14 | + <stories value="Catalog Product Review"/> |
| 15 | + <title value="Review should display on product page with 'Product - Full Width' layout"/> |
| 16 | + <description value="Review should display on product page with 'Product - Full Width' layout"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <useCaseId value="MC-18071"/> |
| 19 | + <testCaseId value="MC-19606"/> |
| 20 | + <group value="pagebuilder"/> |
| 21 | + <group value="pagebuilder-layout"/> |
| 22 | + <group value="pagebuilder-fullwidth"/> |
| 23 | + <group value="pagebuilder-catalog-product"/> |
| 24 | + </annotations> |
| 25 | + <before> |
| 26 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 27 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 28 | + <createData entity="ApiSimpleProduct" stepKey="createProduct"> |
| 29 | + <requiredEntity createDataKey="createCategory"/> |
| 30 | + </createData> |
| 31 | + </before> |
| 32 | + <after> |
| 33 | + <actionGroup ref="logout" stepKey="logout"/> |
| 34 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 35 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 36 | + </after> |
| 37 | + <!-- Find created product in product grid and open edit product --> |
| 38 | + <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="findCreatedProductInGrid"> |
| 39 | + <argument name="product" value="$$createProduct$$"/> |
| 40 | + </actionGroup> |
| 41 | + <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct"> |
| 42 | + <argument name="product" value="$$createProduct$$"/> |
| 43 | + </actionGroup> |
| 44 | + <!-- Use Full Width layout --> |
| 45 | + <comment userInput="Set Layout to Product - Full Width" stepKey="commentSetLayout"/> |
| 46 | + <actionGroup ref="setLayout" stepKey="setFullWidthLayout"> |
| 47 | + <argument name="designSection" value="ProductDesignSection"/> |
| 48 | + <argument name="layoutOption" value="PageBuilderFullWidthLayout.product"/> |
| 49 | + </actionGroup> |
| 50 | + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct"/> |
| 51 | + <waitForPageLoad stepKey="waitForPageLoadSaveProduct"/> |
| 52 | + <waitForElementVisible selector="{{AdminProductMessagesSection.successMessage}}" stepKey="assertSaveMessageSuccess"/> |
| 53 | + <!-- Move to frontend and make a user account and login with it --> |
| 54 | + <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="signUpNewUser"> |
| 55 | + <argument name="Customer" value="CustomerEntityOne"/> |
| 56 | + </actionGroup> |
| 57 | + <!-- Go to the product view page --> |
| 58 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openCreatedProductPage"> |
| 59 | + <argument name="productUrl" value="$$createProduct.custom_attributes[url_key]$$"/> |
| 60 | + </actionGroup> |
| 61 | + <!-- Click on reviews and add review with current user --> |
| 62 | + <actionGroup ref="StorefrontAddProductReviewProductFullWidthLayoutActionGroup" stepKey="addReview"/> |
| 63 | + <!-- Go to "Pending reviews" page and clear filters --> |
| 64 | + <actionGroup ref="AdminOpenPendingReviewsPageActionGroup" stepKey="openReviewsPage"/> |
| 65 | + <actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearFilters"/> |
| 66 | + <!-- Moderate product review: change review status from pending to approved, save --> |
| 67 | + <actionGroup ref="AdminOpenReviewByUserNicknameActionGroup" stepKey="openCustomerReview"/> |
| 68 | + <actionGroup ref="AdminChangeReviewStatusActionGroup" stepKey="changeReviewStatus"/> |
| 69 | + <actionGroup ref="AdminSaveReviewActionGroup" stepKey="saveModeratedReview"/> |
| 70 | + <!-- Assert that product page has added review --> |
| 71 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> |
| 72 | + <argument name="productUrl" value="$$createProduct.custom_attributes[url_key]$$"/> |
| 73 | + </actionGroup> |
| 74 | + <actionGroup ref="StorefrontAssertReviewAtProductPageActionGroup" stepKey="assertReview"> |
| 75 | + <argument name="rowIndex" value="1"/> |
| 76 | + </actionGroup> |
| 77 | + </test> |
| 78 | +</tests> |
0 commit comments