[Resolves #1221] Unclear parameters for Consumers` Search. Inconsistency of Search line on Consumers page. (#1429)

* Changed Search component placeholder

* Updates test

Co-authored-by: Damir Abdulganiev <dabdulganiev@provectus.com>
Co-authored-by: Roman Zabaluev <rzabaluev@provectus.com>
This commit is contained in:
Damir Abdulganiev 2022-01-20 12:39:23 +03:00 committed by GitHub
parent 68f1d3e7ee
commit 8639403448
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -22,7 +22,7 @@ const List: React.FC = () => {
<PageHeading text="Consumers" /> <PageHeading text="Consumers" />
<ControlPanelWrapper hasInput> <ControlPanelWrapper hasInput>
<Search <Search
placeholder="Search" placeholder="Search by Consumer Group ID"
value={searchText} value={searchText}
handleSearch={handleInputChange} handleSearch={handleInputChange}
/> />

View file

@ -30,7 +30,10 @@ describe('List', () => {
describe('when searched', () => { describe('when searched', () => {
it('renders only searched consumers', () => { it('renders only searched consumers', () => {
userEvent.type(screen.getByPlaceholderText('Search'), 'groupId1'); userEvent.type(
screen.getByPlaceholderText('Search by Consumer Group ID'),
'groupId1'
);
expect(screen.getByText('groupId1')).toBeInTheDocument(); expect(screen.getByText('groupId1')).toBeInTheDocument();
expect(screen.getByText('groupId2')).toBeInTheDocument(); expect(screen.getByText('groupId2')).toBeInTheDocument();
}); });