File tree 2 files changed +14
-7
lines changed
kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/pages/brokers
kafka-ui-react-app/src/components/Brokers/Broker/Configs 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 16
16
17
17
public class BrokersConfigTab extends BasePage {
18
18
19
+ protected List <SelenideElement > editBtn = $$x ("//button[@aria-label='editAction']" );
20
+ protected SelenideElement searchByKeyField = $x ("//input[@placeholder='Search by Key or Value']" );
19
21
protected SelenideElement sourceInfoIcon = $x ("//div[text()='Source']/..//div/div[@class]" );
20
22
protected SelenideElement sourceInfoTooltip = $x ("//div[text()='Source']/..//div/div[@style]" );
21
23
protected ElementsCollection editBtns = $$x ("//button[@aria-label='editAction']" );
Original file line number Diff line number Diff line change @@ -34,14 +34,19 @@ const Configs: React.FC = () => {
34
34
35
35
const getData = ( ) => {
36
36
return data
37
- . filter (
38
- ( item ) =>
39
- item . name . toLocaleLowerCase ( ) . indexOf ( keyword . toLocaleLowerCase ( ) ) >
40
- - 1
41
- )
37
+ . filter ( ( item ) => {
38
+ const nameMatch = item . name
39
+ . toLocaleLowerCase ( )
40
+ . includes ( keyword . toLocaleLowerCase ( ) ) ;
41
+ return nameMatch
42
+ ? true
43
+ : item . value &&
44
+ item . value
45
+ . toLocaleLowerCase ( )
46
+ . includes ( keyword . toLocaleLowerCase ( ) ) ; // try to match the keyword on any of the item.value elements when nameMatch fails but item.value exists
47
+ } )
42
48
. sort ( ( a , b ) => {
43
49
if ( a . source === b . source ) return 0 ;
44
-
45
50
return a . source === ConfigSource . DYNAMIC_BROKER_CONFIG ? - 1 : 1 ;
46
51
} ) ;
47
52
} ;
@@ -95,7 +100,7 @@ const Configs: React.FC = () => {
95
100
< S . SearchWrapper >
96
101
< Search
97
102
onChange = { setKeyword }
98
- placeholder = "Search by Key"
103
+ placeholder = "Search by Key or Value "
99
104
value = { keyword }
100
105
/>
101
106
</ S . SearchWrapper >
You can’t perform that action at this time.
0 commit comments