|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="AdminUpdateCategoryWithProductsDefaultSortingTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Catalog"/> |
| 13 | + <stories value="Update categories"/> |
| 14 | + <title value="Update category, sort products by default sorting"/> |
| 15 | + <description value="Login as admin, update category and sort products"/> |
| 16 | + <testCaseId value="MC-25667"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <group value="catalog"/> |
| 19 | + <group value="mtf_migrated"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <createData entity="defaultSimpleProduct" stepKey="simpleProduct" /> |
| 23 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 24 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> |
| 25 | + </before> |
| 26 | + <after> |
| 27 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 28 | + <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> |
| 29 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> |
| 30 | + <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/> |
| 31 | + </after> |
| 32 | + |
| 33 | + <!--Open Category Page--> |
| 34 | + <actionGroup ref="GoToAdminCategoryPageByIdActionGroup" stepKey="goToAdminCategoryPage"> |
| 35 | + <argument name="id" value="$createCategory.id$"/> |
| 36 | + </actionGroup> |
| 37 | + |
| 38 | + <!--Update Product Display Setting--> |
| 39 | + <waitForElementVisible selector="{{AdminCategoryDisplaySettingsSection.settingsHeader}}" stepKey="waitForDisplaySettingsSection"/> |
| 40 | + <conditionalClick selector="{{AdminCategoryDisplaySettingsSection.settingsHeader}}" dependentSelector="{{AdminCategoryDisplaySettingsSection.displayMode}}" visible="false" stepKey="openDisplaySettingsSection"/> |
| 41 | + <waitForElementVisible selector="{{CategoryDisplaySettingsSection.productListCheckBox}}" stepKey="waitForAvailableProductListCheckbox"/> |
| 42 | + <click selector="{{CategoryDisplaySettingsSection.productListCheckBox}}" stepKey="enableTheAvailableProductList"/> |
| 43 | + <selectOption selector="{{CategoryDisplaySettingsSection.productList}}" parameterArray="['Product Name', 'Price']" stepKey="selectPrice"/> |
| 44 | + <waitForElementVisible selector="{{CategoryDisplaySettingsSection.defaultProductLisCheckBox}}" stepKey="waitForDefaultProductList"/> |
| 45 | + <click selector="{{CategoryDisplaySettingsSection.defaultProductLisCheckBox}}" stepKey="enableTheDefaultProductList"/> |
| 46 | + <selectOption selector="{{CategoryDisplaySettingsSection.defaultProductList}}" userInput="name" stepKey="selectProductName"/> |
| 47 | + |
| 48 | + <!--Add Products in Category--> |
| 49 | + <actionGroup ref="AdminCategoryAssignProductActionGroup" stepKey="assignSimpleProductToCategory"> |
| 50 | + <argument name="productSku" value="$simpleProduct.sku$"/> |
| 51 | + </actionGroup> |
| 52 | + <actionGroup ref="AdminSaveCategoryFormActionGroup" stepKey="saveCategory"/> |
| 53 | + |
| 54 | + <!--Verify Category Title--> |
| 55 | + <see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{_defaultCategory.name}}" stepKey="seeCategoryNamePageTitle" /> |
| 56 | + |
| 57 | + <!--Verify Category in store front page--> |
| 58 | + <amOnPage url="{{StorefrontCategoryPage.url($createCategory.custom_attributes[url_key]$)}}" stepKey="openStorefrontCategoryPage"/> |
| 59 | + |
| 60 | + <!--Verify Product in Category--> |
| 61 | + <actionGroup ref="AssertStorefrontProductIsPresentOnCategoryPageActionGroup" stepKey="assertSimpleProductOnCategoryPage"> |
| 62 | + <argument name="productName" value="$simpleProduct.name$"/> |
| 63 | + </actionGroup> |
| 64 | + |
| 65 | + <!--Verify product name and sku on Store Front--> |
| 66 | + <actionGroup ref="AssertProductNameAndSkuInStorefrontProductPageByCustomAttributeUrlKeyActionGroup" stepKey="assertProductOnStorefrontProductPage"> |
| 67 | + <argument name="product" value="$simpleProduct$"/> |
| 68 | + </actionGroup> |
| 69 | + </test> |
| 70 | +</tests> |
| 71 | + |
0 commit comments