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

removed observability tests that can be run locally #939

Merged
merged 3 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ describe('Testing dashboard table empty state', () => {
'[data-test-subj="trace-groups-service-operation-accordian"]'
).click();
});

it('Renders empty state', () => {
cy.contains(' (0)').should('exist');
cy.contains('No matches').should('exist');
});
});

describe('Testing dashboard table', () => {
Expand All @@ -39,13 +34,6 @@ describe('Testing dashboard table', () => {
).click();
});

it('Renders the dashboard table', () => {
cy.contains(' (10)').should('exist');
cy.contains('client_cancel_order').should('exist');
cy.contains('166.44').should('exist');
cy.contains('7.14%').should('exist');
});

it('Adds the percentile filters', () => {
cy.contains(' >= 95 percentile').click({ force: true });
cy.wait(delayTime);
Expand Down Expand Up @@ -107,26 +95,6 @@ describe('Testing plots', () => {
).click();
});

it('Renders service map', () => {
// plotly scale texts are in attribute "data-unformatted"
cy.get('text.ytitle[data-unformatted="Average duration (ms)"]').should(
'exist'
);
cy.get('text[data-unformatted="200"]').should('exist');
cy.get('.vis-network').should('exist');

cy.get('.euiButton__text[title="Errors"]').click();
cy.get('text.ytitle[data-unformatted="Error rate (%)"]').should('exist');

cy.get('.euiButton__text[title="Request Rate"]').click();
cy.get('text.ytitle[data-unformatted="Request rate (spans)"]').should(
'exist'
);

cy.get('input[type="search"]').eq(1).focus().type('payment{enter}');
cy.wait(delayTime);
});

it('Renders plots', () => {
cy.get('text.ytitle[data-unformatted="Error rate (%)"]').should('exist');
cy.get('text.annotation-text[data-unformatted="Now: 14.81%"]').should(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,6 @@ import {
setTimeFilter,
} from '../../../utils/constants';

describe('Testing services table empty state', () => {
beforeEach(() => {
cy.visit('app/observability-traces#/services', {
onBeforeLoad: (win) => {
win.sessionStorage.clear();
},
});
cy.wait(delayTime * 3);
});

it('Renders empty state', () => {
cy.contains(' (0)').should('exist');
cy.contains('No matches').should('exist');
});
});

describe('Testing services table', () => {
beforeEach(() => {
cy.visit('app/observability-traces#/services', {
Expand All @@ -37,13 +21,6 @@ describe('Testing services table', () => {
setTimeFilter();
});

it('Renders the services table', () => {
cy.contains(' (8)').should('exist');
cy.contains('analytics-service, frontend-client, recommendation').should(
'exist'
);
});

it('Searches correctly', () => {
cy.get('input[type="search"]')
.first()
Expand All @@ -66,12 +43,6 @@ describe('Testing service view empty state', () => {
},
});
});

it('Renders service view empty state', () => {
cy.contains('frontend-client').should('exist');
cy.get('.euiText').contains('0').should('exist');
cy.get('.euiText').contains('-').should('exist');
});
});

describe('Testing service view', () => {
Expand All @@ -87,9 +58,4 @@ describe('Testing service view', () => {
});
setTimeFilter(undefined, false);
});

it('Renders service view', () => {
cy.get('h2.euiTitle').contains(SERVICE_NAME).should('exist');
cy.get('div.vis-network').should('exist');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,6 @@

import { delayTime, setTimeFilter, TRACE_ID } from '../../../utils/constants';

describe('Testing traces table empty state', () => {
beforeEach(() => {
cy.visit('app/observability-traces#/traces', {
onBeforeLoad: (win) => {
win.sessionStorage.clear();
},
});
cy.wait(delayTime * 3);
});

it('Renders empty state', () => {
cy.contains(' (0)').should('exist');
cy.contains('No matches').should('exist');
});
});

describe('Testing traces table', () => {
beforeEach(() => {
cy.visit('app/observability-traces#/traces', {
Expand All @@ -33,18 +17,6 @@ describe('Testing traces table', () => {
setTimeFilter();
});

it('Renders the traces table', () => {
cy.contains(' (108)').should('exist');
cy.contains('03/25/2021 10:23:45').should('exist');
cy.contains('03f9c770db5ee2f1caac0...').should('exist');
cy.contains('224.99').should('exist');

// test data contains output from data-prepper 0.8, which doesn't have fields denormalized
// Trace Analytics should be able to handle the discrepancy if some fields cannot be parsed
cy.contains('Invalid date').should('exist');
cy.contains('-').should('exist');
});

it('Sorts the traces table', () => {
cy.get('.euiTableRow').first().contains('-').should('exist');
cy.get('.euiTableCellContent').contains('Trace group').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@ const moveToPanelHome = () => {
cy.wait(delay * 3);
};

const moveToTestPanel = () => {
moveToPanelHome();
cy.get('.euiTableCellContent')
.contains(TEST_PANEL)
.trigger('mouseover')
.click();
cy.wait(delay * 3);
cy.get('h1').contains(TEST_PANEL).should('exist');
cy.wait(delay);
};

describe('Testing panels table', () => {
beforeEach(() => {
moveToPanelHome();
Expand Down Expand Up @@ -68,96 +57,4 @@ describe('Testing panels table', () => {
.click();
cy.wait(delay);
});

it('Deletes panels', () => {
cy.get('.panel-header-count').contains('(2)');
cy.get('.euiCheckbox__input[data-test-subj="checkboxSelectAll"]')
.trigger('mouseover')
.click();
cy.wait(delay);
cy.get('.euiButton__text').contains('Actions').trigger('mouseover').click();
cy.wait(delay);
cy.get('.euiContextMenuItem__text')
.contains('Delete')
.trigger('mouseover')
.click();
cy.wait(delay);

cy.get('button.euiButton--danger').should('be.disabled');

cy.get('input.euiFieldText[placeholder="delete"]').focus().type('delete', {
delay: 50,
});
cy.get('button.euiButton--danger').should('not.be.disabled');
cy.get('.euiButton__text').contains('Delete').trigger('mouseover').click();

cy.get('.euiTextAlign')
.contains('No Observability Dashboards')
.should('exist');

// keep a panel for testing
cy.get('.euiButton__text')
.contains('Create Dashboard')
.trigger('mouseover')
.click();
cy.wait(delay);
cy.get('input.euiFieldText').focus().type(TEST_PANEL, {
delay: 50,
});
cy.get('.euiButton__text')
.contains(/^Create$/)
.trigger('mouseover')
.click();
cy.wait(delay * 2);
});
});

describe('Testing a panel', () => {
it('Move to test panel', () => {
moveToTestPanel();
});

it('Change date filter of the panel', () => {
cy.get(
'.euiButtonEmpty[data-test-subj="superDatePickerToggleQuickMenuButton"]'
).click({
force: true,
});
cy.get('.euiLink').contains('This year').trigger('mouseover').click();
cy.wait(delay * 2);
moveToTestPanel();
cy.get(
'.euiSuperDatePicker__prettyFormat[data-test-subj="superDatePickerShowDatesButton"]'
)
.contains('This year')
.should('exist');
cy.wait(delay);
});
});

describe('Clean up all test data', () => {
it('Deletes test panel', () => {
moveToPanelHome();
cy.get('.euiCheckbox__input[data-test-subj="checkboxSelectAll"]')
.trigger('mouseover')
.click();
cy.wait(delay);
cy.get('.euiButton__text').contains('Actions').trigger('mouseover').click();
cy.wait(delay);
cy.get('.euiContextMenuItem__text')
.contains('Delete')
.trigger('mouseover')
.click();
cy.wait(delay);
cy.get('button.euiButton--danger').should('be.disabled');
cy.get('input.euiFieldText[placeholder="delete"]').focus().type('delete', {
delay: 50,
});
cy.get('button.euiButton--danger').should('not.be.disabled');
cy.get('.euiButton__text').contains('Delete').trigger('mouseover').click();

cy.get('.euiTextAlign')
.contains('No Observability Dashboards')
.should('exist');
});
});

This file was deleted.

Loading
Loading