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

[SECURITY] Introduce kibana nav #68862

Merged
merged 70 commits into from
Jun 20, 2020
Merged
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
1d80af1
Change the bootstrap of the app
XavierM Jun 5, 2020
61046d7
rename SiemPageName to SecurityPageName
XavierM Jun 6, 2020
da728cb
modify alerts routes
XavierM Jun 11, 2020
0d2ded1
modify cases routes
XavierM Jun 11, 2020
85694c6
modify hosts routes
XavierM Jun 11, 2020
8b14aaa
modify network routes
XavierM Jun 11, 2020
e22ffc1
modify overview routes
XavierM Jun 11, 2020
b6fa804
modify timelines routes
XavierM Jun 11, 2020
1ebe9cf
wip change management route
XavierM Jun 11, 2020
24b13c2
change route for common
XavierM Jun 11, 2020
5042843
some fixing from the first commit
XavierM Jun 11, 2020
2c19e2f
Merge branch 'master' of github.com:elastic/kibana into security-nav-url
XavierM Jun 11, 2020
d59b7dd
modify route for management
XavierM Jun 11, 2020
83558d1
update url format hook to use history
XavierM Jun 11, 2020
0b2557c
bug when you click on external alerts from host or network
XavierM Jun 12, 2020
f72ecdc
improvement from josh feedback
XavierM Jun 12, 2020
dbd5710
Merge branch 'master' of github.com:elastic/kibana into security-nav-url
XavierM Jun 12, 2020
0c35a8a
Merge branch 'master' of github.com:elastic/kibana into security-nav-url
XavierM Jun 12, 2020
e9ae95b
redirect siem to security solution
XavierM Jun 15, 2020
9883885
Merge branch 'master' of github.com:elastic/kibana into security-nav-url
XavierM Jun 15, 2020
2b6a3c1
a little clean up
XavierM Jun 15, 2020
a80574e
Fix types
XavierM Jun 15, 2020
6ebdb6a
fix breadcrumbs
XavierM Jun 15, 2020
a0fc914
fix unit test
XavierM Jun 16, 2020
7531b06
Merge branch 'master' of github.com:elastic/kibana into security-nav-url
XavierM Jun 16, 2020
86012f5
Update index.tsx
patrykkopycinski Jun 16, 2020
efba7dd
Fix cypress
patrykkopycinski Jun 16, 2020
6541019
bug remove timeline when you are in case configure
XavierM Jun 16, 2020
e7da804
Merge branch 'security-nav-url' of github.com:XavierM/kibana into sec…
XavierM Jun 16, 2020
715d194
Merge branch 'master' of github.com:elastic/kibana into security-nav-url
XavierM Jun 16, 2020
807cde2
Fix functionel test for management
XavierM Jun 16, 2020
9886f4e
Fix redirect siem + ml
XavierM Jun 16, 2020
89d6d5c
fixes some cypress tests
MadameSheema Jun 17, 2020
73f78ad
adds 'URL compatibility' test
MadameSheema Jun 17, 2020
6dd88de
bring ml back to alerts
XavierM Jun 17, 2020
1a5d15f
Merge branch 'security-nav-url' of github.com:XavierM/kibana into sec…
XavierM Jun 17, 2020
c85207f
Merge branch 'master' of github.com:elastic/kibana into security-nav-url
XavierM Jun 17, 2020
2943240
Merge branch 'master' of github.com:elastic/kibana into security-nav-url
XavierM Jun 17, 2020
dab391c
review I
XavierM Jun 17, 2020
7b02670
Merge branch 'master' of github.com:elastic/kibana into security-nav-url
XavierM Jun 17, 2020
726f92b
Fix memory leak in timelines page
patrykkopycinski Jun 17, 2020
ecd5781
Merge branch 'master' of github.com:elastic/kibana into security-nav-url
XavierM Jun 17, 2020
c7380d3
fix storage bug for timeline search bar
XavierM Jun 17, 2020
a8250ca
Merge branch 'master' of github.com:elastic/kibana into security-nav-url
XavierM Jun 17, 2020
cdf96c7
Merge branch 'security-nav-url' of github.com:XavierM/kibana into sec…
XavierM Jun 17, 2020
d2bf563
fix endpoint merge + functional test
XavierM Jun 17, 2020
f7d1c66
Merge branch 'master' of github.com:elastic/kibana into security-nav-url
XavierM Jun 17, 2020
884ce77
avoid timeline flyout toggle
XavierM Jun 17, 2020
93c8dbc
Fix link to ml score
XavierM Jun 18, 2020
fa3d27d
Fix breadcrumb
XavierM Jun 18, 2020
10f40b0
Fix management url
XavierM Jun 18, 2020
38c57ce
fix unit test
XavierM Jun 18, 2020
803a8e1
fixes typecheck issue
MadameSheema Jun 18, 2020
ff936e9
fixes remaining url cypress tests
MadameSheema Jun 18, 2020
4a6bfdf
fixes timeline scenario
MadameSheema Jun 18, 2020
f92623e
Merge branch 'master' into security-nav-url
elasticmachine Jun 18, 2020
992943c
fix link to details rule from timeline
XavierM Jun 18, 2020
7f09a1b
Merge branch 'master' of github.com:elastic/kibana into security-nav-url
XavierM Jun 18, 2020
0a8dc14
Merge branch 'master' of github.com:elastic/kibana into security-nav-url
XavierM Jun 18, 2020
be8b6b4
Merge branch 'master' into security-nav-url
elasticmachine Jun 19, 2020
c4d0f9e
review remove absolute path for consistency
XavierM Jun 19, 2020
9bbb8aa
Merge branch 'master' of github.com:elastic/kibana into security-nav-url
XavierM Jun 19, 2020
664ba4d
Merge branch 'security-nav-url' of github.com:XavierM/kibana into sec…
XavierM Jun 19, 2020
7ec8836
Fixing resolver alert generation (#69587)
jonathan-buttner Jun 19, 2020
7c7191f
[Security_Solution][Endpoint] Resolver leverage ancestry array for qu…
jonathan-buttner Jun 19, 2020
ff22d66
fix cypress test
XavierM Jun 19, 2020
6fe244e
skip failing suite (#69595)
spalger Jun 19, 2020
9a41c1d
[Endpoint] Fix flaky endpoints list unit test (#69591)
paul-tavares Jun 19, 2020
3758734
Merge branch 'security-nav-url' of github.com:XavierM/kibana into sec…
XavierM Jun 20, 2020
63a49c3
remove flaky test
XavierM Jun 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions x-pack/plugins/security_solution/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ export const DEFAULT_INTERVAL_VALUE = 300000; // ms
export const DEFAULT_TIMEPICKER_QUICK_RANGES = 'timepicker:quickRanges';
export const NO_ALERT_INDEX = 'no-alert-index-049FC71A-4C2C-446F-9901-37XMC5024C51';

export const APP_OVERVIEW_PATH = `${APP_PATH}/overview`;
export const APP_ALERTS_PATH = `${APP_PATH}/alerts`;
export const APP_HOSTS_PATH = `${APP_PATH}/hosts`;
export const APP_NETWORK_PATH = `${APP_PATH}/network`;
export const APP_TIMELINES_PATH = `${APP_PATH}/timelines`;
export const APP_CASES_PATH = `${APP_PATH}/cases`;
export const APP_MANAGEMENT_PATH = `${APP_PATH}/management`;

/** The comma-delimited list of Elasticsearch indices from which the SIEM app collects events */
export const DEFAULT_INDEX_PATTERN = [
'apm-*-transaction*',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ import {
import { esArchiverLoad } from '../tasks/es_archiver';
import { loginAndWaitForPage } from '../tasks/login';

import { DETECTIONS } from '../urls/navigation';
import { ALERTS_URL } from '../urls/navigation';

describe('Detections', () => {
context('Closing alerts', () => {
beforeEach(() => {
esArchiverLoad('alerts');
loginAndWaitForPage(DETECTIONS);
loginAndWaitForPage(ALERTS_URL);
});

it('Closes and opens alerts', () => {
Expand Down Expand Up @@ -161,7 +161,7 @@ describe('Detections', () => {
context('Opening alerts', () => {
beforeEach(() => {
esArchiverLoad('closed_alerts');
loginAndWaitForPage(DETECTIONS);
loginAndWaitForPage(ALERTS_URL);
});

it('Open one alert when more than one closed alerts are selected', () => {
Expand Down Expand Up @@ -207,7 +207,7 @@ describe('Detections', () => {
context('Marking alerts as in-progress', () => {
beforeEach(() => {
esArchiverLoad('alerts');
loginAndWaitForPage(DETECTIONS);
loginAndWaitForPage(ALERTS_URL);
});

it('Mark one alert in progress when more than one open alerts are selected', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import {
import { esArchiverLoad, esArchiverUnload } from '../tasks/es_archiver';
import { loginAndWaitForPage } from '../tasks/login';

import { DETECTIONS } from '../urls/navigation';
import { ALERTS_URL } from '../urls/navigation';

describe('Detections timeline', () => {
beforeEach(() => {
esArchiverLoad('timeline_alerts');
loginAndWaitForPage(DETECTIONS);
loginAndWaitForPage(ALERTS_URL);
});

afterEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,103 +101,103 @@ describe('ml conditional links', () => {
loginAndWaitForPageWithoutDateRange(mlNetworkSingleIpNullKqlQuery);
cy.url().should(
'include',
'/app/security#/network/ip/127.0.0.1/source?timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))'
'/app/security/network/ip/127.0.0.1/source?timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))'
);
});

it('redirects from a single IP with a value for the query', () => {
loginAndWaitForPageWithoutDateRange(mlNetworkSingleIpKqlQuery);
cy.url().should(
'include',
"/app/security#/network/ip/127.0.0.1/source?query=(language:kuery,query:'(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))"
'/app/security/network/ip/127.0.0.1/source?query=(language:kuery,query:%27(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)%27)&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))'
);
});

it('redirects from a multiple IPs with a null for the query', () => {
loginAndWaitForPageWithoutDateRange(mlNetworkMultipleIpNullKqlQuery);
cy.url().should(
'include',
"app/security#/network/flows?query=(language:kuery,query:'((source.ip:%20%22127.0.0.1%22%20or%20destination.ip:%20%22127.0.0.1%22)%20or%20(source.ip:%20%22127.0.0.2%22%20or%20destination.ip:%20%22127.0.0.2%22))')&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999))"
'app/security/network/flows?query=(language:kuery,query:%27((source.ip:%20%22127.0.0.1%22%20or%20destination.ip:%20%22127.0.0.1%22)%20or%20(source.ip:%20%22127.0.0.2%22%20or%20destination.ip:%20%22127.0.0.2%22))%27)&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999))'
);
});

it('redirects from a multiple IPs with a value for the query', () => {
loginAndWaitForPageWithoutDateRange(mlNetworkMultipleIpKqlQuery);
cy.url().should(
'include',
"/app/security#/network/flows?query=(language:kuery,query:'((source.ip:%20%22127.0.0.1%22%20or%20destination.ip:%20%22127.0.0.1%22)%20or%20(source.ip:%20%22127.0.0.2%22%20or%20destination.ip:%20%22127.0.0.2%22))%20and%20((process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22))')&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))"
'/app/security/network/flows?query=(language:kuery,query:%27((source.ip:%20%22127.0.0.1%22%20or%20destination.ip:%20%22127.0.0.1%22)%20or%20(source.ip:%20%22127.0.0.2%22%20or%20destination.ip:%20%22127.0.0.2%22))%20and%20((process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22))%27)&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))'
);
});

it('redirects from a $ip$ with a null query', () => {
loginAndWaitForPageWithoutDateRange(mlNetworkNullKqlQuery);
cy.url().should(
'include',
'/app/security#/network/flows?timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))'
'/app/security/network/flows?timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))'
);
});

it('redirects from a $ip$ with a value for the query', () => {
loginAndWaitForPageWithoutDateRange(mlNetworkKqlQuery);
cy.url().should(
'include',
"/app/security#/network/flows?query=(language:kuery,query:'(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))"
'/app/security/network/flows?query=(language:kuery,query:%27(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)%27)&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))'
);
});

it('redirects from a single host name with a null for the query', () => {
loginAndWaitForPageWithoutDateRange(mlHostSingleHostNullKqlQuery);
cy.url().should(
'include',
'/app/security#/hosts/siem-windows/anomalies?timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))'
'/app/security/hosts/siem-windows/anomalies?timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))'
);
});

it('redirects from a host name with a variable in the query', () => {
loginAndWaitForPageWithoutDateRange(mlHostSingleHostKqlQueryVariable);
cy.url().should(
'include',
'/app/security#/hosts/siem-windows/anomalies?timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))'
'/app/security/hosts/siem-windows/anomalies?timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))'
);
});

it('redirects from a single host name with a value for query', () => {
loginAndWaitForPageWithoutDateRange(mlHostSingleHostKqlQuery);
cy.url().should(
'include',
"/app/security#/hosts/siem-windows/anomalies?query=(language:kuery,query:'(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))"
'/app/security/hosts/siem-windows/anomalies?query=(language:kuery,query:%27(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)%27)&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))'
);
});

it('redirects from a multiple host names with null for query', () => {
loginAndWaitForPageWithoutDateRange(mlHostMultiHostNullKqlQuery);
cy.url().should(
'include',
"/app/security#/hosts/anomalies?query=(language:kuery,query:'(host.name:%20%22siem-windows%22%20or%20host.name:%20%22siem-suricata%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))"
'/app/security/hosts/anomalies?query=(language:kuery,query:%27(host.name:%20%22siem-windows%22%20or%20host.name:%20%22siem-suricata%22)%27)&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))'
);
});

it('redirects from a multiple host names with a value for query', () => {
loginAndWaitForPageWithoutDateRange(mlHostMultiHostKqlQuery);
cy.url().should(
'include',
"/app/security#/hosts/anomalies?query=(language:kuery,query:'(host.name:%20%22siem-windows%22%20or%20host.name:%20%22siem-suricata%22)%20and%20((process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22))')&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))"
'/app/security/hosts/anomalies?query=(language:kuery,query:%27(host.name:%20%22siem-windows%22%20or%20host.name:%20%22siem-suricata%22)%20and%20((process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22))%27)&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))'
);
});

it('redirects from a undefined/null host name with a null for the KQL', () => {
loginAndWaitForPageWithoutDateRange(mlHostVariableHostNullKqlQuery);
cy.url().should(
'include',
'/app/security#/hosts/anomalies?timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))'
'/app/security/hosts/anomalies?timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))'
);
});

it('redirects from a undefined/null host name but with a value for query', () => {
loginAndWaitForPageWithoutDateRange(mlHostVariableHostKqlQuery);
cy.url().should(
'include',
"/app/security#/hosts/anomalies?query=(language:kuery,query:'(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))"
'/app/security/hosts/anomalies?query=(language:kuery,query:%27(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)%27)&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))'
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { DETECTIONS, HOSTS, NETWORK, OVERVIEW, TIMELINES } from '../screens/security_header';
import { ALERTS, HOSTS, NETWORK, OVERVIEW, TIMELINES } from '../screens/security_header';

import { loginAndWaitForPage } from '../tasks/login';
import { navigateFromHeaderTo } from '../tasks/security_header';
Expand All @@ -16,26 +16,26 @@ describe('top-level navigation common to all pages in the Security app', () => {
});
it('navigates to the Overview page', () => {
navigateFromHeaderTo(OVERVIEW);
cy.url().should('include', '/security#/overview');
cy.url().should('include', '/security/overview');
});

it('navigates to the Hosts page', () => {
navigateFromHeaderTo(HOSTS);
cy.url().should('include', '/security#/hosts');
cy.url().should('include', '/security/hosts');
});

it('navigates to the Network page', () => {
navigateFromHeaderTo(NETWORK);
cy.url().should('include', '/security#/network');
cy.url().should('include', '/security/network');
});

it('navigates to the Detections page', () => {
navigateFromHeaderTo(DETECTIONS);
cy.url().should('include', '/security#/detections');
it('navigates to the Alerts page', () => {
navigateFromHeaderTo(ALERTS);
cy.url().should('include', '/security/alerts');
});

it('navigates to the Timelines page', () => {
navigateFromHeaderTo(TIMELINES);
cy.url().should('include', '/security#/timelines');
cy.url().should('include', '/security/timelines');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
waitForRuleToBeActivated,
} from '../tasks/alert_detection_rules';

import { DETECTIONS } from '../urls/navigation';
import { ALERTS_URL } from '../urls/navigation';

describe('Detection rules', () => {
before(() => {
Expand All @@ -38,7 +38,7 @@ describe('Detection rules', () => {
});

it('Sorts by activated rules', () => {
loginAndWaitForPageWithoutDateRange(DETECTIONS);
loginAndWaitForPageWithoutDateRange(ALERTS_URL);
waitForAlertsPanelToBeLoaded();
waitForAlertsIndexToBeCreated();
goToManageAlertDetectionRules();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import {
import { esArchiverLoad, esArchiverUnload } from '../tasks/es_archiver';
import { loginAndWaitForPageWithoutDateRange } from '../tasks/login';

import { DETECTIONS } from '../urls/navigation';
import { ALERTS_URL } from '../urls/navigation';

describe('Detection rules, custom', () => {
before(() => {
Expand All @@ -74,7 +74,7 @@ describe('Detection rules, custom', () => {
});

it('Creates and activates a new custom rule', () => {
loginAndWaitForPageWithoutDateRange(DETECTIONS);
loginAndWaitForPageWithoutDateRange(ALERTS_URL);
waitForAlertsPanelToBeLoaded();
waitForAlertsIndexToBeCreated();
goToManageAlertDetectionRules();
Expand Down Expand Up @@ -169,7 +169,7 @@ describe('Detection rules, custom', () => {
describe('Deletes custom rules', () => {
beforeEach(() => {
esArchiverLoad('custom_rules');
loginAndWaitForPageWithoutDateRange(DETECTIONS);
loginAndWaitForPageWithoutDateRange(ALERTS_URL);
waitForAlertsPanelToBeLoaded();
waitForAlertsIndexToBeCreated();
goToManageAlertDetectionRules();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { esArchiverLoad, esArchiverUnload } from '../tasks/es_archiver';
import { loginAndWaitForPageWithoutDateRange } from '../tasks/login';
import { exportFirstRule } from '../tasks/alert_detection_rules';

import { DETECTIONS } from '../urls/navigation';
import { ALERTS_URL } from '../urls/navigation';

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

Expand All @@ -32,7 +32,7 @@ describe('Export rules', () => {
});

it('Exports a custom rule', () => {
loginAndWaitForPageWithoutDateRange(DETECTIONS);
loginAndWaitForPageWithoutDateRange(ALERTS_URL);
waitForAlertsPanelToBeLoaded();
waitForAlertsIndexToBeCreated();
goToManageAlertDetectionRules();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ import {
import { esArchiverLoad, esArchiverUnload } from '../tasks/es_archiver';
import { loginAndWaitForPageWithoutDateRange } from '../tasks/login';

import { DETECTIONS } from '../urls/navigation';
import { ALERTS_URL } from '../urls/navigation';

describe('Detection rules, machine learning', () => {
before(() => {
Expand All @@ -70,7 +70,7 @@ describe('Detection rules, machine learning', () => {
});

it('Creates and activates a new ml rule', () => {
loginAndWaitForPageWithoutDateRange(DETECTIONS);
loginAndWaitForPageWithoutDateRange(ALERTS_URL);
waitForAlertsPanelToBeLoaded();
waitForAlertsIndexToBeCreated();
goToManageAlertDetectionRules();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
import { esArchiverLoadEmptyKibana, esArchiverUnloadEmptyKibana } from '../tasks/es_archiver';
import { loginAndWaitForPageWithoutDateRange } from '../tasks/login';

import { DETECTIONS } from '../urls/navigation';
import { ALERTS_URL } from '../urls/navigation';

import { totalNumberOfPrebuiltRules } from '../objects/rule';

Expand All @@ -48,7 +48,7 @@ describe('Detection rules, prebuilt rules', () => {
const expectedNumberOfRules = totalNumberOfPrebuiltRules;
const expectedElasticRulesBtnText = `Elastic rules (${expectedNumberOfRules})`;

loginAndWaitForPageWithoutDateRange(DETECTIONS);
loginAndWaitForPageWithoutDateRange(ALERTS_URL);
waitForAlertsPanelToBeLoaded();
waitForAlertsIndexToBeCreated();
goToManageAlertDetectionRules();
Expand All @@ -73,7 +73,7 @@ describe('Deleting prebuilt rules', () => {
const expectedElasticRulesBtnText = `Elastic rules (${expectedNumberOfRules})`;

esArchiverLoadEmptyKibana();
loginAndWaitForPageWithoutDateRange(DETECTIONS);
loginAndWaitForPageWithoutDateRange(ALERTS_URL);
waitForAlertsPanelToBeLoaded();
waitForAlertsIndexToBeCreated();
goToManageAlertDetectionRules();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { loginAndWaitForPage } from '../tasks/login';

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

describe('URL compatibility', () => {
it('Redirects to Alerts from old Detections URL', () => {
loginAndWaitForPage(DETECTIONS);

cy.url().should('include', '/security/alerts');
});
});
Loading