Skip to content

Commit c00d2fd

Browse files
committed
MC-35618: Unexpected results of editing a Grouped Product in the Wish List by a Customer
1 parent ddf7747 commit c00d2fd

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

dev/tests/integration/testsuite/Magento/Wishlist/Model/WishlistTest.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/**
2121
* Tests for wish list model.
2222
*
23-
* @magentoDbIsolation enabled
23+
* @magentoDbIsolation disabled
2424
* @magentoAppIsolation disabled
2525
*/
2626
class WishlistTest extends TestCase
@@ -143,7 +143,12 @@ public function testAddConfigurableProductToWishList(): void
143143
$configurableOptions = $configurableProduct->getTypeInstance()->getConfigurableOptions($configurableProduct);
144144
$attributeId = key($configurableOptions);
145145
$option = reset($configurableOptions[$attributeId]);
146-
$buyRequest = ['super_attribute' => [$attributeId => $option['value_index']]];
146+
$buyRequest = [
147+
'super_attribute' => [
148+
$attributeId => $option['value_index']
149+
],
150+
'action' => 'add',
151+
];
147152
$wishlist = $this->getWishlistByCustomerId->execute(1);
148153
$wishlist->addNewItem($configurableProduct, $buyRequest);
149154
$item = $this->getWishlistByCustomerId->getItemBySku(1, 'Configurable product');
@@ -166,7 +171,12 @@ public function testAddBundleProductToWishList(): void
166171
$option = reset($bundleOptions);
167172
$productLinks = $option->getProductLinks();
168173
$this->assertNotNull($productLinks[0]);
169-
$buyRequest = ['bundle_option' => [$option->getOptionId() => $productLinks[0]->getId()]];
174+
$buyRequest = [
175+
'bundle_option' => [
176+
$option->getOptionId() => $productLinks[0]->getId()
177+
],
178+
'action' => 'add',
179+
];
170180
$skuWithChosenOption = implode('-', [$bundleProduct->getSku(), $productLinks[0]->getSku()]);
171181
$wishlist = $this->getWishlistByCustomerId->execute(1);
172182
$wishlist->addNewItem($bundleProduct, $buyRequest);

0 commit comments

Comments
 (0)