File tree Expand file tree Collapse file tree 8 files changed +152
-0
lines changed
app/code/Magento/AdvancedSearch/Test/Mftf Expand file tree Collapse file tree 8 files changed +152
-0
lines changed Original file line number Diff line number Diff line change
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 =" AdminSaveNewSearchTermActionGroup" >
12
+ <annotations >
13
+ <description >Navigate to search terms grid and create a new search term from Magento admin.</description >
14
+ </annotations >
15
+ <!-- Navigate to search terms grid -->
16
+ <amOnPage url =" {{AdminSearchTermsGridPage.url}}" stepKey =" amOnSearchTermsGrid" />
17
+ <waitForPageLoad stepKey =" waitForPageLoad1" />
18
+
19
+ <!-- Click add new search term button -->
20
+ <click selector =" {{AdminSearchTermsPageGridActionsSection.addNewSearchTerm}}" stepKey =" clickAddNewSearchTermButton" />
21
+ <waitForPageLoad stepKey =" waitForPageLoad2" />
22
+
23
+ <!-- Fill form fields -->
24
+ <fillField selector =" {{AdminSearchTermsPageFormFieldsSection.query_text}}" userInput =" {{SearchTerms.searchQuery}}" stepKey =" fillFieldSearchQuery" />
25
+ <selectOption selector =" {{AdminSearchTermsPageFormFieldsSection.store_id}}" userInput =" {{SearchTerms.store}}" stepKey =" selectStoreView" />
26
+ <fillField selector =" {{AdminSearchTermsPageFormFieldsSection.redirect}}" userInput =" {{SearchTerms.redirectUrl}}" stepKey =" fillFieldRedirectUrl" />
27
+ <selectOption selector =" {{AdminSearchTermsPageFormFieldsSection.display_in_terms}}" userInput =" {{SearchTerms.suggestedTerms}}" stepKey =" selectSuggestedTerms" />
28
+
29
+ <!-- Click save action and verify success message -->
30
+ <click selector =" {{AdminSearchTermsPageFormActionsSection.saveSearchTerm}}" stepKey =" clickSaveSearchButton" />
31
+ <see userInput =" You saved the search term." stepKey =" assertSaveSearchTermSuccessMessage" />
32
+ </actionGroup >
33
+ </actionGroups >
Original file line number Diff line number Diff line change
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
+ <entities xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
10
+ xsi : noNamespaceSchemaLocation =" urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd" >
11
+ <entity name =" SearchTerms" >
12
+ <data key =" searchQuery" unique =" suffix" >books</data >
13
+ <data key =" store" >Default Store View</data >
14
+ <data key =" redirectUrl" >http://sample.com</data >
15
+ <data key =" suggestedTerms" >1</data >
16
+ </entity >
17
+ </entities >
Original file line number Diff line number Diff line change
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
+ <pages xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
10
+ xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Page/etc/PageObject.xsd" >
11
+ <page name =" AdminSearchTermsFormPage" url =" /search/term/new" area =" admin" module =" Magento_AdvancedSearch" >
12
+ <section name =" AdminSearchTermsPageFormActionsSection" />
13
+ <section name =" AdminSearchTermsPageFormFieldsSection" />
14
+ </page >
15
+ </pages >
Original file line number Diff line number Diff line change
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
+ <pages xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
10
+ xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Page/etc/PageObject.xsd" >
11
+ <page name =" AdminSearchTermsGridPage" url =" /search/term/" area =" admin" module =" Magento_AdvancedSearch" >
12
+ <section name =" AdminSearchTermsPageGridActionsSection" />
13
+ </page >
14
+ </pages >
Original file line number Diff line number Diff line change
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
+ <sections xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
10
+ xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Page/etc/SectionObject.xsd" >
11
+ <section name =" AdminSearchTermsPageFormActionsSection" >
12
+ <element name =" saveSearchTerm" type =" button" selector =" #save" timeout =" 30" />
13
+ </section >
14
+ </sections >
Original file line number Diff line number Diff line change
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
+ <sections xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
10
+ xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Page/etc/SectionObject.xsd" >
11
+ <section name =" AdminSearchTermsPageFormFieldsSection" >
12
+ <element name =" query_text" type =" input" selector =" #query_text" />
13
+ <element name =" store_id" type =" select" selector =" #store_id" />
14
+ <element name =" redirect" type =" input" selector =" #redirect" />
15
+ <element name =" display_in_terms" type =" select" selector =" #display_in_terms" />
16
+ </section >
17
+ </sections >
Original file line number Diff line number Diff line change
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
+ <sections xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
10
+ xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Page/etc/SectionObject.xsd" >
11
+ <section name =" AdminSearchTermsPageGridActionsSection" >
12
+ <element name =" addNewSearchTerm" type =" button" selector =" #add" timeout =" 30" />
13
+ </section >
14
+ </sections >
Original file line number Diff line number Diff line change
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 =" AdminAddSearchTermTest" >
12
+ <annotations >
13
+ <features value =" AdvancedSearch" />
14
+ <stories value =" Add a new search term" />
15
+ <title value =" Admin should be able to create a new search term" />
16
+ <description value =" Admin should be able to create a new search term using search terms grid" />
17
+ <severity value =" CRITICAL" />
18
+ <group value =" AdvancedSearch" />
19
+ </annotations >
20
+ <before >
21
+ <actionGroup ref =" LoginActionGroup" stepKey =" loginGetFromGeneralFile" />
22
+ </before >
23
+ <after >
24
+ <actionGroup ref =" logout" stepKey =" logout" />
25
+ </after >
26
+ <actionGroup ref =" AdminSaveNewSearchTermActionGroup" stepKey =" createNewSearchTerm" />
27
+ </test >
28
+ </tests >
You can’t perform that action at this time.
0 commit comments