From 13201b27315c2e5aac7dadcbdbdf1baf86757ab2 Mon Sep 17 00:00:00 2001 From: Arthur Andrade Date: Wed, 31 Jul 2024 09:43:17 -0300 Subject: [PATCH] test: ad tests on styleguide --- .../__snapshots__/index.test.tsx.snap | 47 +++++++++++++++++++ .../AutocompleteInput/index.test.tsx | 27 ++++++++++- 2 files changed, 73 insertions(+), 1 deletion(-) diff --git a/react/components/AutocompleteInput/__snapshots__/index.test.tsx.snap b/react/components/AutocompleteInput/__snapshots__/index.test.tsx.snap index 62ffa4437..3db96b2a4 100644 --- a/react/components/AutocompleteInput/__snapshots__/index.test.tsx.snap +++ b/react/components/AutocompleteInput/__snapshots__/index.test.tsx.snap @@ -47,6 +47,53 @@ exports[`AutocompleteInput should render a regular version of search bar if size `; +exports[`AutocompleteInput should render with a 300px max height 1`] = ` + +
+
+ + +
+
+
+ +`; + exports[`AutocompleteInput should render with a large size bar 1`] = `
{ expect(result).toMatchSnapshot() }) + it('should render with a 300px max height', () => { + const options = { + onSelect: () => `''`, + loading: false, + value: [], + maxHeight: 300, + } + + const input = { + onChange: () => `''`, + onSearch: () => `''`, + onClear: () => `''`, + placeholder: '', + value: '', + } + + const { asFragment } = render( + + ) + + const result = asFragment() + + expect(result).toMatchSnapshot() + }) + it('should render with a regular size bar', () => { const options = { onSelect: () => `''`, @@ -108,7 +133,7 @@ describe('AutocompleteInput', () => { onSelect: () => `''`, loading: false, value: [], - size: 'medium', + size: 'regular', } const input = {