diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-24 16:44:29 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-24 16:44:29 +0200 |
| commit | 1e982fb02a9967e0efdc76c93a44798a9f2dcb43 (patch) | |
| tree | b9a526ade81feee20cf18404e2a7053ccff6c999 /src/components/organisms/layout/no-results.test.tsx | |
| parent | c347190a4307c172d15dac156da86567098035f6 (diff) | |
chore: add a search form when posts list prints no results
Diffstat (limited to 'src/components/organisms/layout/no-results.test.tsx')
| -rw-r--r-- | src/components/organisms/layout/no-results.test.tsx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/components/organisms/layout/no-results.test.tsx b/src/components/organisms/layout/no-results.test.tsx new file mode 100644 index 0000000..7f57177 --- /dev/null +++ b/src/components/organisms/layout/no-results.test.tsx @@ -0,0 +1,14 @@ +import { render, screen } from '@test-utils'; +import NoResults from './no-results'; + +describe('NoResults', () => { + it('renders a no results text', () => { + render(<NoResults searchPage="#" />); + expect(screen.getByText(/No results/gi)).toBeInTheDocument(); + }); + + it('renders a search form', () => { + render(<NoResults searchPage="#" />); + expect(screen.getByRole('searchbox')).toBeInTheDocument(); + }); +}); |
