Skip to content

Commit

Permalink
remove artifacts after endpoints.cy.ts test
Browse files Browse the repository at this point in the history
  • Loading branch information
szwarckonrad committed Apr 18, 2023
1 parent d2fbb5d commit 9415935
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,31 @@
* 2.0.
*/

import type { ReturnTypeFromChainable } from '../../types';
import { indexEndpointHosts } from '../../tasks/index_endpoint_hosts';
import { login } from '../../tasks/login';
import { runEndpointLoaderScript } from '../../tasks/run_endpoint_loader';

describe('Endpoints page', () => {
let endpointData: ReturnTypeFromChainable<typeof indexEndpointHosts>;

before(() => {
runEndpointLoaderScript();
indexEndpointHosts().then((indexEndpoints) => {
endpointData = indexEndpoints;
});
});

beforeEach(() => {
login();
});

after(() => {
if (endpointData) {
endpointData.cleanup();
// @ts-expect-error ignore setting to undefined
endpointData = undefined;
}
});

it('Loads the endpoints page', () => {
cy.visit('/app/security/administration/endpoints');
cy.contains('Hosts running Elastic Defend').should('exist');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,17 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
'Actions',
],
[
'Host-dpu1a2r2yi',
'Host-9qenwrl9ko',
'x',
'x',
'Warning',
'macOS',
'10.2.17.24, 10.56.215.200,10.254.196.130',
'x',
'x',
'',
],
[
'Host-rs9wp4o6l9',
'x',
'x',
'Success',
'Linux',
'10.138.79.131, 10.170.160.154',
'10.56.228.101, 10.201.120.140,10.236.180.146',
'x',
'x',
'',
],
['Host-qw2bti801m', 'x', 'x', 'Failure', 'macOS', '10.244.59.227', 'x', 'x', ''],
[
'Host-u5jy6j0pwb',
'x',
Expand Down

0 comments on commit 9415935

Please sign in to comment.