Skip to content

Commit 731eab1

Browse files
committed
MAGETWO-72512: Configurable product displays the price of "out of stock" configuration
1 parent 7197414 commit 731eab1

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

app/code/Magento/ConfigurableProduct/Test/Unit/Model/ResourceModel/Product/LinkedProductSelectBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function setUp()
4242
LinkedProductSelectBuilder::class,
4343
[
4444
'baseSelectProcessor' => $this->baseSelectProcessorMock,
45-
'linkedProductSelectBuilder' => $this->linkedProductSelectBuilderMock
45+
'linkedProductSelectBuilder' => $this->linkedProductSelectBuilderMock,
4646
]
4747
);
4848
}

app/code/Magento/ConfigurableProduct/Test/Unit/Model/ResourceModel/Product/StockStatusBaseSelectProcessorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected function setUp()
5252
StockStatusBaseSelectProcessor::class,
5353
[
5454
'stockConfig' => $this->stockConfigMock,
55-
'stockStatusResource' => $this->stockStatusResourceMock
55+
'stockStatusResource' => $this->stockStatusResourceMock,
5656
]
5757
);
5858
}
@@ -107,7 +107,7 @@ public function processDataProvider()
107107
{
108108
return [
109109
'Out of stock products are being displayed' => [true],
110-
'Out of stock products are NOT being displayed' => [false]
110+
'Out of stock products are NOT being displayed' => [false],
111111
];
112112
}
113113
}

dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductOutOfStockPage.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@ protected function verifyPrice()
3232
$priceBlock = $this->productView->getPriceBlock();
3333
$fixturePrice = $this->getLowestConfigurablePrice();
3434

35-
if ($fixturePrice === null) {
36-
if ($priceBlock->isVisible()) {
37-
return "Price block for '{$this->product->getName()}' product' is visible.";
38-
}
35+
if ($fixturePrice === null && $priceBlock->isVisible()) {
36+
return "Price block for '{$this->product->getName()}' product' is visible.";
3937
} else {
4038
if (!$priceBlock->isVisible()) {
4139
return "Price block for '{$this->product->getName()}' product' is not visible.";

dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
<constraint name="Magento\ConfigurableProduct\Test\Constraint\AssertConfigurableProductInCategory" />
238238
<constraint name="Magento\ConfigurableProduct\Test\Constraint\AssertConfigurableProductImages" />
239239
</variation>
240-
<variation name="CreateConfigurableProductEntityTestVariation15" summary="Create Configurable Product with 1 out of stock and several in stock options with displaying out of stock ones">
240+
<variation name="CreateConfigurableProductEntityTestVariation15" summary="Create Configurable Product with 1 out of stock and several in stock options with displaying out of stock ones" ticketId="MAGETWO-89274">
241241
<data name="product/data/url_key" xsi:type="string">configurable-product-%isolation%</data>
242242
<data name="product/data/configurable_attributes_data/dataset" xsi:type="string">three_new_options_with_out_of_stock_product</data>
243243
<data name="product/data/name" xsi:type="string">Configurable Product %isolation%</data>

0 commit comments

Comments
 (0)