diff --git a/components/auto-complete/__tests__/__snapshots__/index.test.js.snap b/components/auto-complete/__tests__/__snapshots__/index.test.js.snap deleted file mode 100644 index d4791da902..0000000000 --- a/components/auto-complete/__tests__/__snapshots__/index.test.js.snap +++ /dev/null @@ -1,121 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`AutoComplete legacy dataSource should accept react element option 1`] = ` - -`; - -exports[`AutoComplete rtl render component should be rendered correctly in RTL direction 1`] = ` - -`; diff --git a/components/auto-complete/__tests__/__snapshots__/index.test.tsx.snap b/components/auto-complete/__tests__/__snapshots__/index.test.tsx.snap new file mode 100644 index 0000000000..3105d49829 --- /dev/null +++ b/components/auto-complete/__tests__/__snapshots__/index.test.tsx.snap @@ -0,0 +1,32 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AutoComplete rtl render component should be rendered correctly in RTL direction 1`] = ` + +`; diff --git a/components/auto-complete/__tests__/index.test.js b/components/auto-complete/__tests__/index.test.tsx similarity index 53% rename from components/auto-complete/__tests__/index.test.js rename to components/auto-complete/__tests__/index.test.tsx index 7686e70722..2c48bb8339 100644 --- a/components/auto-complete/__tests__/index.test.js +++ b/components/auto-complete/__tests__/index.test.tsx @@ -1,30 +1,35 @@ import React from 'react'; +import userEvent from '@testing-library/user-event'; import AutoComplete from '..'; import mountTest from '../../../tests/shared/mountTest'; import rtlTest from '../../../tests/shared/rtlTest'; -import { fireEvent, render } from '../../../tests/utils'; +import { render, screen } from '../../../tests/utils'; import Input from '../../input'; describe('AutoComplete', () => { mountTest(AutoComplete); rtlTest(AutoComplete); - it('AutoComplete with custom Input render perfectly', () => { - const { container } = render( + it('AutoComplete with custom Input render perfectly', async () => { + render(