|
8 | 8 |
|
9 | 9 | <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
10 | 10 | xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
|
11 |
| - |
12 |
| - |
13 | 11 | <test name="AdminConfigurableProductDeleteTest">
|
14 | 12 | <annotations>
|
15 | 13 | <features value="ConfigurableProduct"/>
|
|
21 | 19 | </annotations>
|
22 | 20 |
|
23 | 21 | <before>
|
| 22 | + <!-- TODO: This should be converted to an actionGroup once MQE-993 is fixed. --> |
24 | 23 | <createData entity="ApiCategory" stepKey="createCategory"/>
|
25 |
| - <createData entity="ApiConfigurableProduct" stepKey="createProduct"> |
| 24 | + <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> |
26 | 25 | <requiredEntity createDataKey="createCategory"/>
|
27 | 26 | </createData>
|
| 27 | + <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> |
| 28 | + <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> |
| 29 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 30 | + </createData> |
| 31 | + <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> |
| 32 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 33 | + </createData> |
| 34 | + <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> |
| 35 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 36 | + </createData> |
| 37 | + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> |
| 38 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 39 | + </getData> |
| 40 | + <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2"> |
| 41 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 42 | + </getData> |
| 43 | + <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1"> |
| 44 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 45 | + <requiredEntity createDataKey="getConfigAttributeOption1"/> |
| 46 | + </createData> |
| 47 | + <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2"> |
| 48 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 49 | + <requiredEntity createDataKey="getConfigAttributeOption2"/> |
| 50 | + </createData> |
| 51 | + <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> |
| 52 | + <requiredEntity createDataKey="createConfigProduct"/> |
| 53 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 54 | + <requiredEntity createDataKey="getConfigAttributeOption1"/> |
| 55 | + <requiredEntity createDataKey="getConfigAttributeOption2"/> |
| 56 | + </createData> |
| 57 | + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> |
| 58 | + <requiredEntity createDataKey="createConfigProduct"/> |
| 59 | + <requiredEntity createDataKey="createConfigChildProduct1"/> |
| 60 | + </createData> |
| 61 | + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> |
| 62 | + <requiredEntity createDataKey="createConfigProduct"/> |
| 63 | + <requiredEntity createDataKey="createConfigChildProduct2"/> |
| 64 | + </createData> |
28 | 65 | </before>
|
29 | 66 |
|
30 | 67 | <after>
|
31 | 68 | <amOnPage url="admin/admin/auth/logout/" stepKey="logout"/>
|
32 |
| - <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 69 | + <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> |
| 70 | + <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> |
| 71 | + <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> |
33 | 72 | </after>
|
34 | 73 |
|
35 | 74 | <!-- assert product visible in storefront -->
|
36 |
| - <amOnPage url="$$createProduct.sku$$.html" stepKey="gotoStorefront1"/> |
| 75 | + <amOnPage url="$$createConfigProduct.sku$$.html" stepKey="gotoStorefront1"/> |
37 | 76 | <waitForPageLoad stepKey="wait1"/>
|
38 |
| - <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="$$createProduct.name$$" stepKey="seeProduct"/> |
| 77 | + <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="$$createConfigProduct.name$$" stepKey="seeProduct"/> |
39 | 78 |
|
40 | 79 | <!-- go to admin and delete -->
|
41 | 80 | <actionGroup ref="LoginAsAdmin" stepKey="login"/>
|
|
53 | 92 | <see selector="{{AdminProductMessagesSection.successMessage}}" userInput="A total of 1 record(s) have been deleted." stepKey="seeSuccessMsg"/>
|
54 | 93 |
|
55 | 94 | <!-- after delete, assert product page is 404 -->
|
56 |
| - <amOnPage url="$$createProduct.sku$$.html" stepKey="gotoStorefront2"/> |
| 95 | + <amOnPage url="$$createConfigProduct.sku$$.html" stepKey="gotoStorefront2"/> |
57 | 96 | <waitForPageLoad stepKey="wait3"/>
|
58 | 97 | <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
|
59 |
| - <dontSee selector="{{StorefrontProductInfoMainSection.productName}}" userInput="$$createProduct.name$$" stepKey="dontSeeProduct"/> |
| 98 | + <dontSee selector="{{StorefrontProductInfoMainSection.productName}}" userInput="$$createConfigProduct.name$$" stepKey="dontSeeProduct"/> |
60 | 99 | </test>
|
61 | 100 |
|
62 |
| - |
63 | 101 | <test name="AdminConfigurableProductBulkDeleteTest">
|
64 | 102 | <annotations>
|
65 | 103 | <features value="ConfigurableProduct"/>
|
|
71 | 109 | </annotations>
|
72 | 110 |
|
73 | 111 | <before>
|
| 112 | + <!-- TODO: Parts of this should be converted to an actionGroup once MQE-993 is fixed. --> |
| 113 | + <!-- Create shared category and attribute --> |
74 | 114 | <createData entity="ApiCategory" stepKey="createCategory"/>
|
| 115 | + <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> |
| 116 | + <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> |
| 117 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 118 | + </createData> |
| 119 | + <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> |
| 120 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 121 | + </createData> |
| 122 | + <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> |
| 123 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 124 | + </createData> |
| 125 | + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> |
| 126 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 127 | + </getData> |
| 128 | + <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2"> |
| 129 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 130 | + </getData> |
| 131 | + |
| 132 | + <!-- Create first of three configurable products --> |
75 | 133 | <createData entity="ApiConfigurableProduct" stepKey="createProduct1">
|
76 | 134 | <requiredEntity createDataKey="createCategory"/>
|
77 | 135 | </createData>
|
| 136 | + <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1"> |
| 137 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 138 | + <requiredEntity createDataKey="getConfigAttributeOption1"/> |
| 139 | + </createData> |
| 140 | + <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2"> |
| 141 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 142 | + <requiredEntity createDataKey="getConfigAttributeOption2"/> |
| 143 | + </createData> |
| 144 | + <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption1"> |
| 145 | + <requiredEntity createDataKey="createProduct1"/> |
| 146 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 147 | + <requiredEntity createDataKey="getConfigAttributeOption1"/> |
| 148 | + <requiredEntity createDataKey="getConfigAttributeOption2"/> |
| 149 | + </createData> |
| 150 | + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> |
| 151 | + <requiredEntity createDataKey="createProduct1"/> |
| 152 | + <requiredEntity createDataKey="createConfigChildProduct1"/> |
| 153 | + </createData> |
| 154 | + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> |
| 155 | + <requiredEntity createDataKey="createProduct1"/> |
| 156 | + <requiredEntity createDataKey="createConfigChildProduct2"/> |
| 157 | + </createData> |
| 158 | + |
| 159 | + <!-- Create second configurable product --> |
78 | 160 | <createData entity="ApiConfigurableProduct" stepKey="createProduct2">
|
79 | 161 | <requiredEntity createDataKey="createCategory"/>
|
80 | 162 | </createData>
|
| 163 | + <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct3"> |
| 164 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 165 | + <requiredEntity createDataKey="getConfigAttributeOption1"/> |
| 166 | + </createData> |
| 167 | + <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct4"> |
| 168 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 169 | + <requiredEntity createDataKey="getConfigAttributeOption2"/> |
| 170 | + </createData> |
| 171 | + <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption2"> |
| 172 | + <requiredEntity createDataKey="createProduct2"/> |
| 173 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 174 | + <requiredEntity createDataKey="getConfigAttributeOption1"/> |
| 175 | + <requiredEntity createDataKey="getConfigAttributeOption2"/> |
| 176 | + </createData> |
| 177 | + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild3"> |
| 178 | + <requiredEntity createDataKey="createProduct2"/> |
| 179 | + <requiredEntity createDataKey="createConfigChildProduct3"/> |
| 180 | + </createData> |
| 181 | + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild4"> |
| 182 | + <requiredEntity createDataKey="createProduct2"/> |
| 183 | + <requiredEntity createDataKey="createConfigChildProduct4"/> |
| 184 | + </createData> |
| 185 | + |
| 186 | + <!-- Create third configurable product --> |
81 | 187 | <createData entity="ApiConfigurableProduct" stepKey="createProduct3">
|
82 | 188 | <requiredEntity createDataKey="createCategory"/>
|
83 | 189 | </createData>
|
| 190 | + <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct5"> |
| 191 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 192 | + <requiredEntity createDataKey="getConfigAttributeOption1"/> |
| 193 | + </createData> |
| 194 | + <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct6"> |
| 195 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 196 | + <requiredEntity createDataKey="getConfigAttributeOption2"/> |
| 197 | + </createData> |
| 198 | + <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption3"> |
| 199 | + <requiredEntity createDataKey="createProduct3"/> |
| 200 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 201 | + <requiredEntity createDataKey="getConfigAttributeOption1"/> |
| 202 | + <requiredEntity createDataKey="getConfigAttributeOption2"/> |
| 203 | + </createData> |
| 204 | + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild5"> |
| 205 | + <requiredEntity createDataKey="createProduct3"/> |
| 206 | + <requiredEntity createDataKey="createConfigChildProduct5"/> |
| 207 | + </createData> |
| 208 | + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild6"> |
| 209 | + <requiredEntity createDataKey="createProduct3"/> |
| 210 | + <requiredEntity createDataKey="createConfigChildProduct6"/> |
| 211 | + </createData> |
| 212 | + |
84 | 213 | <actionGroup ref="LoginAsAdmin" stepKey="login"/>
|
85 | 214 | </before>
|
86 | 215 |
|
87 | 216 | <after>
|
88 | 217 | <amOnPage url="admin/admin/auth/logout/" stepKey="logout"/>
|
| 218 | + <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> |
| 219 | + <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> |
| 220 | + <deleteData createDataKey="createConfigChildProduct3" stepKey="deleteConfigChildProduct3"/> |
| 221 | + <deleteData createDataKey="createConfigChildProduct4" stepKey="deleteConfigChildProduct4"/> |
| 222 | + <deleteData createDataKey="createConfigChildProduct5" stepKey="deleteConfigChildProduct5"/> |
| 223 | + <deleteData createDataKey="createConfigChildProduct6" stepKey="deleteConfigChildProduct6"/> |
| 224 | + <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> |
89 | 225 | <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
|
90 | 226 | </after>
|
91 | 227 |
|
|
123 | 259 | <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops3"/>
|
124 | 260 | <dontSee selector="{{StorefrontProductInfoMainSection.productName}}" userInput="$$createProduct1.name$$" stepKey="dontSeeProduct3"/>
|
125 | 261 | </test>
|
126 |
| - |
127 |
| - |
128 | 262 | </tests>
|
0 commit comments