Skip to content

Commit 8857800

Browse files
ManjushaManjusha
authored andcommitted
Merge branch 'AC-4300' into functional-testing-mainline-deployment
2 parents 67b323e + 06f9b8a commit 8857800

File tree

4 files changed

+95
-0
lines changed

4 files changed

+95
-0
lines changed

app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616
<element name="localeDisabled" type="select" selector="#general_locale_code[disabled=disabled]"/>
1717
<element name="useDefault" type="checkbox" selector="#general_locale_timezone_inherit"/>
1818
<element name="defaultLocale" type="checkbox" selector="#general_locale_code_inherit"/>
19+
<element name="checkIfTabExpand" type="button" selector="#general_locale-head:not(.open)"/>
20+
<element name="timeZoneDropdown" type="select" selector="//select[@id='general_locale_timezone']"/>
1921
</section>
2022
</sections>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminNavigateToDefaultLocaleSettingActionGroup">
12+
<annotations>
13+
<description>Goes to the 'Configuration' page for 'Locale Options'. Expands the 'Locale Options' section.</description>
14+
</annotations>
15+
16+
<amOnPage url="{{GeneralConfigurationPage.url}}" stepKey="navigateToLocaleConfigurationPage"/>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
<conditionalClick stepKey="expandLocaleOptions" selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.checkIfTabExpand}}" visible="true"/>
19+
<waitForElementVisible selector="{{LocaleOptionsSection.timezone}}" stepKey="waitForLocaleTimeZone"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="DateFiltersInCustomInstanceTimeZoneTest">
12+
<annotations>
13+
<features value="Config"/>
14+
<stories value="Verify that Date filters of new Data Grids in Admin provide relevant search results if custom Instance Timezone is set"/>
15+
<title value="Verify DateFilters"/>
16+
<description value="Verify that Date filters of new Data Grids in Admin provide relevant search results if custom Instance Timezone is set"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-4300"/>
19+
</annotations>
20+
<before>
21+
<!--Login To Admin panel-->
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
<!-- Go to *General > General > Locale Options* section -->
24+
<actionGroup ref="AdminNavigateToDefaultLocaleSettingActionGroup" stepKey="redirect"/>
25+
<!--Set needed Timezone-->
26+
<selectOption userInput="New Zealand Standard Time (Antarctica/McMurdo)" selector="{{LocaleOptionsSection.timeZoneDropdown}}" stepKey="selectOption1"/>
27+
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfiguration"/>
28+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/>
29+
</before>
30+
<after>
31+
<actionGroup ref="AdminNavigateToDefaultLocaleSettingActionGroup" stepKey="redirectAgain"/>
32+
<selectOption userInput="Central Standard Time (America/Chicago)" selector="{{LocaleOptionsSection.timeZoneDropdown}}" stepKey="selectDefaultoption"/>
33+
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfiguration"/>
34+
<!-- Delete customer -->
35+
<actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer">
36+
<argument name="customerEmail" value="Simple_US_Customer.email"/>
37+
</actionGroup>
38+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/>
39+
</after>
40+
<!-- Create Customer -->
41+
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="signUpNewUser">
42+
<argument name="Customer" value="Simple_US_Customer"/>
43+
</actionGroup>
44+
<!--Login to Admin-->
45+
<actionGroup ref="AdminLoginActionGroup" stepKey="adminLogin"/>
46+
<!--Go to *Customers > All Customers* page-->
47+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToAllCustomerPage">
48+
<argument name="menuUiId" value="{{AdminMenuCustomers.dataUiId}}"/>
49+
<argument name="submenuUiId" value="{{AdminMenuCustomersAllCustomers.dataUiId}}"/>
50+
</actionGroup>
51+
<!--Clear Filters if Present on Customer Grid Page-->
52+
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickOnButtonToRemoveFiltersIfPresent"/>
53+
<!-- Click on Filters-->
54+
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="clickOnFilters"/>
55+
<!-- Generate Today's Date to set in filter-->
56+
<!--<generateDate date="now" format="m/d/Y" stepKey="today"/>-->
57+
<generateDate date="now" format="m/j/Y" timezone="Antarctica/McMurdo" stepKey="today"/>
58+
<!--Set the *Customer Since* filter From Date-->
59+
<fillField selector="{{AdminDataGridHeaderSection.dateFilterFrom}}" userInput="{$today}" stepKey="fillDateFrom"/>
60+
<!--Set the *Customer Since* filter To Date-->
61+
<fillField selector="{{AdminDataGridHeaderSection.dateFilterTo}}" userInput="{$today}" stepKey="fillDateto"/>
62+
<!-- Apply Filter-->
63+
<actionGroup ref="AdminGridFilterApplyActionGroup" stepKey="applyFilter"/>
64+
<!--Customer *A* is present in the grid-->
65+
<actionGroup ref="AdminAssertCustomerInCustomersGrid" stepKey="assertCustomer1InGrid">
66+
<argument name="text" value="{{Simple_US_Customer.email}}"/>
67+
<argument name="row" value="1"/>
68+
</actionGroup>
69+
</test>
70+
</tests>

app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridHeaderSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
<element name="cancelFilters" type="button" selector="button[data-action='grid-filter-cancel']" timeout="30"/>
2121
<element name="applyFilters" type="button" selector="button[data-action='grid-filter-apply']" timeout="30"/>
2222
<element name="clearFilters" type="button" selector=".admin__data-grid-header [data-action='grid-filter-reset']" timeout="30"/>
23+
<element name="dateFilterFrom" type="input" selector="//input[@name='created_at[from]']"/>
24+
<element name="dateFilterTo" type="input" selector="//input[@name='created_at[to]']"/>
2325
<!--Grid view bookmarks-->
2426
<element name="bookmarkToggle" type="button" selector="div.admin__data-grid-action-bookmarks button[data-bind='toggleCollapsible']" timeout="30"/>
2527
<element name="bookmarkToggleByIndex" type="button" selector="(//div[contains(@class,'admin__data-grid-action-bookmarks')])[{{index}}]//button[@data-bind='toggleCollapsible']" parameterized="true" timeout="30"/>

0 commit comments

Comments
 (0)