Skip to content

Commit ad9e9e0

Browse files
JhalakMathurshashikant.kumar
authored andcommitted
AC-4300
1 parent 9187ec1 commit ad9e9e0

File tree

3 files changed

+92
-0
lines changed

3 files changed

+92
-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: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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="NavigateToDefaultLocaleSettingActionGroup">
12+
<annotations>
13+
<description>Goes to the 'Configuration' page for 'Locale'. Expands the 'Locale Layouts' section.</description>
14+
</annotations>
15+
16+
<amOnPage url="{{GeneralConfigurationPage.url}}" stepKey="navigateToLocaleConfigurationPage"/>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
<scrollTo selector="{{LocaleOptionsSection.sectionHeader}}" stepKey="scrollToAnchor"/>
19+
<conditionalClick stepKey="expandDefaultLayouts" selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.CheckIfTabExpand}}" visible="true"/>
20+
<waitForElementVisible selector="{{LocaleOptionsSection.timezone}}" stepKey="waitForLocaleTimeZone"/>
21+
</actionGroup>
22+
</actionGroups>
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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="LocaleTest"/>
14+
<stories value="Verify that Date filters of new Data Grids in Admin (ex: Customers) 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 (ex: Customers) 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="NavigateToDefaultLocaleSettingActionGroup" stepKey="redirect"/>
25+
<!--Set needed Timezone-->
26+
<selectOption userInput="New Zealand Standard Time (Antarctica/McMurdo)" selector="{{LocaleOptionsSection.timeZoneDropdown}}" stepKey="selectOption1"/>
27+
<!-- Logout From Admin Panel-->
28+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
29+
</before>
30+
<after>
31+
<actionGroup ref="NavigateToDefaultLocaleSettingActionGroup" stepKey="redirectAgain"/>
32+
<selectOption userInput="Central Standard Time (America/Chicago)" selector="{{LocaleOptionsSection.timeZoneDropdown}}" stepKey="selectDefaultoption"/>
33+
<!-- Delete customer -->
34+
<actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer">
35+
<argument name="customerEmail" value="CustomerEntityOne.email"/>
36+
</actionGroup>
37+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/>
38+
</after>
39+
<!-- Create Customer -->
40+
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="signUpNewUser">
41+
<argument name="Customer" value="CustomerEntityOne"/>
42+
</actionGroup>
43+
<!--Login to Admin-->
44+
<actionGroup ref="AdminLoginActionGroup" stepKey="adminLogin"/>
45+
<!--Go to *Customers > All Customers* page-->
46+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToAllCustomerPage">
47+
<argument name="menuUiId" value="{{AdminMenuCustomers.dataUiId}}"/>
48+
<argument name="submenuUiId" value="{{AdminMenuCustomersAllCustomers.dataUiId}}"/>
49+
</actionGroup>
50+
<!--Clear Filters if Present on Customer Grid Page-->
51+
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickOnButtonToRemoveFiltersIfPresent"/>
52+
<!-- Click on Filters-->
53+
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="clickOnFilters"/>
54+
<!-- Generate Today's Date to set in filter-->
55+
<generateDate date="now" format="m/d/Y" stepKey="today"/>
56+
<!--Set the *Customer Since* filter From Date-->
57+
<fillField selector="{{AdminDataGridHeaderSection.dateFilterFrom}}" userInput="{$today}" stepKey="fillDateFrom"/>
58+
<!--Set the *Customer Since* filter To Date-->
59+
<fillField selector="{{AdminDataGridHeaderSection.dateFilterTo}}" userInput="{$today}" stepKey="fillDateto"/>
60+
<!-- Apply Filter-->
61+
<actionGroup ref="AdminGridFilterApplyActionGroup" stepKey="applyFilter"/>
62+
<!--Customer *A* is present in the grid-->
63+
<actionGroup ref="AdminAssertCustomerInCustomersGrid" stepKey="assertCustomer1InGrid">
64+
<argument name="text" value="{{CustomerEntityOne.email}}"/>
65+
<argument name="row" value="1"/>
66+
</actionGroup>
67+
</test>
68+
</tests>

0 commit comments

Comments
 (0)