Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas committed Jan 16, 2024
1 parent 862acf8 commit 963061d
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { basicCase } from '../../containers/mock';

import { Description } from '.';
import type { AppMockRenderer } from '../../common/mock';
import { createAppMockRenderer, noUpdateCasesPermissions, TestProviders } from '../../common/mock';
import { createAppMockRenderer, noUpdateCasesPermissions } from '../../common/mock';
import { MAX_DESCRIPTION_LENGTH } from '../../../common/constants';

jest.mock('../../common/lib/kibana');
Expand Down Expand Up @@ -124,11 +124,8 @@ describe('Description', () => {
});

it('should hide the edit button when the user does not have update permissions', async () => {
appMockRender.render(
<TestProviders permissions={noUpdateCasesPermissions()}>
<Description {...defaultProps} onUpdateField={onUpdateField} />
</TestProviders>
);
appMockRender = createAppMockRenderer({ permissions: noUpdateCasesPermissions() });
appMockRender.render(<Description {...defaultProps} onUpdateField={onUpdateField} />);

expect(await screen.findByText('Security banana Issue')).toBeInTheDocument();
expect(screen.queryByTestId('description-edit-icon')).not.toBeInTheDocument();
Expand Down

0 comments on commit 963061d

Please sign in to comment.