|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright 2024 Adobe |
| 5 | + * All Rights Reserved. |
| 6 | + */ |
| 7 | +--> |
| 8 | +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> |
| 10 | + <actionGroup name="AdminUpdateCategoryDisplaySettingsWithCustomValuesActionGroup"> |
| 11 | + <annotations> |
| 12 | + <description>Update Category Display settings with custom values (unchecks Use Config first)</description> |
| 13 | + </annotations> |
| 14 | + <arguments> |
| 15 | + <argument name="availableSortOptions" type="string" defaultValue="Product Name"/> |
| 16 | + <argument name="defaultSortingOption" type="string" defaultValue="name"/> |
| 17 | + <argument name="priceRange" type="string" defaultValue="5.5"/> |
| 18 | + </arguments> |
| 19 | + <!-- Select Display Setting and fill the options --> |
| 20 | + <scrollTo selector="{{CategoryDisplaySettingsSection.DisplaySettingTab}}" x="0" y="-80" |
| 21 | + stepKey="scrollToDisplaySetting"/> |
| 22 | + <waitForElementVisible selector="{{CategoryDisplaySettingsSection.DisplaySettingTab}}" |
| 23 | + stepKey="waitForDisplaySettingTab"/> |
| 24 | + <click selector="{{CategoryDisplaySettingsSection.DisplaySettingTab}}" stepKey="selectDisplaySetting"/> |
| 25 | + <waitForPageLoad stepKey="waitForDisplaySettingsSectionLoad"/> |
| 26 | + <!-- Uncheck Use Config for Available Sort Options and set custom value --> |
| 27 | + <waitForElementVisible selector="{{CategoryDisplaySettingsSection.productListCheckBox}}" |
| 28 | + stepKey="waitForAvailableSortCheckbox"/> |
| 29 | + <uncheckOption selector="{{CategoryDisplaySettingsSection.productListCheckBox}}" |
| 30 | + stepKey="uncheckUseConfigForAvailableSort"/> |
| 31 | + <waitForElementVisible selector="{{CategoryDisplaySettingsSection.productList}}" |
| 32 | + stepKey="waitForAvailableSortDropdown"/> |
| 33 | + <selectOption selector="{{CategoryDisplaySettingsSection.productList}}" |
| 34 | + parameterArray="[{{availableSortOptions}}]" stepKey="selectAvailableSortOptions"/> |
| 35 | + <!-- Uncheck Use Config for Default Sort Option and set custom value --> |
| 36 | + <scrollTo selector="{{CategoryDisplaySettingsSection.defaultProductLisCheckBox}}" x="0" y="-80" |
| 37 | + stepKey="scrollToDefaultSortSection"/> |
| 38 | + <waitForElementVisible selector="{{CategoryDisplaySettingsSection.defaultProductLisCheckBox}}" |
| 39 | + stepKey="waitForDefaultSortCheckbox"/> |
| 40 | + <uncheckOption selector="{{CategoryDisplaySettingsSection.defaultProductLisCheckBox}}" |
| 41 | + stepKey="uncheckUseConfigForDefaultSort"/> |
| 42 | + <waitForElementVisible selector="{{CategoryDisplaySettingsSection.defaultProductList}}" |
| 43 | + stepKey="waitForDefaultSortDropdown"/> |
| 44 | + <selectOption selector="{{CategoryDisplaySettingsSection.defaultProductList}}" |
| 45 | + userInput="{{defaultSortingOption}}" stepKey="selectDefaultSortOption"/> |
| 46 | + <!-- Uncheck Use Config for Price Range and set custom value --> |
| 47 | + <scrollTo selector="{{CategoryDisplaySettingsSection.layeredNavigationPriceCheckBox}}" x="0" y="-80" |
| 48 | + stepKey="scrollToPriceRangeSection"/> |
| 49 | + <waitForElementVisible selector="{{CategoryDisplaySettingsSection.layeredNavigationPriceCheckBox}}" |
| 50 | + stepKey="waitForPriceRangeCheckbox"/> |
| 51 | + <uncheckOption selector="{{CategoryDisplaySettingsSection.layeredNavigationPriceCheckBox}}" |
| 52 | + stepKey="uncheckUseConfigForPriceRange"/> |
| 53 | + <waitForElementVisible selector="{{CategoryDisplaySettingsSection.layeredNavigationPriceInput}}" |
| 54 | + stepKey="waitForPriceRangeInput"/> |
| 55 | + <fillField selector="{{CategoryDisplaySettingsSection.layeredNavigationPriceInput}}" userInput="{{priceRange}}" |
| 56 | + stepKey="fillPriceRange"/> |
| 57 | + </actionGroup> |
| 58 | +</actionGroups> |
0 commit comments