Skip to content

Commit 008205b

Browse files
committed
ACP2E-978: "Text field" product attributes not visible in page builder conditions.
- fix - modify test
1 parent d379b7f commit 008205b

File tree

2 files changed

+2
-4
lines changed
  • app/code/Magento/CatalogWidget/Model/Rule/Condition
  • dev/tests/integration/testsuite/Magento/CatalogWidget/Model/Rule/Condition

2 files changed

+2
-4
lines changed

app/code/Magento/CatalogWidget/Model/Rule/Condition/Product.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@ public function loadAttributeOptions()
8787
$productAttributes = array_filter(
8888
$productAttributes,
8989
function ($attribute) {
90-
return $attribute->getFrontendLabel() &&
91-
$attribute->getFrontendInput() !== 'text' &&
92-
$attribute->getAttributeCode() !== ProductInterface::STATUS;
90+
return $attribute->getFrontendLabel();
9391
}
9492
);
9593

dev/tests/integration/testsuite/Magento/CatalogWidget/Model/Rule/Condition/ProductTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function testLoadAttributeOptions()
4343
$this->assertArrayHasKey(ProductInterface::SKU, $options);
4444
$this->assertArrayHasKey(ProductInterface::ATTRIBUTE_SET_ID, $options);
4545
$this->assertArrayHasKey('category_ids', $options);
46-
$this->assertArrayNotHasKey(ProductInterface::STATUS, $options);
46+
$this->assertArrayHasKey(ProductInterface::STATUS, $options);
4747
foreach ($options as $code => $label) {
4848
$this->assertNotEmpty($label);
4949
$this->assertNotEmpty($code);

0 commit comments

Comments
 (0)