From de59954c49bf2bd72aa9c29b96d8ca645977a0cc Mon Sep 17 00:00:00 2001 From: Hans Pragt Date: Wed, 14 Feb 2024 12:33:58 -0800 Subject: [PATCH] #5954 Add a test for the sidebar component. (#5968) * Add a test for the sidebar component. * Update Sidebar.spec.js --------- Co-authored-by: Melloware --- components/lib/sidebar/Sidebar.spec.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 components/lib/sidebar/Sidebar.spec.js diff --git a/components/lib/sidebar/Sidebar.spec.js b/components/lib/sidebar/Sidebar.spec.js new file mode 100644 index 0000000000..36f5978ae3 --- /dev/null +++ b/components/lib/sidebar/Sidebar.spec.js @@ -0,0 +1,18 @@ +import '@testing-library/jest-dom'; +import { render, screen } from '@testing-library/react'; +import { Sidebar } from './sidebar'; + +describe('Sidebar', () => { + test( + 'can be made visible', + () => { + const hideOn = jest.fn(); + + render(); + + const sidebar = screen.queryByRole('complementary'); + + expect(sidebar).toBeVisible(); + } + ); +});