Update Sidebar test with new UI
This commit is contained in:
parent
6fe4025a58
commit
6b8531d3ae
1 changed files with 0 additions and 7 deletions
|
@ -5,29 +5,23 @@ import Sidebar from './Sidebar';
|
|||
|
||||
describe.concurrent('Sidebar', () => {
|
||||
it('Start default', () => {
|
||||
const handleClick = vi.fn();
|
||||
render(
|
||||
<Sidebar
|
||||
componentOptions={[]}
|
||||
isOpen={true}
|
||||
onClick={handleClick}
|
||||
buttonOnClick={() => {}}
|
||||
/>
|
||||
);
|
||||
const stuff = screen.queryByText(/stuff/i);
|
||||
const close = screen.getByText(/close/i);
|
||||
|
||||
expect(screen.getByText(/Components/i).classList.contains('left-0')).toBeDefined();
|
||||
expect(stuff).toBeNull();
|
||||
fireEvent.click(close);
|
||||
expect(handleClick).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('Start close', () => {
|
||||
render(<Sidebar
|
||||
componentOptions={[]}
|
||||
isOpen={false}
|
||||
onClick={() => {}}
|
||||
buttonOnClick={() => {}}
|
||||
/>);
|
||||
|
||||
|
@ -49,7 +43,6 @@ describe.concurrent('Sidebar', () => {
|
|||
}
|
||||
]}
|
||||
isOpen={true}
|
||||
onClick={() => {}}
|
||||
buttonOnClick={handleButtonClick}
|
||||
/>);
|
||||
const stuff = screen.getByText(/stuff/i);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue