Skip to content

Commit

Permalink
Test navigation of servlerss
Browse files Browse the repository at this point in the history
  • Loading branch information
kpatticha committed Jun 29, 2023
1 parent 57998af commit 8f9be66
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,11 @@

describe('Serverless', () => {
it('Should login', () => {
// TODO move to command
cy.visit('/', {
auth: {
username: 'elastic',
password: 'changeme',
},
});
cy.loginAsElasticUser();
});

it('contains the side navigation for observabilitity serverless', () => {
cy.visit('/', {
auth: {
username: 'elastic',
password: 'changeme',
},
});
cy.loginAsElasticUser();
cy.contains('Discover');
cy.contains('Dashboards');
cy.contains('Visualizations');
Expand All @@ -32,4 +21,69 @@ describe('Serverless', () => {
cy.contains('Get started');
cy.contains('Management');
});

it('navigates to discover-dashboard-viz links', () => {
cy.loginAsElasticUser();

cy.contains('Discover').click();
cy.url().should('include', '/app/discover');

cy.contains('Dashboard').click();
cy.url().should('include', '/app/dashboards');

cy.contains('Visualizations').click();
cy.url().should('include', '/app/visualize');
});

it('navigates to alerts links', () => {
cy.loginAsElasticUser();

cy.contains('Alerts').click();
cy.url().should('include', '/observability/alerts');

cy.contains('Cases').click();
cy.url().should('include', '/observability/cases');

cy.contains('SLOs').click();
cy.url().should('include', '/observability/slos');
});

it('navigates to apm links', () => {
cy.loginAsElasticUser();

cy.contains('Services').click();
cy.url().should('include', '/apm/services');

cy.contains('Traces').click();
cy.url().should('include', '/apm/traces');

cy.contains('Dependencies').click();
cy.url().should('include', '/apm/dependencies/inventory');
});

it('navigates to get started links', () => {
cy.loginAsElasticUser();

cy.contains('Get started').click();
cy.url().should('include', '/app/observabilityOnboarding');
});

it('navigates to management links', () => {
cy.loginAsElasticUser();

cy.contains('Management').click();
cy.contains('Stack Monitoring').click();
cy.url().should('include', '/app/monitoring');

cy.contains('Integrations').click();
cy.url().should('include', '/app/integrations/browse');

cy.contains('Fleet').click();
cy.url().should('include', '/app/fleet/agents');

cy.contains('Osquery').click();
cy.url().should('include', 'app/osquery');
});
});

export {};
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

Cypress.on('uncaught:exception', (err, runnable) => {
return false;
});

import './commands';

0 comments on commit 8f9be66

Please sign in to comment.