|
| 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="StorefrontPartialWordQuickSearchStemmingTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Search"/> |
| 14 | + <stories value="Partial Word search using Elasticsearch"/> |
| 15 | + <title value="Partial word search should match only the documents that contain the words of a provided text, in the same order as provided"/> |
| 16 | + <description value="Partial word search should match only the documents that contain the words of a provided text, in the same order as provided"/> |
| 17 | + <severity value="AVERAGE"/> |
| 18 | + <testCaseId value="MC-41570"/> |
| 19 | + <useCaseId value="MC-40981"/> |
| 20 | + <group value="SearchEngineElasticsearch"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <!--Create category--> |
| 24 | + <createData entity="SimpleSubCategory" stepKey="category1"/> |
| 25 | + <!--Create product1--> |
| 26 | + <createData entity="SimpleProduct" stepKey="product1"> |
| 27 | + <field key="name">5127SS YALE JUNIOR KNOB ENTRANCE SET 5 PINS SATIN STAI</field> |
| 28 | + <requiredEntity createDataKey="category1"/> |
| 29 | + </createData> |
| 30 | + <!--Create product2--> |
| 31 | + <createData entity="SimpleProduct" stepKey="product2"> |
| 32 | + <field key="name">5127AC YALE JUNIOR KNOB ENTRANCE SET 5 PINS ANTIQUE CO</field> |
| 33 | + <requiredEntity createDataKey="category1"/> |
| 34 | + </createData> |
| 35 | + <!--Create product3--> |
| 36 | + <createData entity="SimpleProduct" stepKey="product3"> |
| 37 | + <field key="name">5127AB YALE JUNIOR KNOB ENTRANCE SET 5 PINS ANTIQUE BRASS</field> |
| 38 | + <requiredEntity createDataKey="category1"/> |
| 39 | + </createData> |
| 40 | + <!--Create product4--> |
| 41 | + <createData entity="SimpleProduct" stepKey="product4"> |
| 42 | + <field key="sku">5127SS-YALE</field> |
| 43 | + <requiredEntity createDataKey="category1"/> |
| 44 | + </createData> |
| 45 | + <!--Create product5--> |
| 46 | + <createData entity="SimpleProduct" stepKey="product5"> |
| 47 | + <field key="sku">5127AC-CO</field> |
| 48 | + <requiredEntity createDataKey="category1"/> |
| 49 | + </createData> |
| 50 | + <!--Create product6--> |
| 51 | + <createData entity="SimpleProduct" stepKey="product6"> |
| 52 | + <field key="sku">5127AB-BRASS</field> |
| 53 | + <requiredEntity createDataKey="category1"/> |
| 54 | + </createData> |
| 55 | + </before> |
| 56 | + <after> |
| 57 | + <!--Delete category--> |
| 58 | + <deleteData createDataKey="category1" stepKey="deleteCategory"/> |
| 59 | + <!--Delete product1--> |
| 60 | + <deleteData createDataKey="product1" stepKey="deleteProduct1"/> |
| 61 | + <!--Delete product2--> |
| 62 | + <deleteData createDataKey="product2" stepKey="deleteProduct2"/> |
| 63 | + <!--Delete product3--> |
| 64 | + <deleteData createDataKey="product3" stepKey="deleteProduct3"/> |
| 65 | + <!--Delete product4--> |
| 66 | + <deleteData createDataKey="product4" stepKey="deleteProduct4"/> |
| 67 | + <!--Delete product5--> |
| 68 | + <deleteData createDataKey="product5" stepKey="deleteProduct5"/> |
| 69 | + <!--Delete product6--> |
| 70 | + <deleteData createDataKey="product6" stepKey="deleteProduct6"/> |
| 71 | + </after> |
| 72 | + <!--Navigate to home page--> |
| 73 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/> |
| 74 | + <!--Search for word "5127S"--> |
| 75 | + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="search1"> |
| 76 | + <argument name="phrase" value="5127S"/> |
| 77 | + </actionGroup> |
| 78 | + <!--Assert that product1 is present in the search result--> |
| 79 | + <actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProduct1"> |
| 80 | + <argument name="productName" value="$$product1.name$$"/> |
| 81 | + </actionGroup> |
| 82 | + <!--Assert that product2 is not present in the search result--> |
| 83 | + <actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProduct2"> |
| 84 | + <argument name="productName" value="$$product2.name$$"/> |
| 85 | + </actionGroup> |
| 86 | + <!--Assert that product2 is not present in the search result--> |
| 87 | + <actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProduct3"> |
| 88 | + <argument name="productName" value="$$product3.name$$"/> |
| 89 | + </actionGroup> |
| 90 | + <!--Assert that product4 is present in the search result--> |
| 91 | + <actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProduct4"> |
| 92 | + <argument name="productName" value="$$product4.name$$"/> |
| 93 | + </actionGroup> |
| 94 | + <!--Assert that product5 is not present in the search result--> |
| 95 | + <actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProduct5"> |
| 96 | + <argument name="productName" value="$$product5.name$$"/> |
| 97 | + </actionGroup> |
| 98 | + <!--Assert that product6 is not present in the search result--> |
| 99 | + <actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProduct6"> |
| 100 | + <argument name="productName" value="$$product6.name$$"/> |
| 101 | + </actionGroup> |
| 102 | + |
| 103 | + <!--Search for word "5127A"--> |
| 104 | + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="search2"> |
| 105 | + <argument name="phrase" value="5127A"/> |
| 106 | + </actionGroup> |
| 107 | + <!--Assert that product1 is not present in the search result--> |
| 108 | + <actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProduct1"> |
| 109 | + <argument name="productName" value="$$product1.name$$"/> |
| 110 | + </actionGroup> |
| 111 | + <!--Assert that product2 is present in the search result--> |
| 112 | + <actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProduct2"> |
| 113 | + <argument name="productName" value="$$product2.name$$"/> |
| 114 | + </actionGroup> |
| 115 | + <!--Assert that product3 is present in the search result--> |
| 116 | + <actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProduct3"> |
| 117 | + <argument name="productName" value="$$product3.name$$"/> |
| 118 | + </actionGroup> |
| 119 | + <!--Assert that product4 is not present in the search result--> |
| 120 | + <actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProduct4"> |
| 121 | + <argument name="productName" value="$$product4.name$$"/> |
| 122 | + </actionGroup> |
| 123 | + <!--Assert that product5 is present in the search result--> |
| 124 | + <actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProduct5"> |
| 125 | + <argument name="productName" value="$$product5.name$$"/> |
| 126 | + </actionGroup> |
| 127 | + <!--Assert that product6 is present in the search result--> |
| 128 | + <actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProduct6"> |
| 129 | + <argument name="productName" value="$$product6.name$$"/> |
| 130 | + </actionGroup> |
| 131 | + |
| 132 | + <!--Search for word "5127SS"--> |
| 133 | + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="search3"> |
| 134 | + <argument name="phrase" value="5127SS"/> |
| 135 | + </actionGroup> |
| 136 | + <!--Assert that product1 is present in the search result--> |
| 137 | + <actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProduct1b"> |
| 138 | + <argument name="productName" value="$$product1.name$$"/> |
| 139 | + </actionGroup> |
| 140 | + <!--Assert that product2 is not present in the search result--> |
| 141 | + <actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProduct2b"> |
| 142 | + <argument name="productName" value="$$product2.name$$"/> |
| 143 | + </actionGroup> |
| 144 | + <!--Assert that product3 is not present in the search result--> |
| 145 | + <actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProduct3b"> |
| 146 | + <argument name="productName" value="$$product3.name$$"/> |
| 147 | + </actionGroup> |
| 148 | + <!--Assert that product4 is present in the search result--> |
| 149 | + <actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProduct4b"> |
| 150 | + <argument name="productName" value="$$product4.name$$"/> |
| 151 | + </actionGroup> |
| 152 | + <!--Assert that product5 is not present in the search result--> |
| 153 | + <actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProduct5b"> |
| 154 | + <argument name="productName" value="$$product5.name$$"/> |
| 155 | + </actionGroup> |
| 156 | + <!--Assert that product6 is not present in the search result--> |
| 157 | + <actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProduct6b"> |
| 158 | + <argument name="productName" value="$$product6.name$$"/> |
| 159 | + </actionGroup> |
| 160 | + </test> |
| 161 | +</tests> |
| 162 | + |
0 commit comments