|
| 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="AdminValidateEAVTypesAndAttributesConfigurationTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Cache"/> |
| 13 | + <stories value="Cache Management"/> |
| 14 | + <title value="Validate EAVTypes And Attributes Cache Type"/> |
| 15 | + <description value="Validate EAVTypes And Attributes Cache Type After Cache Management"/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="AC-3833"/> |
| 18 | + </annotations> |
| 19 | + <before> |
| 20 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 21 | + <actionGroup ref="AdminGoToCacheManagementPageActionGroup" stepKey="goToCacheManagementPage"/> |
| 22 | + <!--Verify Cache Type EAV Types And Attributes Is ENABLED --> |
| 23 | + <waitForText selector="{{AdminMessagesSection.assertCacheManagementStatusEnabled('EAV')}}" userInput="ENABLED" stepKey="verifyCacheTypeEAVTypesAndAttributesIsENABLED"/> |
| 24 | + <!--Create Category--> |
| 25 | + <createData entity="SimpleSubCategory" stepKey="createCategory"/> |
| 26 | + <!--Create Simple Product--> |
| 27 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct"> |
| 28 | + <requiredEntity createDataKey="createCategory"/> |
| 29 | + </createData> |
| 30 | + </before> |
| 31 | + <after> |
| 32 | + <!--Delete created entity --> |
| 33 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 34 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 35 | + <!--Delete created entity --> |
| 36 | + <actionGroup ref="DeleteProductAttributeActionGroup" stepKey="deleteCreatedAttribute"> |
| 37 | + <argument name="ProductAttribute" value="newProductAttribute"/> |
| 38 | + </actionGroup> |
| 39 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
| 40 | + <argument name="indices" value=""/> |
| 41 | + </actionGroup> |
| 42 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 43 | + </after> |
| 44 | + <!-- Open Product Index Page--> |
| 45 | + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/> |
| 46 | + <!-- Select Created Product--> |
| 47 | + <actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterProductGridBySku"> |
| 48 | + <argument name="product" value="$$createSimpleProduct$$"/> |
| 49 | + </actionGroup> |
| 50 | + <waitForElementVisible selector="{{AdminProductGridSection.productRowBySku($$createSimpleProduct.sku$$)}}" stepKey="waitForFirstProductToBeVisible"/> |
| 51 | + <click selector="{{AdminProductGridSection.productRowBySku($$createSimpleProduct.sku$$)}}" stepKey="openFirstProduct"/> |
| 52 | + <waitForPageLoad stepKey="waitForProductToLoad"/> |
| 53 | + <actionGroup ref="AdminFillProductQtyOnProductFormActionGroup" stepKey="fillProductQty"> |
| 54 | + <argument name="productQty" value="100"/> |
| 55 | + </actionGroup> |
| 56 | + <actionGroup ref="AdminSetStockStatusActionGroup" stepKey="selectStockStatus"> |
| 57 | + <argument name="stockStatus" value="In Stock"/> |
| 58 | + </actionGroup> |
| 59 | + <!-- Create New Product Attribute --> |
| 60 | + <waitForElementVisible selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="waitForAttributeToBeVisible"/> |
| 61 | + <click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickOnAddAttribute"/> |
| 62 | + <waitForPageLoad stepKey="waitForAttributePageToLoad"/> |
| 63 | + <click selector="{{AdminProductFormSection.createNewAttributeBtn}}" stepKey="clickCreateNewAttributeButton"/> |
| 64 | + <waitForPageLoad stepKey="waitForNewAttributePageToLoad"/> |
| 65 | + <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.defaultLabel}}" stepKey="waitForDefaultLabelToBeVisible"/> |
| 66 | + <fillField selector="{{AdminCreateNewProductAttributeSection.defaultLabel}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="fillAttributeLabel"/> |
| 67 | + <selectOption selector="{{AdminCreateNewProductAttributeSection.inputType}}" userInput="Text Field" stepKey="selectTextField"/> |
| 68 | + <click selector="{{AdminCreateNewProductAttributeSection.advancedAttributeProperties}}" stepKey="clickOnAdvancedAttributeProperties"/> |
| 69 | + <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.attributeCode}}" stepKey="waitForAttributeCodeToVisible"/> |
| 70 | + <scrollTo selector="{{AdminCreateNewProductAttributeSection.attributeCode}}" stepKey="scrollToAttributeCode"/> |
| 71 | + <fillField selector="{{AdminCreateNewProductAttributeSection.attributeCode}}" userInput="{{newProductAttribute.attribute_code}}" stepKey="fillAttributeCode"/> |
| 72 | + <fillField selector="{{AdminCreateNewProductAttributeSection.defaultValue}}" userInput="{{ProductAttributeOption8.value}}" stepKey="fillDefaultValue"/> |
| 73 | + <scrollTo selector="{{AdminCreateNewProductAttributeSection.isUnique}}" stepKey="scrollToIsUniqueOption"/> |
| 74 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.isUnique}}" stepKey="enableIsUniqueOption"/> |
| 75 | + <scrollTo selector="{{AdminCreateNewProductAttributeSection.advancedAttributeProperties}}" stepKey="scrollToAdvancedAttributeProperties"/> |
| 76 | + <click selector="{{AdminCreateNewProductAttributeSection.advancedAttributeProperties}}" stepKey="clickOnAdvancedAttributeProperties1"/> |
| 77 | + <scrollTo selector="{{AdminCreateNewProductAttributeSection.storefrontProperties}}" stepKey="scrollToStorefrontProperties"/> |
| 78 | + <click selector="{{AdminCreateNewProductAttributeSection.storefrontProperties}}" stepKey="clickOnStorefrontProperties"/> |
| 79 | + <waitForPageLoad stepKey="waitForStoreFrontToLoad"/> |
| 80 | + <scrollTo stepKey="scroll1" selector="{{AdminCreateNewProductAttributeSection.sortProductListing}}" x="0" y="-80"/> |
| 81 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.inSearch}}" stepKey="enableInSearchOption"/> |
| 82 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.advancedSearch}}" stepKey="enableAdvancedSearch"/> |
| 83 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.isComparable}}" stepKey="enableIsUComparableption"/> |
| 84 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.allowHtmlTags}}" stepKey="enableAllowHtmlTags"/> |
| 85 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.visibleOnStorefront}}" stepKey="enableVisibleOnStorefront"/> |
| 86 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.sortProductListing}}" stepKey="enableSortProductListing"/> |
| 87 | + <scrollToTopOfPage stepKey="scrollToTopOfPage"/> |
| 88 | + <click selector="{{AdminCreateNewProductAttributeSection.saveAttribute}}" stepKey="clickOnSaveAttribute"/> |
| 89 | + <waitForPageLoad stepKey="waitForAttributeToSave"/> |
| 90 | + <actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveTheProduct"/> |
| 91 | + <waitForText selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/> |
| 92 | + <actionGroup ref="AdminInputCustomAttributeToExistingProductActionGroup" stepKey="adminProductFillCustomAttribute"> |
| 93 | + <argument name="attributeCode" value="{{newProductAttribute.attribute_code}}"/> |
| 94 | + <argument name="adminOption1" value="{{ProductAttributeOption8.label}}"/> |
| 95 | + </actionGroup> |
| 96 | + <!--Verify product attribute added in product form --> |
| 97 | + <scrollTo selector="{{AdminProductFormSection.contentTab}}" stepKey="scrollToContentTab"/> |
| 98 | + <waitForElementVisible selector="{{AdminProductFormSection.attributeTab}}" stepKey="waitForAttributeToVisible"/> |
| 99 | + <click selector="{{AdminProductFormSection.attributeTab}}" stepKey="clickOnAttribute"/> |
| 100 | + <!--Verify Cache Type Page Cache Is INVALIDATED --> |
| 101 | + <actionGroup ref="AdminGoToCacheManagementPageActionGroup" stepKey="goToCacheManagementPageAgain"/> |
| 102 | + <waitForText selector="{{AdminMessagesSection.assertCacheManagementStatusInvalidated('FPC')}}" userInput="INVALIDATED" stepKey="verifyCacheTypePageCacheIsInvalidated"/> |
| 103 | + <!--Flush Cache --> |
| 104 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
| 105 | + <argument name="indices" value=""/> |
| 106 | + </actionGroup> |
| 107 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCache"> |
| 108 | + <argument name="tags" value="full_page"/> |
| 109 | + </actionGroup> |
| 110 | + <!--Verify Cache Type Page Cache s Is Enabled --> |
| 111 | + <actionGroup ref="AdminGoToCacheManagementPageActionGroup" stepKey="goToCacheManagementPageAgain1"/> |
| 112 | + <waitForText selector="{{AdminMessagesSection.assertCacheManagementStatusEnabled('FPC')}}" userInput="ENABLED" stepKey="verifyCacheTypePageCacheIsENABLED"/> |
| 113 | + <!--Verify Product Attribute is present in Category Store Front Page --> |
| 114 | + <!--Navigate To Product Storefront--> |
| 115 | + <amOnPage url="$$createCategory.custom_attributes[url_key]$$.html" stepKey="goToStorefrontPageAgain"/> |
| 116 | + <waitForPageLoad stepKey="waitForProductFrontPageToLoad1"/> |
| 117 | + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName(SimpleSubCategory.name)}}" stepKey="clickOnCategory"/> |
| 118 | + <waitForPageLoad stepKey="waitForCategoryPageToLoad"/> |
| 119 | + <click selector="{{StorefrontCategoryMainSection.productLink}}" stepKey="openSearchedProduct"/> |
| 120 | + <waitForPageLoad stepKey="waitForProductToLoad2"/> |
| 121 | + <actionGroup ref="AssertStorefrontProductInfoMainProductNameActionGroup" stepKey="seeProductNameInStoreFront"> |
| 122 | + <argument name="value" value="{{SimpleProduct.name}}"/> |
| 123 | + </actionGroup> |
| 124 | + <actionGroup ref="StorefrontAssertProductSkuOnProductPageActionGroup" stepKey="seeProductSkuInStoreFront"> |
| 125 | + <argument name="productSku" value="{{SimpleProduct.sku}}"/> |
| 126 | + </actionGroup> |
| 127 | + <scrollTo selector="{{StorefrontProductMoreInformationSection.moreInformation}}" stepKey="scrollToMoreInformation"/> |
| 128 | + <waitForText selector="{{StorefrontProductMoreInformationSection.attributeLabel}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="seeAttributeLabel"/> |
| 129 | + <!--Verify Product Attribute present in search page --> |
| 130 | + <amOnPage url="$$createCategory.custom_attributes[url_key]$$.html" stepKey="goToStorefrontPage1"/> |
| 131 | + <waitForPageLoad stepKey="waitForProductFrontPageToLoad2"/> |
| 132 | + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillAttribute"> |
| 133 | + <argument name="phrase" value="{{ProductAttributeOption8.value}}"/> |
| 134 | + </actionGroup> |
| 135 | + <actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProductNameInCategoryPage"> |
| 136 | + <argument name="productName" value="{{SimpleProduct.name}}"/> |
| 137 | + </actionGroup> |
| 138 | + </test> |
| 139 | +</tests> |
0 commit comments