Skip to content

Commit

Permalink
completes top-level navigation tests (#69694)
Browse files Browse the repository at this point in the history
  • Loading branch information
MadameSheema authored Jun 23, 2020
1 parent 5fb206f commit 1cdeec0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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');
Expand All @@ -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');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -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"]';
Expand Down

0 comments on commit 1cdeec0

Please sign in to comment.