|
21 | 21 | <actionGroup ref="AdminGoToCacheManagementPageActionGroup" stepKey="goToCacheManagementPage"/> |
22 | 22 | <!--Verify Cache Type EAV Types And Attributes Is ENABLED --> |
23 | 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 | 24 | </before> |
31 | 25 | <after> |
32 | 26 | <!--Delete created entity --> |
33 | | - <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
34 | | - <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
35 | | - <actionGroup ref="DeleteProductAttributeActionGroup" stepKey="deleteCreatedAttribute"> |
36 | | - <argument name="ProductAttribute" value="newProductAttribute"/> |
| 27 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteFirstProduct"/> |
| 28 | + <actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="goToEditPage"> |
| 29 | + <argument name="ProductAttribute" value="{{multiselectProductAttribute.attribute_code}}"/> |
37 | 30 | </actionGroup> |
| 31 | + <actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteProductAttribute"/> |
38 | 32 | <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
39 | 33 | <argument name="indices" value=""/> |
40 | 34 | </actionGroup> |
41 | 35 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
42 | 36 | </after> |
43 | | - <!-- Open Product Index Page--> |
44 | | - <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/> |
45 | | - <!-- Select Created Product--> |
46 | | - <actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterProductGridBySku"> |
47 | | - <argument name="product" value="$$createSimpleProduct$$"/> |
| 37 | + <!-- Create Simple Product --> |
| 38 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct"/> |
| 39 | + <!--Navigate to Stores > Attributes > Product.--> |
| 40 | + <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="goToProductAttributes"/> |
| 41 | + <!--Create new Product Attribute as TextField, with code and default value.--> |
| 42 | + <actionGroup ref="CreateProductAttributeActionGroup" stepKey="createAttribute"> |
| 43 | + <argument name="attribute" value="multiselectProductAttribute"/> |
48 | 44 | </actionGroup> |
49 | | - <waitForElementVisible selector="{{AdminProductGridSection.productRowBySku($$createSimpleProduct.sku$$)}}" stepKey="waitForFirstProductToBeVisible"/> |
50 | | - <click selector="{{AdminProductGridSection.productRowBySku($$createSimpleProduct.sku$$)}}" stepKey="openFirstProduct"/> |
51 | | - <waitForPageLoad stepKey="waitForProductToLoad"/> |
52 | | - <actionGroup ref="AdminFillProductQtyOnProductFormActionGroup" stepKey="fillProductQty"> |
53 | | - <argument name="productQty" value="100"/> |
| 45 | + <!--Navigate to Product Attribute, add Product Options and Save - 1--> |
| 46 | + <actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="goToEditPage1"> |
| 47 | + <argument name="ProductAttribute" value="{{multiselectProductAttribute.attribute_code}}"/> |
54 | 48 | </actionGroup> |
55 | | - <actionGroup ref="AdminSetStockStatusActionGroup" stepKey="selectStockStatus"> |
56 | | - <argument name="stockStatus" value="In Stock"/> |
| 49 | + <actionGroup ref="CreateAttributeDropdownNthOptionActionGroup" stepKey="createOption1"> |
| 50 | + <argument name="adminName" value="{{multiselectProductAttribute.option1_admin}}"/> |
| 51 | + <argument name="frontName" value="{{multiselectProductAttribute.option1_frontend}}"/> |
| 52 | + <argument name="row" value="1"/> |
57 | 53 | </actionGroup> |
58 | | - <!-- Create New Product Attribute --> |
59 | | - <waitForElementVisible selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="waitForAttributeToBeVisible"/> |
60 | | - <click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickOnAddAttribute"/> |
61 | | - <waitForPageLoad stepKey="waitForAttributePageToLoad"/> |
62 | | - <click selector="{{AdminProductFormSection.createNewAttributeBtn}}" stepKey="clickCreateNewAttributeButton"/> |
63 | | - <waitForPageLoad stepKey="waitForNewAttributePageToLoad"/> |
64 | | - <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.defaultLabel}}" stepKey="waitForDefaultLabelToBeVisible"/> |
65 | | - <fillField selector="{{AdminCreateNewProductAttributeSection.defaultLabel}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="fillAttributeLabel"/> |
66 | | - <selectOption selector="{{AdminCreateNewProductAttributeSection.inputType}}" userInput="Text Field" stepKey="selectTextField"/> |
67 | | - <click selector="{{AdminCreateNewProductAttributeSection.advancedAttributeProperties}}" stepKey="clickOnAdvancedAttributeProperties"/> |
68 | | - <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.attributeCode}}" stepKey="waitForAttributeCodeToVisible"/> |
69 | | - <scrollTo selector="{{AdminCreateNewProductAttributeSection.attributeCode}}" stepKey="scrollToAttributeCode"/> |
70 | | - <fillField selector="{{AdminCreateNewProductAttributeSection.attributeCode}}" userInput="{{newProductAttribute.attribute_code}}" stepKey="fillAttributeCode"/> |
71 | | - <fillField selector="{{AdminCreateNewProductAttributeSection.defaultValue}}" userInput="{{ProductAttributeOption8.value}}" stepKey="fillDefaultValue"/> |
72 | | - <scrollTo selector="{{AdminCreateNewProductAttributeSection.isUnique}}" stepKey="scrollToIsUniqueOption"/> |
73 | | - <checkOption selector="{{AdminCreateNewProductAttributeSection.isUnique}}" stepKey="enableIsUniqueOption"/> |
74 | | - <scrollTo selector="{{AdminCreateNewProductAttributeSection.advancedAttributeProperties}}" stepKey="scrollToAdvancedAttributeProperties"/> |
75 | | - <click selector="{{AdminCreateNewProductAttributeSection.advancedAttributeProperties}}" stepKey="clickOnAdvancedAttributeProperties1"/> |
76 | | - <scrollTo selector="{{AdminCreateNewProductAttributeSection.storefrontProperties}}" stepKey="scrollToStorefrontProperties"/> |
77 | | - <click selector="{{AdminCreateNewProductAttributeSection.storefrontProperties}}" stepKey="clickOnStorefrontProperties"/> |
78 | | - <waitForPageLoad stepKey="waitForStoreFrontToLoad"/> |
79 | | - <scrollTo stepKey="scroll1" selector="{{AdminCreateNewProductAttributeSection.sortProductListing}}" x="0" y="-80"/> |
80 | | - <checkOption selector="{{AdminCreateNewProductAttributeSection.inSearch}}" stepKey="enableInSearchOption"/> |
81 | | - <checkOption selector="{{AdminCreateNewProductAttributeSection.advancedSearch}}" stepKey="enableAdvancedSearch"/> |
82 | | - <checkOption selector="{{AdminCreateNewProductAttributeSection.isComparable}}" stepKey="enableIsUComparableption"/> |
83 | | - <checkOption selector="{{AdminCreateNewProductAttributeSection.allowHtmlTags}}" stepKey="enableAllowHtmlTags"/> |
84 | | - <checkOption selector="{{AdminCreateNewProductAttributeSection.visibleOnStorefront}}" stepKey="enableVisibleOnStorefront"/> |
85 | | - <checkOption selector="{{AdminCreateNewProductAttributeSection.sortProductListing}}" stepKey="enableSortProductListing"/> |
86 | | - <scrollToTopOfPage stepKey="scrollToTopOfPage"/> |
87 | | - <click selector="{{AdminCreateNewProductAttributeSection.saveAttribute}}" stepKey="clickOnSaveAttribute"/> |
88 | | - <waitForPageLoad stepKey="waitForAttributeToSave"/> |
89 | | - <actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveTheProduct"/> |
90 | | - <waitForText selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/> |
91 | | - <actionGroup ref="AdminInputCustomAttributeToExistingProductActionGroup" stepKey="adminProductFillCustomAttribute"> |
92 | | - <argument name="attributeCode" value="{{newProductAttribute.attribute_code}}"/> |
93 | | - <argument name="adminOption1" value="{{ProductAttributeOption8.label}}"/> |
| 54 | + <actionGroup ref="AdminSetProductAttributeUseInLayeredNavigationOptionActionGroup" stepKey="setDropdownUseInLayeredNavigationNoResults"> |
| 55 | + <argument name="useInLayeredNavigationValue" value="Filterable (with results)"/> |
94 | 56 | </actionGroup> |
95 | | - <!--Verify product attribute added in product form --> |
96 | | - <scrollTo selector="{{AdminProductFormSection.contentTab}}" stepKey="scrollToContentTab"/> |
97 | | - <waitForElementVisible selector="{{AdminProductFormSection.attributeTab}}" stepKey="waitForAttributeToVisible"/> |
98 | | - <click selector="{{AdminProductFormSection.attributeTab}}" stepKey="clickOnAttribute"/> |
| 57 | + <selectOption selector="{{AdvancedAttributePropertiesSection.UseInSearch}}" userInput="Yes" stepKey="selectIsSearchAble"/> |
| 58 | + <selectOption selector="{{AttributePropertiesSection.useInSearchResultsLayeredNavigation}}" userInput="Yes" stepKey="selectUseInLayeredNavigationOption"/> |
| 59 | + <click stepKey="saveAttribute" selector="{{AttributePropertiesSection.Save}}"/> |
| 60 | + <!-- Open created product for edit --> |
| 61 | + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage"> |
| 62 | + <argument name="productId" value="$createSimpleProduct.id$"/> |
| 63 | + </actionGroup> |
| 64 | + <waitForPageLoad stepKey="waitForProductPageLoad"/> |
| 65 | + <click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickAddAttributeBtn"/> |
| 66 | + <waitForPageLoad stepKey="waitForAttributeAdded"/> |
| 67 | + <!-- Filter By Attribute Label on Add Attribute Page --> |
| 68 | + <click selector="{{AdminProductFiltersSection.filter}}" stepKey="clickOnFilter"/> |
| 69 | + <fillField selector="{{AdminProductAddAttributeModalSection.attributeCodeFilter}}" userInput="{{multiselectProductAttribute.attribute_code}}" stepKey="fillAttrCodeField" /> |
| 70 | + <click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="clickSearchBtn" /> |
| 71 | + <click stepKey="clickonFirstRow" selector="{{AdminProductAddAttributeModalSection.firstRowCheckBox}}"/> |
| 72 | + <click stepKey="clickOnAddSelected" selector="{{AdminProductAttributeGridSection.addSelected}}"/> |
| 73 | + <waitForPageLoad stepKey="waitForAttributeAdded2"/> |
| 74 | + <!-- Expand 'Attributes' tab --> |
| 75 | + <actionGroup ref="AdminExpandProductAttributesTabActionGroup" stepKey="expandAttributesTab"/> |
| 76 | + <!-- Check created attribute presents in the 'Attributes' tab --> |
| 77 | + <waitForElementVisible selector="{{AdminProductAttributesSection.attributeDropdownByCode(multiselectProductAttribute.attribute_code)}}" stepKey="assertAttributeIsPresentInTab"/> |
| 78 | + <!-- Select attribute options --> |
| 79 | + <selectOption selector="{{AdminProductAttributesSection.attributeDropdownByCode(multiselectProductAttribute.attribute_code)}}" userInput="{{multiselectProductAttribute.option1_admin}}" stepKey="selectProduct1AttributeOption"/> |
| 80 | + <!-- Save product --> |
| 81 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/> |
99 | 82 | <!--Verify Cache Type Page Cache Is INVALIDATED --> |
100 | 83 | <actionGroup ref="AdminGoToCacheManagementPageActionGroup" stepKey="goToCacheManagementPageAgain"/> |
101 | 84 | <waitForText selector="{{AdminMessagesSection.assertCacheManagementStatusInvalidated('FPC')}}" userInput="INVALIDATED" stepKey="verifyCacheTypePageCacheIsInvalidated"/> |
|
109 | 92 | <!--Verify Cache Type Page Cache s Is Enabled --> |
110 | 93 | <actionGroup ref="AdminGoToCacheManagementPageActionGroup" stepKey="goToCacheManagementPageAgain1"/> |
111 | 94 | <waitForText selector="{{AdminMessagesSection.assertCacheManagementStatusEnabled('FPC')}}" userInput="ENABLED" stepKey="verifyCacheTypePageCacheIsENABLED"/> |
112 | | - <!--Verify Product Attribute is present in Category Store Front Page --> |
113 | | - <!--Navigate To Product Storefront--> |
114 | | - <amOnPage url="$$createCategory.custom_attributes[url_key]$$.html" stepKey="goToStorefrontPageAgain"/> |
115 | | - <waitForPageLoad stepKey="waitForProductFrontPageToLoad1"/> |
116 | | - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName(SimpleSubCategory.name)}}" stepKey="clickOnCategory"/> |
117 | | - <waitForPageLoad stepKey="waitForCategoryPageToLoad"/> |
118 | | - <click selector="{{StorefrontCategoryMainSection.productLink}}" stepKey="openSearchedProduct"/> |
119 | | - <waitForPageLoad stepKey="waitForProductToLoad2"/> |
120 | | - <actionGroup ref="AssertStorefrontProductInfoMainProductNameActionGroup" stepKey="seeProductNameInStoreFront"> |
121 | | - <argument name="value" value="{{SimpleProduct.name}}"/> |
122 | | - </actionGroup> |
123 | | - <actionGroup ref="StorefrontAssertProductSkuOnProductPageActionGroup" stepKey="seeProductSkuInStoreFront"> |
124 | | - <argument name="productSku" value="{{SimpleProduct.sku}}"/> |
125 | | - </actionGroup> |
126 | | - <scrollTo selector="{{StorefrontProductMoreInformationSection.moreInformation}}" stepKey="scrollToMoreInformation"/> |
127 | | - <waitForText selector="{{StorefrontProductMoreInformationSection.attributeLabel}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="seeAttributeLabel"/> |
128 | | - <!--Verify Product Attribute present in search page --> |
129 | | - <amOnPage url="$$createCategory.custom_attributes[url_key]$$.html" stepKey="goToStorefrontPage1"/> |
130 | | - <waitForPageLoad stepKey="waitForProductFrontPageToLoad2"/> |
131 | | - <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillAttribute"> |
132 | | - <argument name="phrase" value="{{ProductAttributeOption8.value}}"/> |
133 | | - </actionGroup> |
134 | | - <actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProductNameInCategoryPage"> |
135 | | - <argument name="productName" value="{{SimpleProduct.name}}"/> |
| 95 | + <!-- Go to Storefront and search for product--> |
| 96 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToFrontPage"/> |
| 97 | + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="searchStorefront"> |
| 98 | + <argument name="phrase" value="$createSimpleProduct.name$"/> |
136 | 99 | </actionGroup> |
| 100 | + <!-- Assert custom Attribute in Layered Navigation--> |
| 101 | + <waitForElementVisible selector="{{StorefrontCategorySidebarSection.filterOptionsTitle(multiselectProductAttribute.attribute_code)}}" stepKey="waitForAttributeVisible"/> |
| 102 | + <conditionalClick selector="{{StorefrontCategorySidebarSection.filterOptionsTitle(multiselectProductAttribute.attribute_code)}}" dependentSelector="{{StorefrontCategorySidebarSection.activeFilterOptions}}" visible="false" stepKey="clickToExpandAttribute"/> |
| 103 | + <waitForElementVisible selector="{{StorefrontCategorySidebarSection.activeFilterOptions}}" stepKey="waitForAttributeOptionsVisible"/> |
137 | 104 | </test> |
138 | 105 | </tests> |
0 commit comments