This commit is contained in:
Stefan Ålund
2020-10-19 21:57:56 +02:00
parent c8133f31aa
commit 4e81187c74
2 changed files with 0 additions and 7 deletions
@@ -34,14 +34,8 @@ describe('<PinButton />', () => {
);
expect(rendered.getByText('Pin Sidebar')).toBeInTheDocument();
/*
const pinButton = rendered.getByTestId('pin');
fireEvent.change(pinButton);
*/
const pinButton = rendered.getByLabelText('Pin Sidebar Switch');
fireEvent.click(pinButton);
expect(mockToggleFn).toHaveBeenCalled();
});
});
@@ -46,7 +46,6 @@ export const PinButton = () => {
checked={isPinned}
onChange={() => toggleSidebarPinState()}
name="pin"
data-testid="pin"
inputProps={{ 'aria-label': 'Pin Sidebar Switch' }}
/>
</Tooltip>