Skip to content

Commit

Permalink
Closes kafbat/kafka-ui #622
Browse files Browse the repository at this point in the history
  • Loading branch information
pisal-shubham committed Nov 5, 2024
1 parent 0ad8695 commit b1dc56e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const AddEditFilterContainer: React.FC<AddEditFilterContainerProps> = ({
</FormError>
</div>
<S.FilterButtonWrapper isEdit={isEdit}>
{!isEdit && <QuestionInfo />}
<QuestionInfo />
<Flexbox gap="10px">
<Button
buttonSize="M"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const SavedFilterName = styled.div`

export const FilterButtonWrapper = styled.div<{ isEdit: boolean }>`
display: flex;
justify-content: ${(props) => (props.isEdit ? 'flex-end' : 'space-between')};
justify-content: space-between;
margin-top: 10px;
gap: 10px;
padding-top: 16px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ describe('AddEditFilterContainer component', () => {
expect(submitButtonElem).toBeEnabled();
});

it('should display the CEL syntax help icon', async () => {
const celHelpIcon = screen.queryByLabelText('info');
expect(celHelpIcon).toBeVisible();
expect(celHelpIcon).toBeEnabled();
});

// TODO needs a rethink
// it('should view the error message after typing and clearing the input', async () => {
// const inputs = screen.getAllByRole('textbox');
Expand Down Expand Up @@ -115,6 +121,12 @@ describe('AddEditFilterContainer component', () => {
const checkbox = screen.queryByRole('checkbox');
expect(checkbox).not.toBeInTheDocument();
});

it('should display the CEL syntax help icon', async () => {
const celHelpIcon = screen.queryByLabelText('info');
expect(celHelpIcon).toBeVisible();
expect(celHelpIcon).toBeEnabled();
});
});

describe('Cancel and Submit button functionality', () => {
Expand Down

0 comments on commit b1dc56e

Please sign in to comment.