Skip to content

Commit 4ec6398

Browse files
committed
MC-35016: Out of stock products doesn't filter properly using "price" filter
1 parent 7ee934d commit 4ec6398

File tree

1 file changed

+0
-40
lines changed
  • dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/ResourceModel/Product/Indexer/Price

1 file changed

+0
-40
lines changed

dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/ResourceModel/Product/Indexer/Price/ConfigurableTest.php

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -159,46 +159,6 @@ public function testReindexWithCorrectPriority()
159159
$this->assertEquals($childProduct1->getPrice(), $configurableProduct->getMinimalPrice());
160160
}
161161

162-
/**
163-
* Test get product minimal price if all children is out of stock
164-
*
165-
* @magentoConfigFixture current_store cataloginventory/options/show_out_of_stock 1
166-
* @magentoDataFixture Magento/ConfigurableProduct/_files/product_configurable.php
167-
* @magentoDbIsolation disabled
168-
*
169-
* @return void
170-
* @throws \Magento\Framework\Exception\NoSuchEntityException
171-
*/
172-
public function testReindexIfAllChildrenIsOutOfStock(): void
173-
{
174-
$configurableProduct = $this->getConfigurableProductFromCollection(1);
175-
$this->assertEquals(10, $configurableProduct->getMinimalPrice());
176-
177-
$childProduct1 = $this->productRepository->getById(10, false, null, true);
178-
$stockItem = $childProduct1->getExtensionAttributes()->getStockItem();
179-
$stockItem->setIsInStock(Stock::STOCK_OUT_OF_STOCK);
180-
$this->stockRepository->save($stockItem);
181-
182-
$childProduct2 = $this->productRepository->getById(20, false, null, true);
183-
$stockItem = $childProduct2->getExtensionAttributes()->getStockItem();
184-
$stockItem->setIsInStock(Stock::STOCK_OUT_OF_STOCK);
185-
$this->stockRepository->save($stockItem);
186-
187-
$configurableProduct1 = $this->productRepository->getById(1, false, null, true);
188-
$stockItem = $configurableProduct1->getExtensionAttributes()->getStockItem();
189-
$stockItem->setIsInStock(Stock::STOCK_OUT_OF_STOCK);
190-
$this->stockRepository->save($stockItem);
191-
192-
$priceIndexerProcessor = Bootstrap::getObjectManager()->get(PriceIndexerProcessor::class);
193-
$priceIndexerProcessor->reindexList(
194-
[$configurableProduct->getId(), $childProduct1->getId(), $childProduct2->getId()],
195-
true
196-
);
197-
198-
$configurableProduct = $this->getConfigurableProductFromCollection(1);
199-
$this->assertEquals(10, $configurableProduct->getMinimalPrice());
200-
}
201-
202162
/**
203163
* Retrieve configurable product.
204164
* Returns Configurable product that was created by Magento/ConfigurableProduct/_files/product_configurable.php

0 commit comments

Comments
 (0)