Skip to content

Commit

Permalink
[Security Solution][Endpoint] Fix and unskip flaky test (elastic#149841)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashokaditya committed Feb 1, 2023
1 parent 9a1a960 commit 76b9267
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { createAppRootMockRenderer } from '../../../common/mock/endpoint';
import { useUserPrivileges } from '../../../common/components/user_privileges';
import { useCanSeeHostIsolationExceptionsMenu } from '../host_isolation_exceptions/view/hooks';
import { endpointPageHttpMock } from '../endpoint_hosts/mocks';
import { getUserPrivilegesMockDefaultValue } from '../../../common/components/user_privileges/__mocks__';

jest.mock('../../../common/components/user_privileges');
jest.mock('../host_isolation_exceptions/view/hooks');
Expand All @@ -33,8 +32,8 @@ describe('when in the Administration tab', () => {
});

afterEach(() => {
useUserPrivilegesMock.mockImplementation(getUserPrivilegesMockDefaultValue);
useCanSeeHostIsolationExceptionsMenuMock.mockReset();
useUserPrivilegesMock.mockReset();
});

describe('when the user has no permissions', () => {
Expand Down Expand Up @@ -101,8 +100,7 @@ describe('when in the Administration tab', () => {
});
});

// FLAKY: https://github.com/elastic/kibana/issues/145204
describe.skip('when the user has permissions', () => {
describe('when the user has permissions', () => {
it('should display the Management view if user has privileges', async () => {
useUserPrivilegesMock.mockReturnValue({
endpointPrivileges: { loading: false, canReadEndpointList: true },
Expand Down

0 comments on commit 76b9267

Please sign in to comment.