|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <!-- |
3 | | - /** |
4 | | - * Copyright © Magento, Inc. All rights reserved. |
5 | | - * See COPYING.txt for license details. |
6 | | - */ |
| 3 | +/** |
| 4 | + * Copyright 2023 Adobe |
| 5 | + * All Rights Reserved. |
| 6 | + */ |
7 | 7 | --> |
8 | 8 |
|
9 | 9 | <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
25 | 25 | <!--Set needed Timezone--> |
26 | 26 | <selectOption userInput="New Zealand Standard Time (Antarctica/McMurdo)" selector="{{LocaleOptionsSection.timeZoneDropdown}}" stepKey="selectOption1"/> |
27 | 27 | <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfiguration"/> |
28 | | - <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/> |
| 28 | + <!-- Wait for configuration to be applied--> |
| 29 | + <waitForPageLoad stepKey="waitForConfigurationSave"/> |
| 30 | + <!-- Clear cache to ensure timezone change takes effect--> |
| 31 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCacheAfterTimezoneChange"> |
| 32 | + <argument name="tags" value="config full_page"/> |
| 33 | + </actionGroup> |
29 | 34 | </before> |
30 | 35 | <after> |
| 36 | + <!-- Go to *General > General > Locale Options* section --> |
31 | 37 | <actionGroup ref="AdminNavigateToDefaultLocaleSettingActionGroup" stepKey="redirectAgain"/> |
| 38 | + <!-- Reset timezone to default--> |
32 | 39 | <selectOption userInput="Central Standard Time (America/Chicago)" selector="{{LocaleOptionsSection.timeZoneDropdown}}" stepKey="selectDefaultoption"/> |
33 | | - <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfiguration"/> |
| 40 | + <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfigurationAgain"/> |
| 41 | + <!-- Clear cache to ensure default timezone change takes effect--> |
| 42 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCacheAfterDefaultTimezone"> |
| 43 | + <argument name="tags" value="config full_page"/> |
| 44 | + </actionGroup> |
| 45 | + <!-- Logout customer from storefront (if logged in) --> |
| 46 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> |
34 | 47 | <!-- Delete customer --> |
35 | | - <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer" /> |
36 | 48 | <actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer"> |
37 | 49 | <argument name="customerEmail" value="Simple_US_Customer.email"/> |
38 | 50 | </actionGroup> |
| 51 | + <!-- Logout from admin --> |
39 | 52 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/> |
40 | 53 | </after> |
41 | 54 | <!-- Create Customer --> |
42 | 55 | <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="signUpNewUser"> |
43 | 56 | <argument name="Customer" value="Simple_US_Customer"/> |
44 | 57 | </actionGroup> |
45 | | - <!--Login to Admin--> |
46 | | - <actionGroup ref="AdminLoginActionGroup" stepKey="adminLogin"/> |
47 | 58 | <!--Go to *Customers > All Customers* page--> |
48 | | - <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToAllCustomerPage"> |
49 | | - <argument name="menuUiId" value="{{AdminMenuCustomers.dataUiId}}"/> |
50 | | - <argument name="submenuUiId" value="{{AdminMenuCustomersAllCustomers.dataUiId}}"/> |
51 | | - </actionGroup> |
52 | | - <!--Clear Filters if Present on Customer Grid Page--> |
| 59 | + <amOnPage url="{{AdminCustomerPage.url}}" stepKey="GoToCustomerPage"/> |
| 60 | + <waitForPageLoad stepKey="waitForCustomersPage2"/> |
| 61 | + <!-- Clear Filters if Present on Customer Grid Page--> |
53 | 62 | <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickOnButtonToRemoveFiltersIfPresent"/> |
54 | 63 | <!-- Click on Filters--> |
55 | 64 | <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="clickOnFilters"/> |
| 65 | + <!--Wait for filter form to be visible--> |
| 66 | + <waitForElementVisible selector="{{AdminDataGridHeaderSection.dateFilterFrom}}" stepKey="waitForDateFilterFields"/> |
56 | 67 | <!-- Generate Today's Date to set in filter--> |
57 | 68 | <!--<generateDate date="now" format="m/d/Y" stepKey="today"/>--> |
58 | | - <generateDate date="now" format="m/j/Y" timezone="Antarctica/McMurdo" stepKey="today"/> |
| 69 | + <generateDate date="now" format="m/d/Y" timezone="Antarctica/McMurdo" stepKey="today"/> |
59 | 70 | <!--Set the *Customer Since* filter From Date--> |
60 | 71 | <fillField selector="{{AdminDataGridHeaderSection.dateFilterFrom}}" userInput="{$today}" stepKey="fillDateFrom"/> |
61 | 72 | <!--Set the *Customer Since* filter To Date--> |
62 | 73 | <fillField selector="{{AdminDataGridHeaderSection.dateFilterTo}}" userInput="{$today}" stepKey="fillDateto"/> |
63 | 74 | <!-- Apply Filter--> |
64 | 75 | <actionGroup ref="AdminGridFilterApplyActionGroup" stepKey="applyFilter"/> |
| 76 | + <!--Wait for grid to update after filter application--> |
| 77 | + <waitForPageLoad stepKey="waitForGridUpdate"/> |
65 | 78 | <!--Customer *A* is present in the grid--> |
66 | 79 | <actionGroup ref="AdminAssertCustomerInCustomersGrid" stepKey="assertCustomer1InGrid"> |
67 | 80 | <argument name="text" value="{{Simple_US_Customer.email}}"/> |
|
0 commit comments