|
38 | 38 | <createData entity="CatalogAttributeSet" stepKey="createAttributeSet"/> |
39 | 39 | <!-- Step4: Create Text Attribute with used for Sorting in Product Listing as No --> |
40 | 40 | <createData entity="textAttributeWithNoProductSortListing" stepKey="createTextProductAttribute"/> |
41 | | - |
42 | 41 | <!-- Step5: Create Date Attribute with used for Sorting in Product Listing as No --> |
43 | 42 | <createData entity="dateAttributeWithNoProductSortListing" stepKey="createDateProductAttribute"/> |
44 | 43 | <!-- Step6: Create Yes / No Attribute with used for Sorting in Product Listing as No --> |
|
75 | 74 | <argument name="usedForSortingInProductListing" value="No"/> |
76 | 75 | </actionGroup> |
77 | 76 | <actionGroup ref="SaveProductAttributeActionGroup" stepKey="saveDropdownProductAttributeWith2Options"/> |
78 | | - |
79 | 77 | <!-- Step9: Create Price Attribute with used for Sorting in Product Listing as No --> |
80 | 78 | <createData entity="priceAttributeWithNoProductSortListing" stepKey="createPriceProductAttribute"/> |
81 | 79 | <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openPriceAttributeFromSearchResultInGrid"> |
|
86 | 84 | </actionGroup> |
87 | 85 | <selectOption selector="{{AttributePropertiesSection.useInLayeredNavigation}}" userInput="Filterable (with results)" stepKey="setDropdownUseInLayeredNavigationAsNoForPriceAttribute"/> |
88 | 86 | <actionGroup ref="SaveProductAttributeActionGroup" stepKey="saveForPriceAttribute"/> |
89 | | - |
90 | 87 | <!-- Step9.1: Grab all the product attribute names --> |
91 | 88 | <actionGroup ref="SearchAttributeByCodeOnProductAttributeGridActionGroup" stepKey="navigateToProductAttributeGridToGrabTextAttributeName"> |
92 | 89 | <argument name="productAttributeCode" value="attr"/> |
|
97 | 94 | <grabTextFrom selector="{{AdminProductAttributeGridSection.attributeNameInGrid('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}" stepKey="grabMultiSelectAttributeName"/> |
98 | 95 | <grabTextFrom selector="{{AdminProductAttributeGridSection.attributeNameInGrid('$$createDropdownProductAttributeWith2Options.attribute_code$$')}}" stepKey="grabDropdownAttributeName"/> |
99 | 96 | <grabTextFrom selector="{{AdminProductAttributeGridSection.attributeNameInGrid('$$createPriceProductAttribute.attribute_code$$')}}" stepKey="grabPriceAttributeName"/> |
100 | | - |
101 | 97 | <!-- Step10-13: Add all the created 6 attributes to the created attribute set --> |
102 | 98 | <actionGroup ref="AdminOpenAttributeSetGridPageActionGroup" stepKey="openAttributeSetPage"/> |
103 | 99 | <actionGroup ref="GoToAttributeSetByNameActionGroup" stepKey="OpenAttributeSet"> |
|
128 | 124 | <argument name="attribute" value="$$createPriceProductAttribute.attribute_code$$"/> |
129 | 125 | </actionGroup> |
130 | 126 | <actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveAttributeSet"/> |
131 | | - |
132 | 127 | <!-- Step 14-20: Create 2 simple products with above created attribute set--> |
133 | 128 | <createData entity="_defaultCategory" stepKey="createCategory"/> |
134 | 129 | <createData entity="_defaultProduct" stepKey="createSimpleProduct1"> |
|
139 | 134 | <requiredEntity createDataKey="createCategory"/> |
140 | 135 | <field key="attribute_set_id">$$createAttributeSet.attribute_set_id$$</field> |
141 | 136 | </createData> |
142 | | - |
143 | 137 | <generateDate date="now" format="m/d/Y" stepKey="generateCurrentDate"/> |
144 | 138 | <generateDate date="-1 day" format="m/d/Y" stepKey="generateYesterdayDate"/> |
145 | | - |
146 | 139 | <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndexPageToEditProduct1"/> |
147 | 140 | <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditSimpleProduct1"> |
148 | 141 | <argument name="product" value="$$createSimpleProduct1$$"/> |
|
154 | 147 | <fillField selector="{{AdminProductFormSection.customTextAttribute('$$createPriceProductAttribute.attribute_code$$')}}" userInput="123" stepKey="setValueForCustomPriceAttributeForSimpleProduct1"/> |
155 | 148 | <conditionalClick selector="{{AdminProductFormSection.customSwitcherAttribute('$$createYesNoProductAttribute.attribute_code$$','1')}}" dependentSelector="{{AdminProductFormSection.customSwitcherAttribute('$$createYesNoProductAttribute.attribute_code$$','1')}}" visible="true" stepKey="selectNoForCustomYesNoAttributeForSimpleProduct1"/> |
156 | 149 | <actionGroup ref="SaveProductFormActionGroup" stepKey="saveSimpleProduct1"/> |
157 | | - |
158 | 150 | <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndexPageToEditProduct2"/> |
159 | 151 | <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditSimpleProduct2"> |
160 | 152 | <argument name="product" value="$$createSimpleProduct2$$"/> |
|
166 | 158 | <fillField selector="{{AdminProductFormSection.customTextAttribute('$$createPriceProductAttribute.attribute_code$$')}}" userInput="456" stepKey="setValueForCustomPriceAttributeForSimpleProduct2"/> |
167 | 159 | <conditionalClick selector="{{AdminProductFormSection.customSwitcherAttribute('$$createYesNoProductAttribute.attribute_code$$','0')}}" dependentSelector="{{AdminProductFormSection.customSwitcherAttribute('$$createYesNoProductAttribute.attribute_code$$','0')}}" visible="true" stepKey="selectNoForCustomYesNoAttributeForSimpleProduct2"/> |
168 | 160 | <actionGroup ref="SaveProductFormActionGroup" stepKey="saveSimpleProduct2"/> |
169 | | - |
170 | 161 | <!-- Clear index and flush cache --> |
171 | 162 | <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex1"> |
172 | 163 | <argument name="indices" value=""/> |
173 | 164 | </actionGroup> |
174 | 165 | <actionGroup ref="CliCacheFlushActionGroup" stepKey="cleanCacheAsCleanUp"> |
175 | 166 | <argument name="tags" value="config full_page"/> |
176 | 167 | </actionGroup> |
177 | | - |
178 | 168 | <!-- Step 21-23: Navigate to the category on storefront and assert the created Products--> |
179 | 169 | <actionGroup ref="StorefrontNavigateToCategoryUrlActionGroup" stepKey="NavigateToCategoryPageOnStoreFront"> |
180 | 170 | <argument name="categoryUrl" value="$$createCategory.custom_attributes[url_key]$$"/> |
|
187 | 177 | <argument name="productName" value="$$createSimpleProduct2.name$$"/> |
188 | 178 | <argument name="index" value="2"/> |
189 | 179 | </actionGroup> |
190 | | - |
191 | 180 | <!-- Step 24: Verify the Sort by dropdown options --> |
192 | 181 | <click selector="{{StorefrontCategoryMainSection.sortedBy}}" stepKey="clickOnSortByDropdown"/> |
193 | 182 | <waitForElementVisible selector="{{StorefrontCategoryMainSection.sortByDropdownContent('Position')}}" stepKey="assertPositionOptionInDropdown"/> |
194 | 183 | <waitForElementVisible selector="{{StorefrontCategoryMainSection.sortByDropdownContent('Product Name')}}" stepKey="assertProductNameOptionInDropdown"/> |
195 | 184 | <waitForElementVisible selector="{{StorefrontCategoryMainSection.sortByDropdownContent('Price')}}" stepKey="assertPriceOptionInDropdown"/> |
196 | | - |
197 | 185 | <!-- Step 25: Check the list of attributes in the Layered Navigation Section --> |
198 | 186 | <waitForElementVisible selector="{{StorefrontCategorySidebarSection.expandLayeredNavigationAttribute('{$grabDropdownAttributeName}')}}" stepKey="assertDropdownAttributeInLayeredNavigation"/> |
199 | 187 | <waitForElementVisible selector="{{StorefrontCategorySidebarSection.expandLayeredNavigationAttribute('{$grabMultiSelectAttributeName}')}}" stepKey="assertMultiSelectAttributeInLayeredNavigation"/> |
200 | 188 | <waitForElementVisible selector="{{StorefrontCategorySidebarSection.expandLayeredNavigationAttribute('{$grabPriceAttributeName}')}}" stepKey="assertPriceAttributeInLayeredNavigation"/> |
201 | 189 | <waitForElementNotVisible selector="{{StorefrontCategorySidebarSection.expandLayeredNavigationAttribute('{$grabTextAttributeName}')}}" stepKey="assertTextAttributeNotPresentInLayeredNavigation"/> |
202 | 190 | <waitForElementNotVisible selector="{{StorefrontCategorySidebarSection.expandLayeredNavigationAttribute('{$grabDateAttributeName}')}}" stepKey="assertDateAttributeNotPresentInLayeredNavigation"/> |
203 | 191 | <waitForElementNotVisible selector="{{StorefrontCategorySidebarSection.expandLayeredNavigationAttribute('{$grabYesNoAttributeName}')}}" stepKey="assertYesNoAttributeNotPresentInLayeredNavigation"/> |
204 | | - |
205 | 192 | <!-- Step 26-27: Check the list of options in the Attributes dropdown in the Layered Navigation Section --> |
206 | 193 | <conditionalClick selector="{{StorefrontCategorySidebarSection.expandLayeredNavigationAttribute('{$grabMultiSelectAttributeName}')}}" dependentSelector="{{StorefrontCategorySidebarSection.expandLayeredNavigationAttribute('{$grabMultiSelectAttributeName}')}}" visible="true" stepKey="expandMultiAttr"/> |
207 | 194 | <waitForElementVisible selector="{{StorefrontCategorySidebarSection.layeredNavigationAttributeOptions('{$grabMultiSelectAttributeName}','option1')}}" stepKey="seeMultiAttrOption1"/> |
208 | 195 | <waitForElementVisible selector="{{StorefrontCategorySidebarSection.layeredNavigationAttributeOptions('{$grabMultiSelectAttributeName}','option2')}}" stepKey="seeMultiAttrOption2"/> |
209 | 196 | <conditionalClick selector="{{StorefrontCategorySidebarSection.expandLayeredNavigationAttribute('{$grabDropdownAttributeName}')}}" dependentSelector="{{StorefrontCategorySidebarSection.expandLayeredNavigationAttribute('{$grabDropdownAttributeName}')}}" visible="true" stepKey="expandDropdownAttr"/> |
210 | 197 | <waitForElementVisible selector="{{StorefrontCategorySidebarSection.layeredNavigationAttributeOptions('{$grabDropdownAttributeName}','option3')}}" stepKey="seeDropdownAttrOption1"/> |
211 | 198 | <waitForElementVisible selector="{{StorefrontCategorySidebarSection.layeredNavigationAttributeOptions('{$grabDropdownAttributeName}','option4')}}" stepKey="seeDropdownAttrOption2"/> |
212 | | - |
213 | 199 | <!-- Step 28-29: Update the dropdown product attributes --> |
214 | 200 | <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openDropdownProductAttributeFromSearchResultInGrid"> |
215 | 201 | <argument name="productAttributeCode" value="$$createDropdownProductAttributeWith2Options.attribute_code$$"/> |
|
219 | 205 | </actionGroup> |
220 | 206 | <selectOption selector="{{AttributePropertiesSection.useInLayeredNavigation}}" userInput="No" stepKey="setDropdownUseInLayeredNavigationAsNo"/> |
221 | 207 | <actionGroup ref="SaveProductAttributeActionGroup" stepKey="saveDropdownProductAttributeWith2OptionsPostUpdate"/> |
222 | | - |
223 | 208 | <!-- Step 30: Update the multiSelect product attributes --> |
224 | 209 | <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openMultiSelectProductAttributeFromSearchResultInGrid"> |
225 | 210 | <argument name="productAttributeCode" value="$$createMultiSelectProductAttributeWith2Options.attribute_code$$"/> |
|
229 | 214 | </actionGroup> |
230 | 215 | <selectOption selector="{{AttributePropertiesSection.useInLayeredNavigation}}" userInput="No" stepKey="setDropdownUseInLayeredNavigationAsNoForMultiSelectAttribute"/> |
231 | 216 | <actionGroup ref="SaveProductAttributeActionGroup" stepKey="saveMultiSelectProductAttributeWith2OptionsPostUpdate"/> |
232 | | - |
233 | 217 | <!-- Step 31: Update the text, date, price and YesNo product attributes --> |
234 | 218 | <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openTextProductAttributeFromSearchResultInGrid"> |
235 | 219 | <argument name="productAttributeCode" value="$$createTextProductAttribute.attribute_code$$"/> |
|
238 | 222 | <argument name="usedForSortingInProductListing" value="Yes"/> |
239 | 223 | </actionGroup> |
240 | 224 | <actionGroup ref="SaveProductAttributeActionGroup" stepKey="saveTextProductAttributePostUpdate"/> |
241 | | - |
242 | 225 | <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openDateProductAttributeFromSearchResultInGrid"> |
243 | 226 | <argument name="productAttributeCode" value="$$createDateProductAttribute.attribute_code$$"/> |
244 | 227 | </actionGroup> |
245 | 228 | <actionGroup ref="AdminUpdateAttributeUsedForSortingInProductListingActionGroup" stepKey="setDateProductUsedForSortingInProductListingAttributeAsYes"> |
246 | 229 | <argument name="usedForSortingInProductListing" value="Yes"/> |
247 | 230 | </actionGroup> |
248 | 231 | <actionGroup ref="SaveProductAttributeActionGroup" stepKey="saveDateProductAttributePostUpdate"/> |
249 | | - |
250 | 232 | <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openPriceProductAttributeFromSearchResultInGrid"> |
251 | 233 | <argument name="productAttributeCode" value="$$createPriceProductAttribute.attribute_code$$"/> |
252 | 234 | </actionGroup> |
253 | 235 | <actionGroup ref="AdminUpdateAttributeUsedForSortingInProductListingActionGroup" stepKey="setPriceProductUsedForSortingInProductListingAttributeAsYes"> |
254 | 236 | <argument name="usedForSortingInProductListing" value="Yes"/> |
255 | 237 | </actionGroup> |
256 | 238 | <actionGroup ref="SaveProductAttributeActionGroup" stepKey="savePriceProductAttributePostUpdate"/> |
257 | | - |
258 | 239 | <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openYesNoProductAttributeFromSearchResultInGrid"> |
259 | 240 | <argument name="productAttributeCode" value="$$createYesNoProductAttribute.attribute_code$$"/> |
260 | 241 | </actionGroup> |
261 | 242 | <actionGroup ref="AdminUpdateAttributeUsedForSortingInProductListingActionGroup" stepKey="setYesNoProductUsedForSortingInProductListingAttributeAsYes"> |
262 | 243 | <argument name="usedForSortingInProductListing" value="Yes"/> |
263 | 244 | </actionGroup> |
264 | 245 | <actionGroup ref="SaveProductAttributeActionGroup" stepKey="saveYesNoProductAttributePostUpdate"/> |
265 | | - |
266 | 246 | <!-- Step 32 Clear index and flush cache --> |
267 | 247 | <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexPostUpdatingTheAttribute"> |
268 | 248 | <argument name="indices" value=""/> |
269 | 249 | </actionGroup> |
270 | 250 | <actionGroup ref="CliCacheFlushActionGroup" stepKey="cleanCachePostUpdatingTheAttributes"> |
271 | 251 | <argument name="tags" value="config full_page"/> |
272 | 252 | </actionGroup> |
273 | | - |
274 | 253 | <!-- Step 33-35: Verify the Sort by dropdown options is updated --> |
275 | 254 | <actionGroup ref="StorefrontNavigateToCategoryUrlActionGroup" stepKey="NavigateToCategoryPageOnStoreFrontPostUpdatingProductAttributes"> |
276 | 255 | <argument name="categoryUrl" value="$$createCategory.custom_attributes[url_key]$$"/> |
|
281 | 260 | <waitForElementNotVisible selector="{{StorefrontCategorySidebarSection.expandLayeredNavigationAttribute('{$grabTextAttributeName}')}}" stepKey="assertTextAttributeNotPresentInLayeredNavigationPostAttributeUpdate"/> |
282 | 261 | <waitForElementNotVisible selector="{{StorefrontCategorySidebarSection.expandLayeredNavigationAttribute('{$grabDateAttributeName}')}}" stepKey="assertDateAttributeNotPresentInLayeredNavigationPostAttributeUpdate"/> |
283 | 262 | <waitForElementNotVisible selector="{{StorefrontCategorySidebarSection.expandLayeredNavigationAttribute('{$grabYesNoAttributeName}')}}" stepKey="assertYesNoAttributeNotPresentInLayeredNavigationPostAttributeUpdate"/> |
284 | | - |
285 | 263 | <click selector="{{StorefrontCategoryMainSection.sortedBy}}" stepKey="clickOnSortByDropdownForUpdatedProductAttributesList"/> |
286 | 264 | <waitForElementVisible selector="{{StorefrontCategoryMainSection.sortByDropdownContent('Position')}}" stepKey="assertPositionOptionInDropdownPostUpdatingProductAttributesList"/> |
287 | 265 | <waitForElementVisible selector="{{StorefrontCategoryMainSection.sortByDropdownContent('Product Name')}}" stepKey="assertProductNameOptionInDropdownPostUpdatingProductAttributesList"/> |
|
291 | 269 | <waitForElementVisible selector="{{StorefrontCategoryMainSection.sortByDropdownContent('{$grabPriceAttributeName}')}}" stepKey="assertPriceAttributeOptionInDropdownPostUpdatingProductAttributesList"/> |
292 | 270 | <waitForElementVisible selector="{{StorefrontCategoryMainSection.sortByDropdownContent('{$grabYesNoAttributeName}')}}" stepKey="assertYesNoAttributeOptionInDropdownPostUpdatingProductAttributesList"/> |
293 | 271 | <waitForElementVisible selector="{{StorefrontCategoryMainSection.sortByDropdownContent('{$grabDropdownAttributeName}')}}" stepKey="assertDropdownAttributeOptionInDropdownPostUpdatingProductAttributesList"/> |
294 | | - |
295 | 272 | <!-- Step 36-40: Verify the Product indexing by Sorting --> |
296 | 273 | <actionGroup ref="AssertProductSortingBasedOnAttributesInStorefrontCategoryPageActionGroup" stepKey="SortsTheProductsBasedOnTextAttributeFiltersOnStorefront"> |
297 | 274 | <argument name="product1" value="$createSimpleProduct1$"/> |
|
0 commit comments