Skip to content

Commit

Permalink
Tests for Security Complete with Endpoint Complete
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-tavares committed Jul 24, 2023
1 parent 25efef1 commit e03520d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
Expand Up @@ -5,8 +5,9 @@
* 2.0.
*/

// FIXME:PT Delete when implemented
export {};
import { FLEET_BASE_PATH } from '@kbn/fleet-plugin/public/constants';
import { login } from '../../../tasks/login';
import { getEndpointManagementPageList } from '../../../lib';

describe(
'App Features for Complete PLI with Endpoint Complete',
Expand All @@ -21,6 +22,22 @@ describe(
},
},
() => {
// FIXME:PT implement
beforeEach(() => {
login();
});

const allPages = getEndpointManagementPageList();

for (const { url, title, pageTestSubj } of allPages) {
it(`should allow access to ${title}`, () => {
cy.visit(url);
cy.getByTestSubj(pageTestSubj).should('exist');
});
}

it(`should have access to Fleet`, () => {
cy.visit(FLEET_BASE_PATH);
cy.getByTestSubj('fleetAgentListTable').should('exist');
});
}
);
Expand Up @@ -5,6 +5,7 @@
* 2.0.
*/

import { FLEET_BASE_PATH } from '@kbn/fleet-plugin/public/constants';
import { login } from '../../../tasks/login';
import { getEndpointManagementPageMap } from '../../../lib';

Expand Down Expand Up @@ -32,8 +33,9 @@ describe(
allPages.trustedApps,
allPages.blocklist,
allPages.eventFilters,
allPages.hostIsolationExceptions,
];
const deniedPages = [allPages.hostIsolationExceptions, allPages.responseActionLog];
const deniedPages = [allPages.responseActionLog];

for (const { url, title, pageTestSubj } of allowedPages) {
it(`should allow access to ${title}`, () => {
Expand All @@ -48,5 +50,10 @@ describe(
cy.getByTestSubj('noPrivilegesPage').should('exist');
});
}

it(`should have access to Fleet`, () => {
cy.visit(FLEET_BASE_PATH);
cy.getByTestSubj('fleetAgentListTable').should('exist');
});
}
);

0 comments on commit e03520d

Please sign in to comment.