completes top-level navigation tests (#69694)

This commit is contained in:
MadameSheema 2020-06-23 18:51:20 +02:00 committed by GitHub
parent 5fb206f67f
commit 1cdeec07b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 6 deletions

View file

@ -3,7 +3,15 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { ALERTS, HOSTS, NETWORK, OVERVIEW, TIMELINES } from '../screens/security_header';
import {
ALERTS,
CASES,
HOSTS,
MANAGEMENT,
NETWORK,
OVERVIEW,
TIMELINES,
} from '../screens/security_header';
import { loginAndWaitForPage } from '../tasks/login';
import { navigateFromHeaderTo } from '../tasks/security_header';
@ -14,11 +22,17 @@ describe('top-level navigation common to all pages in the Security app', () => {
before(() => {
loginAndWaitForPage(TIMELINES_PAGE);
});
it('navigates to the Overview page', () => {
navigateFromHeaderTo(OVERVIEW);
cy.url().should('include', '/security/overview');
});
it('navigates to the Alerts page', () => {
navigateFromHeaderTo(ALERTS);
cy.url().should('include', '/security/alerts');
});
it('navigates to the Hosts page', () => {
navigateFromHeaderTo(HOSTS);
cy.url().should('include', '/security/hosts');
@ -29,13 +43,18 @@ describe('top-level navigation common to all pages in the Security app', () => {
cy.url().should('include', '/security/network');
});
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');
});
it('navigates to the Cases page', () => {
navigateFromHeaderTo(CASES);
cy.url().should('include', '/security/cases');
});
it('navigates to the Management page', () => {
navigateFromHeaderTo(MANAGEMENT);
cy.url().should('include', '/security/management');
});
});

View file

@ -8,10 +8,14 @@ export const ALERTS = '[data-test-subj="navigation-alerts"]';
export const BREADCRUMBS = '[data-test-subj="breadcrumbs"] a';
export const CASES = '[data-test-subj="navigation-case"]';
export const HOSTS = '[data-test-subj="navigation-hosts"]';
export const KQL_INPUT = '[data-test-subj="queryInput"]';
export const MANAGEMENT = '[data-test-subj="navigation-management"]';
export const NETWORK = '[data-test-subj="navigation-network"]';
export const OVERVIEW = '[data-test-subj="navigation-overview"]';