|
| 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 | +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> |
| 10 | + <actionGroup name="AdminOrderChangeByCustomerEmailActionGroup"> |
| 11 | + <annotations> |
| 12 | + <description> |
| 13 | + Goes to the Admin Orders grid page and changes all orders found by Customer Email field. |
| 14 | + </description> |
| 15 | + </annotations> |
| 16 | + <arguments> |
| 17 | + <argument name="customerEmail" type="string"/> |
| 18 | + <argument name="actionLabel" type="string" defaultValue="Cancel"/> |
| 19 | + </arguments> |
| 20 | + |
| 21 | + <!-- Go to orders page, clear filters --> |
| 22 | + <amOnPage url="{{AdminOrdersPage.url}}" stepKey="goToOrdersPage"/> |
| 23 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 24 | + <conditionalClick |
| 25 | + selector="{{AdminDataGridFilterSection.clear}}" |
| 26 | + dependentSelector="{{AdminDataGridFilterSection.clear}}" |
| 27 | + visible="true" |
| 28 | + stepKey="clearFiltersIfPresent" |
| 29 | + /> |
| 30 | + <waitForLoadingMaskToDisappear stepKey="waitAfterClearFilters"/> |
| 31 | + |
| 32 | + <!-- Show Customer Email column in the grid --> |
| 33 | + <click selector="{{AdminDataGridHeaderSection.columnsToggle}}" stepKey="openOrderColumns"/> |
| 34 | + <checkOption |
| 35 | + selector="{{AdminDataGridHeaderSection.columnCheckbox('Customer Email')}}" |
| 36 | + stepKey="showCustomerEmailColumn" |
| 37 | + /> |
| 38 | + <click selector="{{AdminDataGridHeaderSection.columnsToggle}}" stepKey="closeOrderColumns"/> |
| 39 | + <seeElement |
| 40 | + selector="{{AdminDataGridTableSection.columnHeader('Customer Email')}}" |
| 41 | + stepKey="seeCustomerEmailColumnInGrid" |
| 42 | + /> |
| 43 | + |
| 44 | + <!-- Filter orders by Customer Email --> |
| 45 | + <click selector="{{AdminDataGridFilterSection.filterExpand}}" stepKey="openOrderFilters"/> |
| 46 | + <fillField |
| 47 | + selector="{{AdminDataGridFilterSection.inputFieldByNameAttr('customer_email')}}" |
| 48 | + userInput="{{customerEmail}}" |
| 49 | + stepKey="fillCustomerEmailFilter" |
| 50 | + /> |
| 51 | + <click selector="{{AdminDataGridFilterSection.apply}}" stepKey="applyOrderFilters"/> |
| 52 | + <waitForLoadingMaskToDisappear stepKey="waitAfterApplyFilters"/> |
| 53 | + |
| 54 | + <!-- Change found orders --> |
| 55 | + <click selector="{{AdminGridSelectRows.multicheckDropdown}}" stepKey="openMulticheckDropdown"/> |
| 56 | + <click selector="{{AdminGridSelectRows.multicheckOption('Select All')}}" stepKey="selectAllOrders"/> |
| 57 | + <click selector="{{AdminGridSelectRows.bulkActionDropdown}}" stepKey="clickActionDropdown"/> |
| 58 | + <click selector="{{AdminGridSelectRows.bulkActionOption(actionLabel)}}" stepKey="clickActionLabel"/> |
| 59 | + <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage"/> |
| 60 | + </actionGroup> |
| 61 | +</actionGroups> |
0 commit comments