diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAddProductReviewActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAddProductReviewActionGroup.xml new file mode 100644 index 0000000000000..64e650580a233 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAddProductReviewActionGroup.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoDetailsSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoDetailsSection.xml index 0745c0d0819a0..148c3fbe96610 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoDetailsSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoDetailsSection.xml @@ -11,5 +11,7 @@
+ +
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductMoreInformationSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductMoreInformationSection.xml index 7706c5f244bc9..0c6d667a5dd75 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductMoreInformationSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductMoreInformationSection.xml @@ -16,5 +16,7 @@ + + diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductReviewsSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductReviewsSection.xml new file mode 100644 index 0000000000000..8b9b8ba289799 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductReviewsSection.xml @@ -0,0 +1,24 @@ + + + + +
+ + + + + + + + + + + +
+
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontEnsureThatAccordionAnchorIsVisibleOnViewportOnceClickedTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontEnsureThatAccordionAnchorIsVisibleOnViewportOnceClickedTest.xml new file mode 100644 index 0000000000000..0f9f542a97d02 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontEnsureThatAccordionAnchorIsVisibleOnViewportOnceClickedTest.xml @@ -0,0 +1,178 @@ + + + + + + + + + + <description value="Ensure that accordion anchor is visible on viewport once clicked"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-6484"/> + <group value="Catalog"/> + </annotations> + <before> + <!-- Create product with description --> + <createData entity="SimpleProductWithDescription" stepKey="createProduct"/> + + <!-- Create 4 product attributes visible on front end --> + <createData entity="productDropDownAttribute" stepKey="createFirstAttribute"/> + <createData entity="productAttributeOption1" stepKey="createOption"> + <requiredEntity createDataKey="createFirstAttribute"/> + </createData> + <createData entity="productAttributeText" stepKey="createSecondAttribute"/> + <createData entity="newProductAttribute" stepKey="createThirdAttribute"/> + <createData entity="productAttributeWithTwoOptions" stepKey="createFourthAttribute"/> + <createData entity="productAttributeOption1" stepKey="createFirstOption"> + <requiredEntity createDataKey="createFourthAttribute"/> + </createData> + <createData entity="productAttributeOption2" stepKey="createSecondOption"> + <requiredEntity createDataKey="createFourthAttribute"/> + </createData> + + <!-- Add all created attributes to Default Attribute Set --> + <createData entity="AddToDefaultSet" stepKey="addFirstAttributeToAttributeSet"> + <requiredEntity createDataKey="createFirstAttribute"/> + </createData> + <createData entity="AddToDefaultSet" stepKey="addSecondAttributeToAttributeSet"> + <requiredEntity createDataKey="createSecondAttribute"/> + </createData> + <createData entity="AddToDefaultSet" stepKey="addThirdAttributeToAttributeSet"> + <requiredEntity createDataKey="createThirdAttribute"/> + </createData> + <createData entity="AddToDefaultSet" stepKey="addFourthAttributeToAttributeSet"> + <requiredEntity createDataKey="createFourthAttribute"/> + </createData> + + <!-- Login as admin --> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + </before> + <after> + <!-- Delete reviews --> + <actionGroup ref="AdminOpenReviewsPageActionGroup" stepKey="openAllReviewsPage"/> + <actionGroup ref="AdminDeleteReviewsByUserNicknameActionGroup" stepKey="deleteCustomerReview"/> + + <!-- Delete customer --> + <actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteCustomer"> + <argument name="email" value="{{CustomerEntityOne.email}}"/> + </actionGroup> + + <deleteData createDataKey="createFirstAttribute" stepKey="deleteFirstAttribute"/> + <deleteData createDataKey="createSecondAttribute" stepKey="deleteSecondAttribute"/> + <deleteData createDataKey="createThirdAttribute" stepKey="deleteThirdAttribute"/> + <deleteData createDataKey="createFourthAttribute" stepKey="deleteFourthAttribute"/> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + </after> + + <!-- Edit the product and set those attributes values --> + <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="findCreatedProductInGrid"> + <argument name="product" value="$$createProduct$$"/> + </actionGroup> + <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="goToEditProductPage"> + <argument name="product" value="$$createProduct$$"/> + </actionGroup> + <selectOption selector="{{AdminProductFormSection.customSelectField($$createFirstAttribute.attribute[attribute_code]$$)}}" userInput="$$createOption.option[store_labels][0][label]$$" stepKey="setFirstAttributeValue"/> + <fillField selector="{{AdminProductAttributeSection.textAttributeByCode($$createSecondAttribute.attribute[attribute_code]$$)}}" userInput="{{ProductAttributeOption8.value}}" stepKey="setSecondAttributeValue"/> + <fillField selector="{{AdminProductAttributeSection.textAttributeByCode($$createThirdAttribute.attribute[attribute_code]$$)}}" userInput="{{ProductAttributeOption8.value}}" stepKey="setThirdAttributeValue"/> + <selectOption selector="{{AdminProductFormSection.customSelectField($$createFourthAttribute.attribute[attribute_code]$$)}}" userInput="$$createSecondOption.option[store_labels][0][label]$$" stepKey="setFourthAttributeValue"/> + + <!-- Save product form --> + <actionGroup ref="saveProductForm" stepKey="saveSimpleProduct"/> + + <!-- Go to frontend and make a user account and login with it --> + <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="signUpNewUser"> + <argument name="Customer" value="CustomerEntityOne"/> + </actionGroup> + + <!-- Go to the product view page --> + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openCreatedProductPage"> + <argument name="productUrl" value="$$createProduct.custom_attributes[url_key]$$"/> + </actionGroup> + + <!-- Click on reviews and add 2 reviews with current user --> + <actionGroup ref="StorefrontAddProductReviewActionGroup" stepKey="addFirstReview"/> + <actionGroup ref="StorefrontAddProductReviewActionGroup" stepKey="addSecondReview"/> + + <!-- Go to Pending reviews page and clear filters --> + <actionGroup ref="AdminOpenPendingReviewsPageActionGroup" stepKey="openReviewsPage"/> + <actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearFilters"/> + + <!-- Moderate first product reviews: change review status from pending to approved, save --> + <actionGroup ref="AdminOpenReviewByUserNicknameActionGroup" stepKey="openFirstCustomerReviews"/> + <actionGroup ref="AdminChangeReviewStatusActionGroup" stepKey="changeFirstReviewStatus"/> + <actionGroup ref="AdminSaveReviewActionGroup" stepKey="saveModeratedFirstReview"/> + + <!-- Moderate second product reviews: change review status from pending to approved, save --> + <actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearFilter"/> + <actionGroup ref="AdminOpenReviewByUserNicknameActionGroup" stepKey="openSecondCustomerReviews"/> + <actionGroup ref="AdminChangeReviewStatusActionGroup" stepKey="changeSecondReviewStatus"/> + <actionGroup ref="AdminSaveReviewActionGroup" stepKey="saveModeratedSecondReview"/> + + <!-- Assert that product page has the description --> + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> + <argument name="productUrl" value="$$createProduct.custom_attributes[url_key]$$"/> + </actionGroup> + <click selector="{{StorefrontProductInfoDetailsSection.detailsTab}}" stepKey="clickDetailsTab"/> + <see selector="{{StorefrontProductInfoMainSection.productDescription}}" userInput="$$createProduct.custom_attributes[description]$$" stepKey="assertProductDescription"/> + + <!-- Assert that product page has added reviews --> + <click selector="{{StorefrontProductReviewsSection.reviewsTab}}" stepKey="clickReviewTab"/> + <waitForElementVisible selector="{{StorefrontProductReviewsSection.reviewsBlock}}" stepKey="seeAllReviews"/> + <actionGroup ref="StorefrontAssertReviewAtProductPageActionGroup" stepKey="assertFirstReview"> + <argument name="rowIndex" value="1"/> + </actionGroup> + <actionGroup ref="StorefrontAssertReviewAtProductPageActionGroup" stepKey="assertSecondReview"> + <argument name="rowIndex" value="2"/> + </actionGroup> + + <!-- Assert that product page has all product attributes in More Info tab --> + <actionGroup ref="checkAttributeInMoreInformationTab" stepKey="checkFirstAttributeInMoreInformationTab"> + <argument name="attributeLabel" value="$$createFirstAttribute.attribute[frontend_labels][0][label]$$"/> + <argument name="attributeValue" value="$$createOption.option[store_labels][0][label]$$"/> + </actionGroup> + <actionGroup ref="checkAttributeInMoreInformationTab" stepKey="checkSecondAttributeInMoreInformationTab"> + <argument name="attributeLabel" value="$$createSecondAttribute.attribute[frontend_labels][0][label]$$"/> + <argument name="attributeValue" value="{{ProductAttributeOption8.value}}"/> + </actionGroup> + <actionGroup ref="checkAttributeInMoreInformationTab" stepKey="checkThirdAttributeInMoreInformationTab"> + <argument name="attributeLabel" value="$$createThirdAttribute.attribute[frontend_labels][0][label]$$"/> + <argument name="attributeValue" value="{{ProductAttributeOption8.value}}"/> + </actionGroup> + <actionGroup ref="checkAttributeInMoreInformationTab" stepKey="checkFourthAttributeInMoreInformationTab"> + <argument name="attributeLabel" value="$$createFourthAttribute.attribute[frontend_labels][0][label]$$"/> + <argument name="attributeValue" value="$$createSecondOption.option[store_labels][0][label]$$"/> + </actionGroup> + + <!-- Collapse the view of the page to minimum width so that mobile view becomes visible --> + <resizeWindow width="400" height="590" stepKey="resizeWindowToMobileView"/> + + <!-- Assert that Details tab on product page become accordion --> + <click selector="{{StorefrontProductInfoDetailsSection.detailsTab}}" stepKey="clickDetails"/> + <seeElement selector="{{StorefrontProductInfoDetailsSection.detailsSectionToggleState('true')}}" stepKey="seeOpenDetailsTab"/> + <seeElement selector="{{StorefrontProductMoreInformationSection.moreInformationSectionToggleState('false')}}" stepKey="seeClosedMoreInformationTab"/> + <seeElement selector="{{StorefrontProductReviewsSection.reviewsSectionToggleState('false')}}" stepKey="seeClosedReviewTab"/> + + <!-- Assert that More Information tab on product page become accordion --> + <click selector="{{StorefrontProductMoreInformationSection.moreInformation}}" stepKey="clickMoreInformation"/> + <seeElement selector="{{StorefrontProductInfoDetailsSection.detailsSectionToggleState('false')}}" stepKey="seeClosedDetails"/> + <seeElement selector="{{StorefrontProductMoreInformationSection.moreInformationSectionToggleState('true')}}" stepKey="seeOpenMoreInformationTab"/> + <seeElement selector="{{StorefrontProductReviewsSection.reviewsSectionToggleState('false')}}" stepKey="seeClosedReview"/> + + <!-- Assert that Reviews tab on product page become accordion --> + <click selector="{{StorefrontProductReviewsSection.reviewsTab}}" stepKey="clickReview"/> + <seeElement selector="{{StorefrontProductInfoDetailsSection.detailsSectionToggleState('false')}}" stepKey="seeClosedDetailsTab"/> + <seeElement selector="{{StorefrontProductMoreInformationSection.moreInformationSectionToggleState('false')}}" stepKey="seeClosedMoreInformation"/> + <seeElement selector="{{StorefrontProductReviewsSection.reviewsSectionToggleState('true')}}" stepKey="seeOpenReviewTab"/> + + <!-- Scroll so that the description is visible and More info tab is on the upper middle of the page --> + <scrollTo selector="{{StorefrontProductInfoDetailsSection.detailsTab}}" stepKey="scrollToMoreInfoTab"/> + <resizeWindow width="1280" height="1024" stepKey="resizeWindowToDesktop"/> + </test> +</tests> diff --git a/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminChangeReviewStatusActionGroup.xml b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminChangeReviewStatusActionGroup.xml new file mode 100644 index 0000000000000..e50f8b2224e2f --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminChangeReviewStatusActionGroup.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminChangeReviewStatusActionGroup"> + <arguments> + <argument name="status" type="string" defaultValue="1"/> + </arguments> + <selectOption selector="{{AdminEditReviewSection.status}}" userInput="{{status}}" stepKey="changeReviewStatus"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminDeleteReviewsByUserNicknameActionGroup.xml b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminDeleteReviewsByUserNicknameActionGroup.xml new file mode 100644 index 0000000000000..4b7fa5f3d48bd --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminDeleteReviewsByUserNicknameActionGroup.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminDeleteReviewsByUserNicknameActionGroup"> + <arguments> + <argument name="nickname" type="string" defaultValue="{{simpleProductReview.nickname}}"/> + </arguments> + <fillField selector="{{AdminReviewGridSection.nickname}}" userInput="{{nickname}}" stepKey="fillNickname"/> + <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickApplyFilters"/> + <selectOption selector="{{AdminReviewGridSection.massActions}}" userInput="selectAll" stepKey="selectAll"/> + <selectOption selector="{{AdminReviewGridSection.massActionsSelect}}" userInput="delete" stepKey="clickDeleteActionDropdown"/> + <click selector="{{AdminReviewGridSection.submit}}" stepKey="clickSubmit"/> + <waitForElementVisible selector="{{AdminReviewGridSection.acceptModal}}" stepKey="waitForModalPopUp"/> + <click selector="{{AdminReviewGridSection.acceptModal}}" stepKey="confirmProductDelete"/> + <see selector="{{AdminMessagesSection.success}}" userInput="record(s) have been deleted." stepKey="seeSuccessMessage"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminOpenPendingReviewsPageActionGroup.xml b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminOpenPendingReviewsPageActionGroup.xml new file mode 100644 index 0000000000000..46d7e99dd6b84 --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminOpenPendingReviewsPageActionGroup.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminOpenPendingReviewsPageActionGroup"> + <amOnPage url="{{AdminPendingReviewsPage.url}}" stepKey="openReviewsPageActionGroup"/> + <waitForPageLoad stepKey="waitForReviewsPageLoad"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminOpenReviewByUserNicknameActionGroup.xml b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminOpenReviewByUserNicknameActionGroup.xml new file mode 100644 index 0000000000000..a1889a1f9f53f --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminOpenReviewByUserNicknameActionGroup.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminOpenReviewByUserNicknameActionGroup"> + <arguments> + <argument name="nickname" type="string" defaultValue="{{simpleProductReview.nickname}}"/> + </arguments> + <fillField selector="{{AdminReviewGridSection.nickname}}" userInput="{{nickname}}" stepKey="fillNickname"/> + <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickApplyFilters"/> + <click selector="{{AdminReviewGridSection.firstRow}}" stepKey="clickFirstRow"/> + <waitForPageLoad stepKey="waitForEditReviewPageLoad"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminOpenReviewsPageActionGroup.xml b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminOpenReviewsPageActionGroup.xml new file mode 100644 index 0000000000000..f792b5609d739 --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminOpenReviewsPageActionGroup.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminOpenReviewsPageActionGroup"> + <amOnPage url="{{AdminReviewsPage.url}}" stepKey="openReviewsPageActionGroup"/> + <waitForPageLoad stepKey="waitForReviewsPageLoad"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminSaveReviewActionGroup.xml b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminSaveReviewActionGroup.xml new file mode 100644 index 0000000000000..62c93764ab61d --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminSaveReviewActionGroup.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminSaveReviewActionGroup"> + <click selector="{{AdminEditReviewSection.saveReview}}" stepKey="saveReview"/> + <waitForElementVisible selector="{{AdminMessagesSection.successMessage}}" stepKey="waitForSuccessMessage"/> + <see selector="{{AdminMessagesSection.successMessage}}" userInput="You saved the review." stepKey="seeSuccessMessage"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Review/Test/Mftf/ActionGroup/StorefrontAssertReviewAtProductPageActionGroup.xml b/app/code/Magento/Review/Test/Mftf/ActionGroup/StorefrontAssertReviewAtProductPageActionGroup.xml new file mode 100644 index 0000000000000..ef2c6f8917e29 --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/ActionGroup/StorefrontAssertReviewAtProductPageActionGroup.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="StorefrontAssertReviewAtProductPageActionGroup"> + <arguments> + <argument name="review" type="entity" defaultValue="simpleProductReview"/> + <argument name="rowIndex" type="string"/> + </arguments> + <see selector="{{StorefrontProductReviewsSection.reviewTitle(rowIndex)}}" userInput="{{review.title}}" stepKey="seeReviewTitle"/> + <see selector="{{StorefrontProductReviewsSection.reviewContent(rowIndex)}}" userInput="{{review.detail}}" stepKey="seeReviewContent"/> + <see selector="{{StorefrontProductReviewsSection.reviewAuthor(rowIndex)}}" userInput="{{review.nickname}}" stepKey="seeAuthorReview"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Review/Test/Mftf/Data/ProductReviewData.xml b/app/code/Magento/Review/Test/Mftf/Data/ProductReviewData.xml new file mode 100644 index 0000000000000..89758328efd54 --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/Data/ProductReviewData.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="simpleProductReview"> + <data key="nickname" unique="suffix">user</data> + <data key="title">Review title</data> + <data key="detail">Simple product review</data> + </entity> +</entities> diff --git a/app/code/Magento/Review/Test/Mftf/Page/AdminPendingReviewsPage.xml b/app/code/Magento/Review/Test/Mftf/Page/AdminPendingReviewsPage.xml new file mode 100644 index 0000000000000..ad12f065b87b1 --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/Page/AdminPendingReviewsPage.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd"> + <page name="AdminPendingReviewsPage" url="review/product/pending/" area="admin" module="Review"> + <section name="AdminEditReviewSection"/> + <section name="AdminReviewGridSection"/> + </page> +</pages> diff --git a/app/code/Magento/Review/Test/Mftf/Page/AdminReviewsPage.xml b/app/code/Magento/Review/Test/Mftf/Page/AdminReviewsPage.xml new file mode 100644 index 0000000000000..cb510ce588eb0 --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/Page/AdminReviewsPage.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd"> + <page name="AdminReviewsPage" url="review/product/index/" area="admin" module="Review"> + <section name="AdminEditReviewSection"/> + <section name="AdminReviewGridSection"/> + </page> +</pages> diff --git a/app/code/Magento/Review/Test/Mftf/Section/AdminEditReviewSection.xml b/app/code/Magento/Review/Test/Mftf/Section/AdminEditReviewSection.xml new file mode 100644 index 0000000000000..4460560ecfe63 --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/Section/AdminEditReviewSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + <section name="AdminEditReviewSection"> + <element name="status" type="select" selector="#status_id"/> + <element name="saveReview" type="button" selector="#save_button"/> + </section> +</sections> diff --git a/app/code/Magento/Review/Test/Mftf/Section/AdminReviewGridSection.xml b/app/code/Magento/Review/Test/Mftf/Section/AdminReviewGridSection.xml new file mode 100644 index 0000000000000..2c5588cf2645b --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/Section/AdminReviewGridSection.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + <section name="AdminReviewGridSection"> + <element name="nickname" type="input" selector="#reviwGrid_filter_nickname"/> + <element name="status" type="select" selector="#reviwGrid_filter_status"/> + <element name="firstRow" type="block" selector=".data-grid tbody tr:nth-of-type(1)"/> + <element name="massActions" type="button" selector="#reviwGrid_massaction-mass-select"/> + <element name="massActionsSelect" type="button" selector="#reviwGrid_massaction-select"/> + <element name="submit" type="button" selector=".admin__grid-massaction-form .action-default.scalable"/> + <element name="acceptModal" type="button" selector=".modal-popup.confirm button.action-accept"/> + </section> +</sections>