Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading