18
18
<testCaseId value =" MAGETWO-59361" />
19
19
<group value =" Catalog" />
20
20
<group value =" Product Attributes" />
21
+ <group value =" SearchEngineElasticsearch" />
21
22
</annotations >
22
23
<before >
23
24
<actionGroup ref =" LoginActionGroup" stepKey =" loginAsAdmin" />
157
158
<actionGroup ref =" StorefrontCheckAdvancedSearchResultActionGroup" stepKey =" StorefrontCheckAdvancedSearchResultDefault2" />
158
159
<see userInput =" We can't find any items matching these search criteria." selector =" {{StorefrontCatalogSearchAdvancedResultMainSection.message}}" stepKey =" seeInDefault2" />
159
160
</test >
161
+ <test name =" AdminMassUpdateProductStatusStoreViewScopeMysqlTest" >
162
+ <annotations >
163
+ <features value =" Catalog" />
164
+ <stories value =" Mass update product status" />
165
+ <title value =" Admin should be able to mass update product statuses in store view scope using the Mysql search engine" />
166
+ <description value =" Admin should be able to mass update product statuses in store view scope using the Mysql search engine" />
167
+ <severity value =" AVERAGE" />
168
+ <testCaseId value =" MC-20471" />
169
+ <group value =" Catalog" />
170
+ <group value =" Product Attributes" />
171
+ <group value =" SearchEngineMysql" />
172
+ </annotations >
173
+ <before >
174
+ <actionGroup ref =" LoginActionGroup" stepKey =" loginAsAdmin" />
175
+
176
+ <!-- Create Website -->
177
+ <actionGroup ref =" AdminCreateWebsiteActionGroup" stepKey =" createAdditionalWebsite" >
178
+ <argument name =" newWebsiteName" value =" Second Website" />
179
+ <argument name =" websiteCode" value =" second_website" />
180
+ </actionGroup >
181
+
182
+ <!-- Create Store -->
183
+ <actionGroup ref =" AdminCreateNewStoreGroupActionGroup" stepKey =" createNewStore" >
184
+ <argument name =" website" value =" Second Website" />
185
+ <argument name =" storeGroupName" value =" Second Store" />
186
+ <argument name =" storeGroupCode" value =" second_store" />
187
+ </actionGroup >
188
+
189
+ <!-- Create Store view -->
190
+ <amOnPage url =" {{AdminSystemStorePage.url}}" stepKey =" amOnAdminSystemStorePage" />
191
+ <waitForPageLoad stepKey =" waitForSystemStorePage" />
192
+ <click selector =" {{AdminStoresMainActionsSection.createStoreViewButton}}" stepKey =" createStoreViewButton" />
193
+ <waitForPageLoad stepKey =" waitForProductPageLoad" />
194
+ <waitForElementVisible selector =" //legend[contains(., 'Store View Information')]" stepKey =" waitForNewStorePageToOpen" />
195
+ <selectOption userInput =" Second Store" selector =" {{AdminNewStoreSection.storeGrpDropdown}}" stepKey =" selectStoreGroup" />
196
+ <fillField userInput =" Second Store View" selector =" {{AdminNewStoreSection.storeNameTextField}}" stepKey =" fillStoreViewName" />
197
+ <fillField userInput =" second_store_view" selector =" {{AdminNewStoreSection.storeCodeTextField}}" stepKey =" fillStoreViewCode" />
198
+ <selectOption selector =" {{AdminNewStoreSection.statusDropdown}}" userInput =" 1" stepKey =" enableStoreViewStatus" />
199
+ <click selector =" {{AdminNewStoreViewActionsSection.saveButton}}" stepKey =" clickSaveStoreView" />
200
+ <waitForElementVisible selector =" {{AdminConfirmationModalSection.ok}}" stepKey =" waitForModal" />
201
+ <see selector =" {{AdminConfirmationModalSection.title}}" userInput =" Warning message" stepKey =" seeWarning" />
202
+ <click selector =" {{AdminConfirmationModalSection.ok}}" stepKey =" dismissModal" />
203
+ <waitForPageLoad stepKey =" waitForPageLoad2" time =" 180" />
204
+ <waitForElementVisible selector =" {{AdminStoresGridSection.storeFilterTextField}}" time =" 150" stepKey =" waitForPageReolad" />
205
+ <see userInput =" You saved the store view." stepKey =" seeSavedMessage" />
206
+
207
+ <!-- Create a Simple Product 1 -->
208
+ <actionGroup ref =" createSimpleProductAndAddToWebsite" stepKey =" createSimpleProduct1" >
209
+ <argument name =" product" value =" simpleProductForMassUpdate" />
210
+ <argument name =" website" value =" Second Website" />
211
+ </actionGroup >
212
+
213
+ <!-- Create a Simple Product 2 -->
214
+ <actionGroup ref =" createSimpleProductAndAddToWebsite" stepKey =" createSimpleProduct2" >
215
+ <argument name =" product" value =" simpleProductForMassUpdate2" />
216
+ <argument name =" website" value =" Second Website" />
217
+ </actionGroup >
218
+ </before >
219
+ <after >
220
+ <!-- Delete website -->
221
+ <actionGroup ref =" AdminDeleteWebsiteActionGroup" stepKey =" deleteSecondWebsite" >
222
+ <argument name =" websiteName" value =" Second Website" />
223
+ </actionGroup >
224
+ <amOnPage url =" {{AdminProductIndexPage.url}}" stepKey =" navigateToProductIndex" />
225
+
226
+ <!-- Delete Products -->
227
+ <actionGroup ref =" DeleteProductActionGroup" stepKey =" deleteProduct1" >
228
+ <argument name =" productName" value =" simpleProductForMassUpdate.name" />
229
+ </actionGroup >
230
+ <actionGroup ref =" DeleteProductActionGroup" stepKey =" deleteProduct2" >
231
+ <argument name =" productName" value =" simpleProductForMassUpdate2.name" />
232
+ </actionGroup >
233
+ <actionGroup ref =" logout" stepKey =" amOnLogoutPage" />
234
+ </after >
235
+
236
+ <!-- Search and select products -->
237
+ <amOnPage url =" {{AdminProductIndexPage.url}}" stepKey =" navigateToProductIndex" />
238
+ <waitForPageLoad stepKey =" waitForProductIndexPageLoad" />
239
+ <actionGroup ref =" searchProductGridByKeyword2" stepKey =" searchByKeyword" >
240
+ <argument name =" keyword" value =" {{simpleProductForMassUpdate.keyword}}" />
241
+ </actionGroup >
242
+ <actionGroup ref =" sortProductsByIdDescending" stepKey =" sortProductsByIdDescending" />
243
+
244
+ <!-- Filter to Second Store View -->
245
+ <actionGroup ref =" AdminFilterStoreViewActionGroup" stepKey =" filterStoreView" >
246
+ <argument name =" customStore" value =" 'Second Store View'" />
247
+ </actionGroup >
248
+
249
+ <!-- Select Product 2 -->
250
+ <click selector =" {{AdminProductGridSection.productGridCheckboxOnRow('2')}}" stepKey =" clickCheckbox2" />
251
+
252
+ <!-- Mass update attributes -->
253
+ <click selector =" {{AdminProductGridSection.bulkActionDropdown}}" stepKey =" clickDropdown" />
254
+ <click selector =" {{AdminProductGridSection.bulkActionOption('Change status')}}" stepKey =" clickOption" />
255
+ <click selector =" {{AdminProductGridSection.bulkActionOption('Disable')}}" stepKey =" clickDisabled" />
256
+ <waitForPageLoad stepKey =" waitForBulkUpdatePage" />
257
+
258
+ <!-- Verify Product Statuses -->
259
+ <see selector =" {{AdminProductGridSection.productGridContentsOnRow('1')}}" userInput =" Enabled" stepKey =" checkIfProduct1IsEnabled" />
260
+ <see selector =" {{AdminProductGridSection.productGridContentsOnRow('2')}}" userInput =" Disabled" stepKey =" checkIfProduct2IsDisabled" />
261
+
262
+ <!-- Filter to Default Store View -->
263
+ <actionGroup ref =" AdminFilterStoreViewActionGroup" stepKey =" filterDefaultStoreView" >
264
+ <argument name =" customStore" value =" 'Default'" />
265
+ </actionGroup >
266
+
267
+ <!-- Verify Product Statuses -->
268
+ <see selector =" {{AdminProductGridSection.productGridContentsOnRow('1')}}" userInput =" Enabled" stepKey =" checkIfDefaultViewProduct1IsEnabled" />
269
+ <see selector =" {{AdminProductGridSection.productGridContentsOnRow('2')}}" userInput =" Enabled" stepKey =" checkIfDefaultViewProduct2IsEnabled" />
270
+
271
+ <!-- Assert on storefront default view -->
272
+ <actionGroup ref =" GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey =" GoToStoreViewAdvancedCatalogSearchActionGroupDefault" />
273
+ <actionGroup ref =" StorefrontAdvancedCatalogSearchByProductNameAndDescriptionActionGroup" stepKey =" searchByNameDefault" >
274
+ <argument name =" name" value =" {{simpleProductForMassUpdate.keyword}}" />
275
+ <argument name =" description" value =" " />
276
+ </actionGroup >
277
+ <actionGroup ref =" StorefrontCheckAdvancedSearchResultActionGroup" stepKey =" StorefrontCheckAdvancedSearchResultDefault" />
278
+ <see userInput =" 2 items" selector =" {{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey =" seeInDefault" />
279
+
280
+ <!-- Enable the product in Default store view -->
281
+ <amOnPage url =" {{AdminProductIndexPage.url}}" stepKey =" navigateToProductIndex2" />
282
+ <waitForPageLoad stepKey =" waitForProductIndexPageLoad2" />
283
+ <click selector =" {{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey =" clickCheckboxDefaultStoreView" />
284
+ <click selector =" {{AdminProductGridSection.productGridCheckboxOnRow('2')}}" stepKey =" clickCheckboxDefaultStoreView2" />
285
+
286
+ <!-- Mass update attributes -->
287
+ <click selector =" {{AdminProductGridSection.bulkActionDropdown}}" stepKey =" clickDropdownDefaultStoreView" />
288
+ <click selector =" {{AdminProductGridSection.bulkActionOption('Change status')}}" stepKey =" clickOptionDefaultStoreView" />
289
+ <click selector =" {{AdminProductGridSection.bulkActionOption('Disable')}}" stepKey =" clickDisabledDefaultStoreView" />
290
+ <waitForPageLoad stepKey =" waitForBulkUpdatePageDefaultStoreView" />
291
+ <see selector =" {{AdminProductGridSection.productGridContentsOnRow('1')}}" userInput =" Disabled" stepKey =" checkIfProduct2IsDisabledDefaultStoreView" />
292
+
293
+ <!-- Assert on storefront default view -->
294
+ <actionGroup ref =" GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey =" GoToStoreViewAdvancedCatalogSearchActionGroupDefault2" />
295
+ <actionGroup ref =" StorefrontAdvancedCatalogSearchByProductNameAndDescriptionActionGroup" stepKey =" searchByNameDefault2" >
296
+ <argument name =" name" value =" {{simpleProductForMassUpdate.name}}" />
297
+ <argument name =" description" value =" " />
298
+ </actionGroup >
299
+ <actionGroup ref =" StorefrontCheckAdvancedSearchResultActionGroup" stepKey =" StorefrontCheckAdvancedSearchResultDefault2" />
300
+ <see userInput =" We can't find any items matching these search criteria." selector =" {{StorefrontCatalogSearchAdvancedResultMainSection.message}}" stepKey =" seeInDefault2" />
301
+ </test >
160
302
</tests >
0 commit comments