Skip to content

Commit 4e1e9d9

Browse files
committed
ACP2E-3350: Disabled Categories are no longer have their names grayed out in the category tree
1 parent 5990d30 commit 4e1e9d9

File tree

1 file changed

+37
-0
lines changed
  • dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Category

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
/**
3+
* Copyright 2024 Adobe
4+
* All Rights Reserved.
5+
*/
6+
namespace Magento\Catalog\Block\Adminhtml\Category;
7+
8+
use Magento\Catalog\Test\Fixture\Category as CategoryFixture;
9+
use Magento\Framework\View\LayoutInterface;
10+
use Magento\TestFramework\Fixture\AppArea;
11+
use Magento\TestFramework\Fixture\DataFixture;
12+
use Magento\TestFramework\TestCase\AbstractBackendController;
13+
14+
/**
15+
* Test for categories in the tree block.
16+
*/
17+
class TreeBlockTest extends AbstractBackendController
18+
{
19+
20+
/**
21+
* Test disabled categories in the tree block.
22+
*/
23+
#[
24+
AppArea('adminhtml'),
25+
DataFixture(CategoryFixture::class, ['is_active' => false], as:'new_category'),
26+
]
27+
public function testDisabledCategoriesHtml()
28+
{
29+
$this->dispatch("backend/catalog/category/index/");
30+
$this->assertEquals(200, $this->getResponse()->getHttpResponseCode());
31+
$layout = $this->_objectManager->get(LayoutInterface::class);
32+
$categoryTree = $layout->getBlock('category.tree');
33+
$blockHtml = $categoryTree->toHtml();
34+
$this->assertStringContainsString('disabled-category', $blockHtml);
35+
}
36+
37+
}

0 commit comments

Comments
 (0)