Skip to content

Commit efd076e

Browse files
MC-16650: Product Attribute Type Price Not Displaying
- fix test failures
1 parent b6dcdea commit efd076e

File tree

6 files changed

+45
-10
lines changed

6 files changed

+45
-10
lines changed

app/code/Magento/Catalog/Test/Unit/Model/Layer/FilterListTest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,13 @@ public function testGetFilters($method, $value, $expectedClass)
7373

7474
$this->objectManagerMock->expects($this->at(1))
7575
->method('create')
76-
->with($expectedClass, [
77-
'data' => ['attribute_model' => $this->attributeMock],
78-
'layer' => $this->layerMock])
76+
->with(
77+
$expectedClass,
78+
[
79+
'data' => ['attribute_model' => $this->attributeMock],
80+
'layer' => $this->layerMock
81+
]
82+
)
7983
->will($this->returnValue('filter'));
8084

8185
$this->attributeMock->expects($this->once())

app/code/Magento/CatalogSearch/Test/Mftf/Test/LayerNavigationOfCatalogSearchTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<title value="Layer Navigation of Catalog Search Should Equalize Price Range As Default Configuration"/>
1515
<description value="Make sure filter of custom attribute with type of price displays on storefront Catalog page and price range should respect the configuration in Admin site"/>
1616
<testCaseId value="MC-16979"/>
17-
<issueId value="MC-16650"/>
17+
<useCaseId value="MC-16650"/>
1818
<severity value="MAJOR"/>
1919
<group value="CatalogSearch"/>
2020
</annotations>

dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/_files/attribute_special_price_filterable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
\Magento\Catalog\Setup\CategorySetup::class
1010
);
1111

12-
$installer->updateAttribute('catalog_product', 'special_price', 'is_filterable', 1);
12+
$installer->updateAttribute('catalog_product', 'special_price', 'is_filterable', 1);

dev/tests/integration/testsuite/Magento/Catalog/_files/multiple_visible_products.php

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,30 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
$category = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Catalog\Model\Category::class);
8+
$category->isObjectNew(true);
9+
$category->setId(
10+
100
11+
)->setCreatedAt(
12+
'2014-06-23 09:50:07'
13+
)->setName(
14+
'Category 100'
15+
)->setParentId(
16+
2
17+
)->setPath(
18+
'1/2/100'
19+
)->setLevel(
20+
2
21+
)->setAvailableSortBy(
22+
['position', 'name']
23+
)->setDefaultSortBy(
24+
'name'
25+
)->setIsActive(
26+
true
27+
)->setPosition(
28+
1
29+
)->save();
30+
731
/** @var $product \Magento\Catalog\Model\Product */
832
$product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Catalog\Model\Product::class);
933
$product->isObjectNew(true);
@@ -25,7 +49,7 @@
2549
->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
2650
->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
2751
->setWebsiteIds([1])
28-
->setCategoryIds([2])
52+
->setCategoryIds([100])
2953
->setStockData(['use_config_manage_stock' => 1, 'qty' => 100, 'is_qty_decimal' => 0, 'is_in_stock' => 1])
3054
->setSpecialPrice('10')
3155
->save();
@@ -50,7 +74,7 @@
5074
->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
5175
->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
5276
->setWebsiteIds([1])
53-
->setCategoryIds([2])
77+
->setCategoryIds([100])
5478
->setStockData(['use_config_manage_stock' => 1, 'qty' => 50, 'is_qty_decimal' => 0, 'is_in_stock' => 1])
5579
->setSpecialPrice('20')
5680
->save();
@@ -70,7 +94,7 @@
7094
->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
7195
->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
7296
->setWebsiteIds([1])
73-
->setCategoryIds([2])
97+
->setCategoryIds([100])
7498
->setStockData(['use_config_manage_stock' => 1, 'qty' => 140, 'is_qty_decimal' => 0, 'is_in_stock' => 1])
7599
->setSpecialPrice('30')
76-
->save();
100+
->save();

dev/tests/integration/testsuite/Magento/Catalog/_files/multiple_visible_products_rollback.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
$registry->unregister('isSecureArea');
1313
$registry->register('isSecureArea', true);
1414

15+
/** @var $category \Magento\Catalog\Model\Category */
16+
$category = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Catalog\Model\Category::class);
17+
$category->load(100);
18+
if ($category->getId()) {
19+
$category->delete();
20+
}
21+
1522
/** @var \Magento\Catalog\Api\ProductRepositoryInterface $productRepository */
1623
$productRepository = $objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class);
1724

dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Layer/Filter/DecimalTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function testApplyProductCollection()
6161
/** @var $objectManager \Magento\TestFramework\ObjectManager */
6262
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
6363
$category = $objectManager->create(\Magento\Catalog\Model\Category::class);
64-
$category->load(2);
64+
$category->load(100);
6565
$this->_model->getLayer()->setCurrentCategory($category);
6666

6767
/** @var $attribute \Magento\Catalog\Model\Entity\Attribute */

0 commit comments

Comments
 (0)