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 authored and darnautov committed Feb 7, 2023
1 parent d4ae0af commit 16e9608
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import type { AppContextTestRender } from '../../../common/mock/endpoint';
import { createAppRootMockRenderer } from '../../../common/mock/endpoint';
import { useUserPrivileges } from '../../../common/components/user_privileges';
import { endpointPageHttpMock } from '../endpoint_hosts/mocks';
import { getUserPrivilegesMockDefaultValue } from '../../../common/components/user_privileges/__mocks__';

jest.mock('../../../common/components/user_privileges');

Expand All @@ -30,7 +29,7 @@ describe('when in the Administration tab', () => {
});

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

describe('when the user has no permissions', () => {
Expand Down Expand Up @@ -97,8 +96,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, canAccessFleet: true },
Expand Down

0 comments on commit 16e9608

Please sign in to comment.