remove offset input render condition in topic messages filters (#1876)
This commit is contained in:
parent
f70809128b
commit
4c76d07f04
2 changed files with 36 additions and 38 deletions
|
@ -357,7 +357,6 @@ const Filters: React.FC<FiltersProps> = ({
|
||||||
value={query}
|
value={query}
|
||||||
onChange={({ target: { value } }) => setQuery(value)}
|
onChange={({ target: { value } }) => setQuery(value)}
|
||||||
/>
|
/>
|
||||||
{isSeekTypeControlVisible && (
|
|
||||||
<S.SeekTypeSelectorWrapper>
|
<S.SeekTypeSelectorWrapper>
|
||||||
<Select
|
<Select
|
||||||
id="selectSeekType"
|
id="selectSeekType"
|
||||||
|
@ -392,7 +391,6 @@ const Filters: React.FC<FiltersProps> = ({
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</S.SeekTypeSelectorWrapper>
|
</S.SeekTypeSelectorWrapper>
|
||||||
)}
|
|
||||||
<MultiSelect
|
<MultiSelect
|
||||||
options={partitions.map((p) => ({
|
options={partitions.map((p) => ({
|
||||||
label: `Partition #${p.partition.toString()}`,
|
label: `Partition #${p.partition.toString()}`,
|
||||||
|
|
|
@ -35,14 +35,14 @@ describe('Messages', () => {
|
||||||
setUpComponent();
|
setUpComponent();
|
||||||
});
|
});
|
||||||
it('should check default seekDirection if it actually take the value from the url', () => {
|
it('should check default seekDirection if it actually take the value from the url', () => {
|
||||||
expect(screen.getByRole('listbox')).toHaveTextContent(
|
expect(screen.getAllByRole('listbox')[1]).toHaveTextContent(
|
||||||
SeekDirectionOptionsObj[SeekDirection.FORWARD].label
|
SeekDirectionOptionsObj[SeekDirection.FORWARD].label
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should check the SeekDirection select changes', () => {
|
it('should check the SeekDirection select changes', () => {
|
||||||
const seekDirectionSelect = screen.getByRole('listbox');
|
const seekDirectionSelect = screen.getAllByRole('listbox')[1];
|
||||||
const seekDirectionOption = screen.getByRole('option');
|
const seekDirectionOption = screen.getAllByRole('option')[1];
|
||||||
|
|
||||||
expect(seekDirectionOption).toHaveTextContent(
|
expect(seekDirectionOption).toHaveTextContent(
|
||||||
SeekDirectionOptionsObj[SeekDirection.FORWARD].label
|
SeekDirectionOptionsObj[SeekDirection.FORWARD].label
|
||||||
|
@ -69,7 +69,7 @@ describe('Messages', () => {
|
||||||
setUpComponent(
|
setUpComponent(
|
||||||
searchParams.replace(SeekDirection.FORWARD, SeekDirection.BACKWARD)
|
searchParams.replace(SeekDirection.FORWARD, SeekDirection.BACKWARD)
|
||||||
);
|
);
|
||||||
expect(screen.getByRole('listbox')).toHaveTextContent(
|
expect(screen.getAllByRole('listbox')[1]).toHaveTextContent(
|
||||||
SeekDirectionOptionsObj[SeekDirection.BACKWARD].label
|
SeekDirectionOptionsObj[SeekDirection.BACKWARD].label
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue