mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[EDR Workflows][Osquery] Skip failing cypress tests in the MKI (#209067)
Added the @skipInServerlessMKI label to 3 test files that are currently failing in MKI. Tracking ticket - https://github.com/elastic/security-team/issues/11726
This commit is contained in:
parent
b94475c642
commit
516903e2a4
3 changed files with 91 additions and 87 deletions
|
@ -61,7 +61,7 @@ describe('Add to Cases', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('security', { tags: ['@ess', '@serverless'] }, () => {
|
||||
describe('security', { tags: ['@ess', '@serverless', '@skipInServerlessMKI'] }, () => {
|
||||
let caseId: string;
|
||||
let caseTitle: string;
|
||||
|
||||
|
|
|
@ -23,93 +23,97 @@ import { getAdvancedButton } from '../../screens/integrations';
|
|||
import { loadSavedQuery, cleanupSavedQuery } from '../../tasks/api_fixtures';
|
||||
import { ServerlessRoleName } from '../../support/roles';
|
||||
|
||||
describe('ALL - Live Query run custom and saved', { tags: ['@ess', '@serverless'] }, () => {
|
||||
let savedQueryId: string;
|
||||
let savedQueryName: string;
|
||||
describe(
|
||||
'ALL - Live Query run custom and saved',
|
||||
{ tags: ['@ess', '@serverless', '@skipInServerlessMKI'] },
|
||||
() => {
|
||||
let savedQueryId: string;
|
||||
let savedQueryName: string;
|
||||
|
||||
before(() => {
|
||||
loadSavedQuery({
|
||||
interval: '3600',
|
||||
query: 'select * from uptime;',
|
||||
ecs_mapping: {},
|
||||
}).then((savedQuery) => {
|
||||
savedQueryId = savedQuery.saved_object_id;
|
||||
savedQueryName = savedQuery.id;
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
cy.login(ServerlessRoleName.SOC_MANAGER);
|
||||
navigateTo('/app/osquery');
|
||||
});
|
||||
|
||||
after(() => {
|
||||
cleanupSavedQuery(savedQueryId);
|
||||
});
|
||||
|
||||
it('should run query and enable ecs mapping', () => {
|
||||
const cmd = Cypress.platform === 'darwin' ? '{meta}{enter}' : '{ctrl}{enter}';
|
||||
cy.contains('New live query').click();
|
||||
selectAllAgents();
|
||||
inputQuery('select * from uptime;');
|
||||
cy.wait(500);
|
||||
// checking submit by clicking cmd+enter
|
||||
inputQuery(cmd);
|
||||
checkResults();
|
||||
checkActionItemsInResults({
|
||||
lens: true,
|
||||
discover: true,
|
||||
cases: true,
|
||||
timeline: false,
|
||||
});
|
||||
cy.get(
|
||||
'[data-gridcell-column-index="1"][data-test-subj="dataGridHeaderCell-osquery.days.number"]'
|
||||
).should('exist');
|
||||
cy.get(
|
||||
'[data-gridcell-column-index="2"][data-test-subj="dataGridHeaderCell-osquery.hours.number"]'
|
||||
).should('exist');
|
||||
|
||||
getAdvancedButton().click();
|
||||
typeInECSFieldInput('message{downArrow}{enter}');
|
||||
typeInOsqueryFieldInput('days{downArrow}{enter}');
|
||||
submitQuery();
|
||||
|
||||
checkResults();
|
||||
cy.getBySel(RESULTS_TABLE).within(() => {
|
||||
cy.getBySel(RESULTS_TABLE_BUTTON).should('exist');
|
||||
});
|
||||
cy.get('[data-gridcell-column-index="1"][data-test-subj="dataGridHeaderCell-message"]').should(
|
||||
'exist'
|
||||
);
|
||||
cy.get(
|
||||
'[data-gridcell-column-index="2"][data-test-subj="dataGridHeaderCell-osquery.days.number"]'
|
||||
)
|
||||
.should('exist')
|
||||
.within(() => {
|
||||
cy.get(`.euiToolTipAnchor`);
|
||||
before(() => {
|
||||
loadSavedQuery({
|
||||
interval: '3600',
|
||||
query: 'select * from uptime;',
|
||||
ecs_mapping: {},
|
||||
}).then((savedQuery) => {
|
||||
savedQueryId = savedQuery.saved_object_id;
|
||||
savedQueryName = savedQuery.id;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('should run customized saved query', () => {
|
||||
cy.contains('New live query').click();
|
||||
selectAllAgents();
|
||||
cy.getBySel(SAVED_QUERY_DROPDOWN_SELECT).type(`${savedQueryName}{downArrow}{enter}`);
|
||||
inputQuery('{selectall}{backspace}select * from users;');
|
||||
getAdvancedButton().click();
|
||||
fillInQueryTimeout('601');
|
||||
cy.wait(1000);
|
||||
submitQuery();
|
||||
checkResults();
|
||||
navigateTo('/app/osquery');
|
||||
cy.get('[aria-label="Run query"]').first().should('be.visible').click();
|
||||
beforeEach(() => {
|
||||
cy.login(ServerlessRoleName.SOC_MANAGER);
|
||||
navigateTo('/app/osquery');
|
||||
});
|
||||
|
||||
cy.getBySel(LIVE_QUERY_EDITOR).contains('select * from users;');
|
||||
verifyQueryTimeout('601');
|
||||
});
|
||||
after(() => {
|
||||
cleanupSavedQuery(savedQueryId);
|
||||
});
|
||||
|
||||
it('should open query details by clicking the details icon', () => {
|
||||
cy.get('[aria-label="Details"]').first().should('be.visible').click();
|
||||
cy.contains('Live query details');
|
||||
cy.contains('select * from users;');
|
||||
});
|
||||
});
|
||||
it('should run query and enable ecs mapping', () => {
|
||||
const cmd = Cypress.platform === 'darwin' ? '{meta}{enter}' : '{ctrl}{enter}';
|
||||
cy.contains('New live query').click();
|
||||
selectAllAgents();
|
||||
inputQuery('select * from uptime;');
|
||||
cy.wait(500);
|
||||
// checking submit by clicking cmd+enter
|
||||
inputQuery(cmd);
|
||||
checkResults();
|
||||
checkActionItemsInResults({
|
||||
lens: true,
|
||||
discover: true,
|
||||
cases: true,
|
||||
timeline: false,
|
||||
});
|
||||
cy.get(
|
||||
'[data-gridcell-column-index="1"][data-test-subj="dataGridHeaderCell-osquery.days.number"]'
|
||||
).should('exist');
|
||||
cy.get(
|
||||
'[data-gridcell-column-index="2"][data-test-subj="dataGridHeaderCell-osquery.hours.number"]'
|
||||
).should('exist');
|
||||
|
||||
getAdvancedButton().click();
|
||||
typeInECSFieldInput('message{downArrow}{enter}');
|
||||
typeInOsqueryFieldInput('days{downArrow}{enter}');
|
||||
submitQuery();
|
||||
|
||||
checkResults();
|
||||
cy.getBySel(RESULTS_TABLE).within(() => {
|
||||
cy.getBySel(RESULTS_TABLE_BUTTON).should('exist');
|
||||
});
|
||||
cy.get(
|
||||
'[data-gridcell-column-index="1"][data-test-subj="dataGridHeaderCell-message"]'
|
||||
).should('exist');
|
||||
cy.get(
|
||||
'[data-gridcell-column-index="2"][data-test-subj="dataGridHeaderCell-osquery.days.number"]'
|
||||
)
|
||||
.should('exist')
|
||||
.within(() => {
|
||||
cy.get(`.euiToolTipAnchor`);
|
||||
});
|
||||
});
|
||||
|
||||
it('should run customized saved query', () => {
|
||||
cy.contains('New live query').click();
|
||||
selectAllAgents();
|
||||
cy.getBySel(SAVED_QUERY_DROPDOWN_SELECT).type(`${savedQueryName}{downArrow}{enter}`);
|
||||
inputQuery('{selectall}{backspace}select * from users;');
|
||||
getAdvancedButton().click();
|
||||
fillInQueryTimeout('601');
|
||||
cy.wait(1000);
|
||||
submitQuery();
|
||||
checkResults();
|
||||
navigateTo('/app/osquery');
|
||||
cy.get('[aria-label="Run query"]').first().should('be.visible').click();
|
||||
|
||||
cy.getBySel(LIVE_QUERY_EDITOR).contains('select * from users;');
|
||||
verifyQueryTimeout('601');
|
||||
});
|
||||
|
||||
it('should open query details by clicking the details icon', () => {
|
||||
cy.get('[aria-label="Details"]').first().should('be.visible').click();
|
||||
cy.contains('Live query details');
|
||||
cy.contains('select * from users;');
|
||||
});
|
||||
}
|
||||
);
|
||||
|
|
|
@ -22,7 +22,7 @@ import {
|
|||
} from '../../tasks/api_fixtures';
|
||||
import type { ServerlessRoleName } from '../../support/roles';
|
||||
|
||||
describe(`T1 and T2 analysts`, { tags: ['@ess', '@serverless'] }, () => {
|
||||
describe(`T1 and T2 analysts`, { tags: ['@ess', '@serverless', '@skipInServerlessMKI'] }, () => {
|
||||
['t1_analyst', 't2_analyst'].forEach((role: string) => {
|
||||
describe(`${role}- READ + runSavedQueries `, () => {
|
||||
let savedQueryName: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue