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 =" ../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd" >
11
+ <test name =" AdminProductGridFilteringByDateAttributeTest" >
12
+ <annotations >
13
+ <title value =" Verify Set Product as new Filter input on Product Grid doesn't getreset to currentDate" />
14
+ <description value =" Data input in the new from date filter field should not change" />
15
+ <severity value =" MAJOR" />
16
+ <testCaseId value =" MAGETWO-92019" />
17
+ <group value =" product" />
18
+ </annotations >
19
+ <before >
20
+ <actionGroup ref =" LoginAsAdmin" stepKey =" loginAsAdmin" />
21
+ <createData entity =" SimpleProductWithNewFromDate" stepKey =" createSimpleProductWithDate" />
22
+ </before >
23
+ <after >
24
+ <deleteData createDataKey =" createSimpleProductWithDate" stepKey =" deleteProduct" />
25
+ <actionGroup ref =" logout" stepKey =" logoutOfAdmin" />
26
+ </after >
27
+ <amOnPage url =" {{AdminProductAttributeGridPage.url}}" stepKey =" navigateToProductAttribute" />
28
+ <waitForPageLoad stepKey =" wait1" />
29
+ <click selector =" {{AdminProductAttributeGridSection.ResetFilter}}" stepKey =" resetFiltersOnGrid" />
30
+ <fillField selector =" {{AdminProductAttributeGridSection.GridFilterFrontEndLabel}}" userInput =" Set Product as New from Date" stepKey =" setAttributeLabel" />
31
+ <click selector =" {{AdminProductAttributeGridSection.Search}}" stepKey =" searchForAttributeFromGrid" />
32
+ <click selector =" {{AdminProductAttributeGridSection.FirstRow}}" stepKey =" clickOnAttributeRow" />
33
+ <waitForPageLoad stepKey =" wait2" />
34
+ <click selector =" {{AttributePropertiesSection.AdvancedProperties}}" stepKey =" openAdvancedPropertiesTab" />
35
+ <selectOption selector =" #is_filterable_in_grid" userInput =" Yes" stepKey =" isFilterableInGrid" />
36
+ <click selector =" {{AttributePropertiesSection.Save}}" stepKey =" saveAttribute" />
37
+ <waitForPageLoad stepKey =" waitForSaveAttribute" />
38
+ <actionGroup ref =" ClearCacheActionGroup" stepKey =" clearCache" />
39
+ <amOnPage url =" {{AdminProductIndexPage.url}}" stepKey =" navigateToProductIndex" />
40
+ <waitForPageLoad time =" 30" stepKey =" waitForProductGridPageLoad" />
41
+ <click selector =" {{AdminProductGridFilterSection.columnsDropdown}}" stepKey =" openColumnsdropDown1" />
42
+ <checkOption selector =" {{AdminProductGridFilterSection.viewColumnOption('Set Product as New from Date')}}" stepKey =" showProductAsNewColumn" />
43
+ <click selector =" {{AdminProductGridFilterSection.columnsDropdown}}" stepKey =" closeColumnsDropdown1" />
44
+ <seeElement selector =" {{AdminProductGridSection.columnHeader('Set Product as New from Date')}}" stepKey =" seeNewFromDateColumn" />
45
+ <waitForPageLoad stepKey =" waitforFiltersToApply" />
46
+ <actionGroup ref =" filterProductGridBySetNewFromDate" stepKey =" filterProductGridToCheckSetAsNewColumn" />
47
+ <click selector =" {{AdminProductGridSection.firstRow}}" stepKey =" clickOnFirstRowProductGrid" />
48
+ <waitForPageLoad stepKey =" waitForProductEditPageToLoad" />
49
+ <actionGroup ref =" AdminFormSaveAndClose" stepKey =" saveAndCloseProductForm" />
50
+ <click selector =" {{AdminProductGridFilterSection.filters}}" stepKey =" expandFilters" />
51
+ <seeInField selector =" {{AdminProductGridFilterSection.newFromDateFilter}}" userInput =" 05/16/2018" stepKey =" checkForNewFromDate" />
52
+ <click selector =" {{AdminProductGridFilterSection.columnsDropdown}}" stepKey =" openColumnsDropdown2" />
53
+ <uncheckOption selector =" {{AdminProductGridFilterSection.viewColumnOption('Set Product as New from Date')}}" stepKey =" hideProductAsNewColumn" />
54
+ <dontSeeElement selector =" {{AdminProductGridSection.columnHeader('Set Product as New from Date')}}" stepKey =" dontSeeNewFromDateColumn" />
55
+ <click selector =" {{AdminProductGridFilterSection.columnsDropdown}}" stepKey =" closeColumnsDropdown2" />
56
+ <click selector =" {{AdminProductGridFilterSection.clearAll}}" stepKey =" clearGridFilters" />
57
+ </test >
58
+ </tests >
0 commit comments