diff --git a/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/pages/brokers/BrokersConfigTab.java b/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/pages/brokers/BrokersConfigTab.java index a9e146002ec..e00e938297a 100644 --- a/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/pages/brokers/BrokersConfigTab.java +++ b/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/pages/brokers/BrokersConfigTab.java @@ -16,6 +16,8 @@ public class BrokersConfigTab extends BasePage { + protected List editBtn = $$x("//button[@aria-label='editAction']"); + protected SelenideElement searchByKeyField = $x("//input[@placeholder='Search by Key or Value']"); protected SelenideElement sourceInfoIcon = $x("//div[text()='Source']/..//div/div[@class]"); protected SelenideElement sourceInfoTooltip = $x("//div[text()='Source']/..//div/div[@style]"); protected ElementsCollection editBtns = $$x("//button[@aria-label='editAction']"); diff --git a/kafka-ui-react-app/src/components/Brokers/Broker/Configs/Configs.tsx b/kafka-ui-react-app/src/components/Brokers/Broker/Configs/Configs.tsx index ad6c5087a0f..5b05b7cc5be 100644 --- a/kafka-ui-react-app/src/components/Brokers/Broker/Configs/Configs.tsx +++ b/kafka-ui-react-app/src/components/Brokers/Broker/Configs/Configs.tsx @@ -34,14 +34,19 @@ const Configs: React.FC = () => { const getData = () => { return data - .filter( - (item) => - item.name.toLocaleLowerCase().indexOf(keyword.toLocaleLowerCase()) > - -1 - ) + .filter((item) => { + const nameMatch = item.name + .toLocaleLowerCase() + .includes(keyword.toLocaleLowerCase()); + return nameMatch + ? true + : item.value && + item.value + .toLocaleLowerCase() + .includes(keyword.toLocaleLowerCase()); // try to match the keyword on any of the item.value elements when nameMatch fails but item.value exists + }) .sort((a, b) => { if (a.source === b.source) return 0; - return a.source === ConfigSource.DYNAMIC_BROKER_CONFIG ? -1 : 1; }); }; @@ -95,7 +100,7 @@ const Configs: React.FC = () => {