Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SIEM] Bring Cypress tests back to life #71871

Merged
merged 10 commits into from
Jul 16, 2020
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
"winlogbeatMWSysmonOperational": 30,
"__typename": "OverviewHostData"
},
"status": {
"indicesExist": true,
"indexFields": [],
"__typename": "SourceStatus"
},
"__typename": "Source"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ import { loginAndWaitForPage } from '../tasks/login';

import { DETECTIONS_URL } from '../urls/navigation';

// Flaky: https://github.com/elastic/kibana/issues/70727
describe.skip('Alerts', () => {
describe('Alerts', () => {
context('Closing alerts', () => {
beforeEach(() => {
esArchiverLoad('alerts');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { newRule, totalNumberOfPrebuiltRulesInEsArchiveCustomRule } from '../objects/rule';
import { newRule } from '../objects/rule';

import {
CUSTOM_RULES_BTN,
Expand Down Expand Up @@ -64,14 +64,13 @@ import { loginAndWaitForPageWithoutDateRange } from '../tasks/login';

import { DETECTIONS_URL } from '../urls/navigation';

// Flaky: https://github.com/elastic/kibana/issues/67814
describe.skip('Detection rules, custom', () => {
describe('Detection rules, custom', () => {
before(() => {
esArchiverLoad('custom_rule_with_timeline');
esArchiverLoad('timeline');
});

after(() => {
esArchiverUnload('custom_rule_with_timeline');
esArchiverUnload('timeline');
});

it('Creates and activates a new custom rule', () => {
Expand All @@ -90,7 +89,7 @@ describe.skip('Detection rules, custom', () => {
changeToThreeHundredRowsPerPage();
waitForRulesToBeLoaded();

const expectedNumberOfRules = totalNumberOfPrebuiltRulesInEsArchiveCustomRule + 1;
const expectedNumberOfRules = 1;
cy.get(RULES_TABLE).then(($table) => {
cy.wrap($table.find(RULES_ROW).length).should('eql', expectedNumberOfRules);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import { DETECTIONS_URL } from '../urls/navigation';

const EXPECTED_EXPORTED_RULE_FILE_PATH = 'cypress/test_files/expected_rules_export.ndjson';

// Flakky: https://github.com/elastic/kibana/issues/69849
describe.skip('Export rules', () => {
describe('Export rules', () => {
before(() => {
esArchiverLoad('export_rule');
cy.server();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ describe('Alerts rules, prebuilt rules', () => {
});
});

// FLAKY: https://github.com/elastic/kibana/issues/71814
describe.skip('Deleting prebuilt rules', () => {
describe('Deleting prebuilt rules', () => {
beforeEach(() => {
const expectedNumberOfRules = totalNumberOfPrebuiltRules;
const expectedElasticRulesBtnText = `Elastic rules (${expectedNumberOfRules})`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import { loginAndWaitForPage } from '../tasks/login';

import { DETECTIONS_URL } from '../urls/navigation';

// Flakky: https://github.com/elastic/kibana/issues/71220
describe.skip('Alerts timeline', () => {
describe('Alerts timeline', () => {
beforeEach(() => {
esArchiverLoad('timeline_alerts');
loginAndWaitForPage(DETECTIONS_URL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ const defaultHeadersInDefaultEcsCategory = [
{ id: 'destination.ip' },
];

// Flakky: https://github.com/elastic/kibana/issues/70757
describe.skip('Events Viewer', () => {
describe('Events Viewer', () => {
context('Fields rendering', () => {
before(() => {
loginAndWaitForPage(HOSTS_URL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { loginAndWaitForPage } from '../tasks/login';

import { OVERVIEW_URL } from '../urls/navigation';

describe.skip('Overview Page', () => {
describe('Overview Page', () => {
before(() => {
cy.stubSecurityApi('overview');
loginAndWaitForPage(OVERVIEW_URL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ import {

import { HOSTS_URL } from '../urls/navigation';

// Flaky: https://github.com/elastic/kibana/issues/71361
describe.skip('toggle column in timeline', () => {
describe('toggle column in timeline', () => {
before(() => {
loginAndWaitForPage(HOSTS_URL);
});
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/security_solution/cypress/objects/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const mitre2: Mitre = {
};

export const newRule: CustomRule = {
customQuery: 'host.name: * ',
customQuery: 'host.name:*',
name: 'New Rule Test',
description: 'The new rule description.',
severity: 'High',
Expand All @@ -69,7 +69,7 @@ export const newRule: CustomRule = {
falsePositivesExamples: ['False1', 'False2'],
mitre: [mitre1, mitre2],
note: '# test markdown',
timelineId: '3270f530-bc84-11ea-b73f-89980a6a1ce7',
timelineId: '0162c130-78be-11ea-9718-118a926974a4',
};

export const machineLearningRule: MachineLearningRule = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{"author":[],"actions":[],"created_at":"2020-07-03T10:44:10.567Z","updated_at":"2020-07-03T10:44:10.941Z","created_by":"elastic","description":"Export rule","enabled":true,"false_positives":[],"filters":[],"from":"now-360s","id":"ad65b1b6-be18-4e41-9d0a-89d8576053d8","immutable":false,"index":["apm-*-transaction*","auditbeat-*","endgame-*","filebeat-*","packetbeat-*","winlogbeat-*"],"interval":"5m","rule_id":"50a3776b-144d-4cff-9f1f-1173e0d5d4a4","language":"kuery","license":"","output_index":".siem-signals-default","max_signals":100,"risk_score":50,"risk_score_mapping":[],"rule_name_override":"","name":"Export rule","query":"host.name: * ","references":[],"meta":{"from":"1m","kibana_siem_app_url":"http://localhost:5620/app/security"},"severity":"low","severity_mapping":[],"updated_by":"elastic","tags":[],"to":"now","type":"query","threat":[],"throttle":"no_actions","timestamp_override":"","version":1,"exceptions_list":[]}
{"author":[],"actions":[],"created_at":"2020-07-15T10:45:15.954Z","updated_at":"2020-07-15T10:45:16.874Z","created_by":"elastic","description":"Export rule","enabled":true,"false_positives":[],"filters":[],"from":"now-360s","id":"a4772daa-a3ef-44a3-8035-6abd1bf2893a","immutable":false,"index":["apm-*-transaction*","auditbeat-*","endgame-*","filebeat-*","logs-*","packetbeat-*","winlogbeat-*"],"interval":"5m","rule_id":"1b08a0c2-8243-463e-92c2-b464a8c97cd4","language":"kuery","license":"","output_index":".siem-signals-default","max_signals":100,"risk_score":50,"risk_score_mapping":[],"name":"Export rule","query":"host.name: *","references":[],"meta":{"from":"1m","kibana_siem_app_url":"http://localhost:5620/app/security/detections"},"severity":"low","severity_mapping":[],"updated_by":"elastic","tags":[],"to":"now","type":"query","threat":[],"throttle":"no_actions","version":1,"exceptions_list":[]}
{"exported_count":1,"missing_rules":[],"missing_rules_count":0}
Binary file not shown.
Loading