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', () => {
|
describe.concurrent('Sidebar', () => {
|
||||||
it('Start default', () => {
|
it('Start default', () => {
|
||||||
const handleClick = vi.fn();
|
|
||||||
render(
|
render(
|
||||||
<Sidebar
|
<Sidebar
|
||||||
componentOptions={[]}
|
componentOptions={[]}
|
||||||
isOpen={true}
|
isOpen={true}
|
||||||
onClick={handleClick}
|
|
||||||
buttonOnClick={() => {}}
|
buttonOnClick={() => {}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
const stuff = screen.queryByText(/stuff/i);
|
const stuff = screen.queryByText(/stuff/i);
|
||||||
const close = screen.getByText(/close/i);
|
|
||||||
|
|
||||||
expect(screen.getByText(/Components/i).classList.contains('left-0')).toBeDefined();
|
expect(screen.getByText(/Components/i).classList.contains('left-0')).toBeDefined();
|
||||||
expect(stuff).toBeNull();
|
expect(stuff).toBeNull();
|
||||||
fireEvent.click(close);
|
|
||||||
expect(handleClick).toHaveBeenCalledTimes(1);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Start close', () => {
|
it('Start close', () => {
|
||||||
render(<Sidebar
|
render(<Sidebar
|
||||||
componentOptions={[]}
|
componentOptions={[]}
|
||||||
isOpen={false}
|
isOpen={false}
|
||||||
onClick={() => {}}
|
|
||||||
buttonOnClick={() => {}}
|
buttonOnClick={() => {}}
|
||||||
/>);
|
/>);
|
||||||
|
|
||||||
|
@ -49,7 +43,6 @@ describe.concurrent('Sidebar', () => {
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
isOpen={true}
|
isOpen={true}
|
||||||
onClick={() => {}}
|
|
||||||
buttonOnClick={handleButtonClick}
|
buttonOnClick={handleButtonClick}
|
||||||
/>);
|
/>);
|
||||||
const stuff = screen.getByText(/stuff/i);
|
const stuff = screen.getByText(/stuff/i);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue