Skip to content

Commit

Permalink
fix(dashboard-css): make to add injectCustomCSS into HeaderActionsDro…
Browse files Browse the repository at this point in the history
…pdown.test.tsx
  • Loading branch information
prosdev0107 committed Mar 10, 2022
1 parent f72acbe commit e447d19
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { render, screen } from 'spec/helpers/testing-library';
import userEvent from '@testing-library/user-event';
import fetchMock from 'fetch-mock';
import { HeaderDropdownProps } from 'src/dashboard/components/Header/types';
import injectCustomCss from 'src/dashboard/util/injectCustomCss';
import HeaderActionsDropdown from '.';

const createProps = () => ({
Expand Down Expand Up @@ -180,7 +181,9 @@ test('should NOT render the "Refresh dashboard" menu item as disabled', async ()

test('should render with custom css', () => {
const mockedProps = createProps();
const { customCss } = mockedProps;
render(setup(mockedProps));
injectCustomCss(customCss);
expect(screen.getByRole('button')).toHaveStyle('margin-left: 100px');
});

Expand Down

0 comments on commit e447d19

Please sign in to comment.