|
22 | 22 | <before>
|
23 | 23 | <!-- Login as Admin -->
|
24 | 24 | <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/>
|
25 |
| - |
26 | 25 | <!-- Create Default Category -->
|
27 | 26 | <createData entity="_defaultCategory" stepKey="createCategory"/>
|
28 |
| - |
29 | 27 | <!-- Create an attribute with two options to be used in the first child product -->
|
30 | 28 | <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/>
|
31 | 29 | <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1">
|
|
34 | 32 | <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2">
|
35 | 33 | <requiredEntity createDataKey="createConfigProductAttribute"/>
|
36 | 34 | </createData>
|
37 |
| - |
38 | 35 | <!-- Add the attribute just created to default attribute set -->
|
39 | 36 | <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet">
|
40 | 37 | <requiredEntity createDataKey="createConfigProductAttribute"/>
|
41 | 38 | </createData>
|
42 |
| - |
43 | 39 | <!-- Get the first option of the attribute created -->
|
44 | 40 | <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1">
|
45 | 41 | <requiredEntity createDataKey="createConfigProductAttribute"/>
|
46 | 42 | </getData>
|
47 |
| - |
48 | 43 | <!-- Get the second option of the attribute created -->
|
49 | 44 | <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2">
|
50 | 45 | <requiredEntity createDataKey="createConfigProductAttribute"/>
|
51 | 46 | </getData>
|
52 |
| - |
53 | 47 | <!-- Create Configurable product -->
|
54 | 48 | <createData entity="BaseConfigurableProduct" stepKey="createConfigProduct">
|
55 | 49 | <requiredEntity createDataKey="createCategory"/>
|
56 | 50 | </createData>
|
57 |
| - |
58 | 51 | <!-- Create a simple product and give it the attribute with the first option -->
|
59 | 52 | <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1">
|
60 | 53 | <requiredEntity createDataKey="createConfigProductAttribute"/>
|
61 | 54 | <requiredEntity createDataKey="getConfigAttributeOption1"/>
|
62 | 55 | </createData>
|
63 |
| - |
64 | 56 | <!--Create a simple product and give it the attribute with the second option -->
|
65 | 57 | <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2">
|
66 | 58 | <requiredEntity createDataKey="createConfigProductAttribute"/>
|
67 | 59 | <requiredEntity createDataKey="getConfigAttributeOption2"/>
|
68 | 60 | </createData>
|
69 |
| - |
70 | 61 | <!-- Create the configurable product -->
|
71 | 62 | <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption">
|
72 | 63 | <requiredEntity createDataKey="createConfigProduct"/>
|
73 | 64 | <requiredEntity createDataKey="createConfigProductAttribute"/>
|
74 | 65 | <requiredEntity createDataKey="getConfigAttributeOption1"/>
|
75 | 66 | <requiredEntity createDataKey="getConfigAttributeOption2"/>
|
76 | 67 | </createData>
|
77 |
| - |
78 | 68 | <!-- Add the first simple product to the configurable product -->
|
79 | 69 | <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1">
|
80 | 70 | <requiredEntity createDataKey="createConfigProduct"/>
|
81 | 71 | <requiredEntity createDataKey="createConfigChildProduct1"/>
|
82 | 72 | </createData>
|
83 |
| - |
84 | 73 | <!-- Add the second simple product to the configurable product -->
|
85 | 74 | <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2">
|
86 | 75 | <requiredEntity createDataKey="createConfigProduct"/>
|
87 | 76 | <requiredEntity createDataKey="createConfigChildProduct2"/>
|
88 | 77 | </createData>
|
89 |
| - |
90 | 78 | <!-- ConfigProduct -->
|
91 | 79 | <!-- Go to Product Page (ConfigProduct) -->
|
92 | 80 | <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToConfigProduct">
|
93 | 81 | <argument name="productId" value="$$createConfigProduct.id$$"/>
|
94 | 82 | </actionGroup>
|
95 |
| - |
96 | 83 | <!--Switch to 'Default Store View' scope and open product page-->
|
97 | 84 | <actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="SwitchDefaultStoreViewForConfigProduct">
|
98 | 85 | <argument name="storeViewName" value="'Default Store View'"/>
|
99 | 86 | </actionGroup>
|
100 |
| - |
101 | 87 | <!-- Add images for ConfigProduct -->
|
102 | 88 | <actionGroup ref="AddProductImageActionGroup" stepKey="addConfigProductMagento3">
|
103 | 89 | <argument name="image" value="Magento3"/>
|
104 | 90 | </actionGroup>
|
105 |
| - |
106 | 91 | <actionGroup ref="AddProductImageActionGroup" stepKey="addConfigProductTestImageAdobe">
|
107 | 92 | <argument name="image" value="TestImageAdobe"/>
|
108 | 93 | </actionGroup>
|
109 | 94 | <actionGroup ref="AdminAssignImageBaseRoleActionGroup" stepKey="assignTestImageAdobeBaseRole">
|
110 | 95 | <argument name="image" value="TestImageAdobe"/>
|
111 | 96 | </actionGroup>
|
112 |
| - |
113 | 97 | <!-- Save changes fot ConfigProduct -->
|
114 | 98 | <actionGroup ref="SaveProductFormActionGroup" stepKey="saveConfigProductProduct"/>
|
115 |
| - |
116 | 99 | <!-- ChildProduct1 -->
|
117 | 100 | <!-- Go to Product Page (ChildProduct1) -->
|
118 | 101 | <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToChildProduct1">
|
119 | 102 | <argument name="productId" value="$$createConfigChildProduct1.id$$"/>
|
120 | 103 | </actionGroup>
|
121 |
| - |
122 | 104 | <!--Switch to 'Default Store View' scope and open product page-->
|
123 | 105 | <actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="SwitchDefaultStoreViewForChildProduct1">
|
124 | 106 | <argument name="storeViewName" value="'Default Store View'"/>
|
125 | 107 | </actionGroup>
|
126 |
| - |
127 | 108 | <!-- Add images for ChildProduct1 -->
|
128 | 109 | <actionGroup ref="AddProductImageActionGroup" stepKey="addChildProduct1ProductImage">
|
129 |
| - <argument name="image" value="ProductImage"/> |
| 110 | + <argument name="image" value="TestImageNew"/> |
130 | 111 | </actionGroup>
|
131 | 112 | <actionGroup ref="AddProductImageActionGroup" stepKey="addChildProduct1Magento2">
|
132 | 113 | <argument name="image" value="Magento2"/>
|
133 | 114 | </actionGroup>
|
134 | 115 | <actionGroup ref="AdminAssignImageRolesActionGroup" stepKey="assignMagento2Role">
|
135 | 116 | <argument name="image" value="Magento2"/>
|
136 | 117 | </actionGroup>
|
137 |
| - |
138 | 118 | <!-- Save changes fot ChildProduct1 -->
|
139 | 119 | <actionGroup ref="SaveProductFormActionGroup" stepKey="saveChildProduct1Product"/>
|
140 |
| - |
141 | 120 | <!-- ChildProduct2 -->
|
142 | 121 | <!-- Go to Product Page (ChildProduct2) -->
|
143 | 122 | <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToChildProduct2">
|
144 | 123 | <argument name="productId" value="$$createConfigChildProduct2.id$$"/>
|
145 | 124 | </actionGroup>
|
146 |
| - |
147 | 125 | <!--Switch to 'Default Store View' scope and open product page-->
|
148 | 126 | <actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="SwitchDefaultStoreViewForChildProduct2">
|
149 | 127 | <argument name="storeViewName" value="'Default Store View'"/>
|
150 | 128 | </actionGroup>
|
151 |
| - |
152 | 129 | <!-- Add image for ChildProduct2 -->
|
153 | 130 | <actionGroup ref="AddProductImageActionGroup" stepKey="addChildProduct2TestImageNew">
|
154 | 131 | <argument name="image" value="TestImageNew"/>
|
155 | 132 | </actionGroup>
|
156 |
| - |
157 | 133 | <!-- Save changes fot ChildProduct2 -->
|
158 | 134 | <actionGroup ref="SaveProductFormActionGroup" stepKey="saveChildProduct2Product"/>
|
159 | 135 | </before>
|
|
165 | 141 | <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/>
|
166 | 142 | <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteAttribute"/>
|
167 | 143 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
|
168 |
| - |
169 | 144 | <!-- Reindex invalidated indices after product attribute has been created/deleted -->
|
170 | 145 | <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexInvalidatedIndices">
|
171 | 146 | <argument name="indices" value=""/>
|
172 | 147 | </actionGroup>
|
173 | 148 | </after>
|
174 |
| - |
175 | 149 | <!-- Open ConfigProduct in Store Front Page -->
|
176 | 150 | <amOnPage url="$$createConfigProduct.custom_attributes[url_key]$$.html" stepKey="openProductInStoreFront"/>
|
177 | 151 | <waitForPageLoad stepKey="waitForProductToLoad"/>
|
178 |
| - |
179 | 152 | <!-- Check fotorama thumbnail images (no selected options) -->
|
180 | 153 | <actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeMagento3ForNoOption">
|
181 | 154 | <argument name="fileName" value="{{Magento3.filename}}"/>
|
182 | 155 | </actionGroup>
|
183 |
| - |
184 | 156 | <actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeActiveTestImageAdobeForNoOption">
|
185 | 157 | <argument name="fileName" value="{{TestImageAdobe.filename}}"/>
|
186 | 158 | </actionGroup>
|
187 |
| - |
188 | 159 | <!-- Select first option -->
|
189 | 160 | <actionGroup ref="StorefrontProductPageSelectDropDownOptionValueActionGroup" stepKey="selectFirstOptionValue">
|
190 | 161 | <argument name="attributeLabel" value="$$createConfigProductAttribute.default_frontend_label$$"/>
|
191 | 162 | <argument name="optionLabel" value="$$getConfigAttributeOption1.label$$"/>
|
192 | 163 | </actionGroup>
|
193 |
| - |
194 | 164 | <!-- Check fotorama thumbnail images (first option selected) -->
|
195 | 165 | <actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeMagento3ForFirstOption">
|
196 | 166 | <argument name="fileName" value="{{Magento3.filename}}"/>
|
197 | 167 | </actionGroup>
|
198 |
| - |
199 | 168 | <actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeTestImageAdobeForFirstOption">
|
200 | 169 | <argument name="fileName" value="{{TestImageAdobe.filename}}"/>
|
201 | 170 | </actionGroup>
|
202 |
| - |
203 | 171 | <actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeProductImageForFirstOption">
|
204 |
| - <argument name="fileName" value="{{ProductImage.filename}}"/> |
| 172 | + <argument name="fileName" value="{{TestImageNew.filename}}"/> |
205 | 173 | </actionGroup>
|
206 |
| - |
207 | 174 | <!-- Check active fotorama thumbnail image (first option selected) -->
|
208 | 175 | <actionGroup ref="StorefrontAssertActiveProductImageActionGroup" stepKey="seeActiveMagento2ForFirstOption">
|
209 | 176 | <argument name="fileName" value="{{Magento2.filename}}"/>
|
210 | 177 | </actionGroup>
|
211 |
| - |
212 | 178 | <!-- Select second option -->
|
213 | 179 | <actionGroup ref="StorefrontProductPageSelectDropDownOptionValueActionGroup" stepKey="selectSecondOptionValue">
|
214 | 180 | <argument name="attributeLabel" value="$$createConfigProductAttribute.default_frontend_label$$"/>
|
215 | 181 | <argument name="optionLabel" value="$$getConfigAttributeOption2.label$$"/>
|
216 | 182 | </actionGroup>
|
217 |
| - |
218 | 183 | <!-- Check fotorama thumbnail images (second option selected) -->
|
219 | 184 | <actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeMagento3ForSecondOption">
|
220 | 185 | <argument name="fileName" value="{{Magento3.filename}}"/>
|
221 | 186 | </actionGroup>
|
222 |
| - |
223 | 187 | <actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeTestImageAdobeForSecondOption">
|
224 | 188 | <argument name="fileName" value="{{TestImageAdobe.filename}}"/>
|
225 | 189 | </actionGroup>
|
226 |
| - |
227 | 190 | <!-- Check active fotorama thumbnail image (second option selected) -->
|
228 | 191 | <actionGroup ref="StorefrontAssertActiveProductImageActionGroup" stepKey="seeActiveTestImageNewForSecondOption">
|
229 | 192 | <argument name="fileName" value="{{TestImageNew.filename}}"/>
|
|
0 commit comments