[EDR Workflows] Test metrics flakiness (#169527)

This commit is contained in:
Tomasz Ciecierski 2023-10-23 19:01:03 +02:00 committed by GitHub
parent adf3b8b436
commit 320eff2870
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,52 +11,52 @@ import { loadSavedQuery, cleanupSavedQuery } from '../../tasks/api_fixtures';
import { triggerLoadData } from '../../tasks/inventory';
import { ServerlessRoleName } from '../../support/roles';
// FLAKY: https://github.com/elastic/kibana/issues/169369
// FLAKY: https://github.com/elastic/kibana/issues/169370
describe.skip('ALL - Inventory', { tags: ['@ess'] }, () => {
describe('ALL - Inventory', { tags: ['@ess'] }, () => {
let savedQueryName: string;
let savedQueryId: string;
before(() => {
beforeEach(() => {
loadSavedQuery().then((data) => {
savedQueryId = data.saved_object_id;
savedQueryName = data.id;
});
});
beforeEach(() => {
cy.login(ServerlessRoleName.SOC_MANAGER);
navigateTo('/app/osquery');
});
after(() => {
afterEach(() => {
cleanupSavedQuery(savedQueryId);
});
it('should be able to run the query', () => {
cy.getBySel('toggleNavButton').click();
cy.contains('Infrastructure').click();
describe('', () => {
beforeEach(() => {
cy.login(ServerlessRoleName.SOC_MANAGER);
navigateTo('/app/osquery');
});
triggerLoadData();
cy.contains('Osquery').click();
inputQuery('select * from uptime;');
it('should be able to run the query', () => {
cy.getBySel('toggleNavButton').click();
cy.contains('Infrastructure').click();
submitQuery();
checkResults();
});
triggerLoadData();
cy.contains('Osquery').click();
inputQuery('select * from uptime;');
it('should be able to run the previously saved query', () => {
cy.getBySel('toggleNavButton').click();
cy.getBySel('collapsibleNavAppLink').contains('Infrastructure').click();
submitQuery();
checkResults();
});
triggerLoadData();
cy.contains('Osquery').click();
it('should be able to run the previously saved query', () => {
cy.getBySel('toggleNavButton').click();
cy.getBySel('collapsibleNavAppLink').contains('Infrastructure').click();
cy.getBySel('comboBoxInput').first().click();
cy.wait(500);
cy.getBySel('comboBoxInput').first().type(`${savedQueryName}{downArrow}{enter}`);
triggerLoadData();
cy.contains('Osquery').click();
submitQuery();
checkResults();
cy.getBySel('comboBoxInput').first().click();
cy.wait(500);
cy.getBySel('comboBoxInput').first().type(`${savedQueryName}{downArrow}{enter}`);
submitQuery();
checkResults();
});
});
});