Fix items test

Signed-off-by: hiba-aldalaty <hibaaldalaty@gmail.com>
This commit is contained in:
hiba-aldalaty
2021-10-28 10:48:31 +01:00
parent 91de276f6e
commit ea5509382f
@@ -20,7 +20,7 @@ import { createEvent, fireEvent, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import HomeIcon from '@material-ui/icons/Home';
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
import { Sidebar } from './Bar';
import { Sidebar, SidebarExpandButton } from './Bar';
import { SidebarItem, SidebarSearchField } from './Items';
import { renderHook } from '@testing-library/react-hooks';
import { hexToRgb, makeStyles } from '@material-ui/core/styles';
@@ -44,9 +44,10 @@ async function renderSidebar() {
text="Create..."
className={result.current.spotlight}
/>
<SidebarExpandButton />
</Sidebar>,
);
userEvent.hover(screen.getByTestId('sidebar-root'));
userEvent.click(screen.getByTestId('sidebar-expand-button'));
}
describe('Items', () => {