Skip to content

Commit 4f6296c

Browse files
committed
#7372: Product images gets removed from "Images And Videos" after validation alert. Test stabilization.
1 parent 263f71d commit 4f6296c

File tree

2 files changed

+5
-67
lines changed
  • app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Helper/Form/Gallery
  • dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml

2 files changed

+5
-67
lines changed

app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Product/Helper/Form/Gallery/ContentTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
use Magento\Catalog\Model\Product;
1111
use Magento\Framework\Phrase;
1212

13+
/**
14+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
15+
*/
1316
class ContentTest extends \PHPUnit\Framework\TestCase
1417
{
1518
/**

dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php

Lines changed: 2 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -191,79 +191,23 @@ public function saveActionWithAlreadyExistingUrlKeyDataProvider()
191191
'product' =>
192192
[
193193
'attribute_set_id' => '4',
194-
'gift_message_available' => '0',
195-
'use_config_gift_message_available' => '1',
196-
'links_title' => 'Links',
197-
'links_purchased_separately' => '0',
198-
'samples_title' => 'Samples',
199-
'stock_data' =>
200-
[
201-
'min_qty_allowed_in_shopping_cart' =>
202-
[
203-
0 =>
204-
[
205-
'customer_group_id' => '32000',
206-
'min_sale_qty' => '',
207-
'record_id' => '0',
208-
],
209-
],
210-
'min_qty' => '0',
211-
'max_sale_qty' => '10000',
212-
'notify_stock_qty' => '1',
213-
'min_sale_qty' => '1',
214-
'qty_increments' => '1',
215-
'use_config_manage_stock' => '1',
216-
'manage_stock' => '1',
217-
'use_config_min_qty' => '1',
218-
'use_config_max_sale_qty' => '1',
219-
'use_config_backorders' => '1',
220-
'backorders' => '0',
221-
'use_config_notify_stock_qty' => '1',
222-
'use_config_enable_qty_inc' => '1',
223-
'enable_qty_increments' => '0',
224-
'use_config_qty_increments' => '1',
225-
'use_config_min_sale_qty' => '1',
226-
'is_qty_decimal' => '0',
227-
'is_decimal_divided' => '0',
228-
],
229194
'status' => '1',
230-
'affect_product_custom_options' => '1',
231195
'name' => 's2',
232-
'weight' => '',
233196
'url_key' => 'simple-product',
234-
'special_price' => '',
235-
'cost' => '',
236197
'quantity_and_stock_status' =>
237198
[
238-
'qty' => '',
199+
'qty' => '10',
239200
'is_in_stock' => '1',
240201
],
241202
'website_ids' =>
242203
[
243204
1 => '1',
244205
],
245206
'sku' => 's2',
246-
'meta_title' => 's2',
247-
'meta_keyword' => 's2',
248-
'meta_description' => 's2 ',
249207
'price' => '3',
250208
'tax_class_id' => '2',
251-
'product_has_weight' => '1',
209+
'product_has_weight' => '0',
252210
'visibility' => '4',
253-
'country_of_manufacture' => '',
254-
'page_layout' => '',
255-
'options_container' => 'container2',
256-
'custom_design' => '',
257-
'custom_layout' => '',
258-
'news_from_date' => '',
259-
'news_to_date' => '',
260-
'custom_design_from' => '',
261-
'custom_design_to' => '',
262-
'special_from_date' => '',
263-
'special_to_date' => '',
264-
'description' => '',
265-
'short_description' => '',
266-
'custom_layout_update' => '',
267211
'media_gallery' =>
268212
[
269213
'images' =>
@@ -278,10 +222,6 @@ public function saveActionWithAlreadyExistingUrlKeyDataProvider()
278222
'label' => '',
279223
'disabled' => '0',
280224
'removed' => '',
281-
'video_url' => '',
282-
'video_title' => '',
283-
'video_description' => '',
284-
'video_metadata' => '',
285225
'role' => '',
286226
],
287227
],
@@ -291,11 +231,6 @@ public function saveActionWithAlreadyExistingUrlKeyDataProvider()
291231
'thumbnail' => '/m/a//magento_image.jpg.tmp',
292232
'swatch_image' => '/m/a//magento_image.jpg.tmp',
293233
],
294-
'is_downloadable' => '0',
295-
'affect_configurable_product_attributes' => '1',
296-
'new-variations-attribute-set-id' => '4',
297-
'configurable-matrix-serialized' => '[]',
298-
'associated_product_ids_serialized' => '[]',
299234
'form_key' => Bootstrap::getObjectManager()->get(FormKey::class)->getFormKey(),
300235
]
301236
]

0 commit comments

Comments
 (0)