Skip to content

Commit

Permalink
Update input container tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cgero-eth committed Dec 11, 2023
1 parent 779910e commit e4d9aff
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/input/inputContainer/inputContainer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ describe('<InputContainer /> component', () => {
expect(screen.getByText(helpText)).toBeInTheDocument();
});

it('renders the info text when defined', () => {
const infoText = '10/1000';
render(createTestComponent({ infoText }));
expect(screen.getByText(infoText)).toBeInTheDocument();
it('renders the input value counter when maxLength is defined', () => {
const maxLength = 100;
const inputLength = 47;
render(createTestComponent({ maxLength, inputLength }));
expect(screen.getByText(`[${inputLength}/${maxLength}]`)).toBeInTheDocument();
});

it('renders the input alert when defined', () => {
Expand Down

0 comments on commit e4d9aff

Please sign in to comment.