Skip to content

Commit

Permalink
Update observability tests (opensearch-project#399)
Browse files Browse the repository at this point in the history
* removed and updated event analytics tests

Signed-off-by: Eric Wei <menwe@amazon.com>

* removed some panel tests

Signed-off-by: Eric Wei <menwe@amazon.com>

* removed and updated app analytics tests

Signed-off-by: Eric Wei <menwe@amazon.com>

* updated observability tests

Signed-off-by: Eric Wei <menwe@amazon.com>

Signed-off-by: Eric Wei <menwe@amazon.com>
  • Loading branch information
mengweieric authored Jan 11, 2023
1 parent 8911070 commit 3990e29
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 1,227 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ describe('Before', () => {
cy.get(`button[data-test-subj="addSampleDataSetflights"]`).click({
force: true,
});
// Load sample logs data
cy.get(`button[data-test-subj="addSampleDataSetlogs"]`).click({
force: true,
});

// Verify that sample data is add by checking toast notification
cy.contains('Sample flight data installed', { timeout: 60000 });
cy.contains('Sample web logs installed', { timeout: 60000 });

const dumpDataSet = (mapping_url, data_url, index) => {
cy.request({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import {
delayTime,
SERVICE_NAME,
SERVICE_SPAN_ID,
setTimeFilter,
} from '../../../utils/constants';

Expand Down Expand Up @@ -43,8 +42,6 @@ describe('Testing services table', () => {
cy.contains('analytics-service, frontend-client, recommendation').should(
'exist'
);
cy.contains('186.95').should('exist');
cy.contains('14.29%').should('exist');
});

it('Searches correctly', () => {
Expand All @@ -54,7 +51,6 @@ describe('Testing services table', () => {
.type(`${SERVICE_NAME}{enter}`);
cy.get('.euiButton__text').contains('Refresh').click();
cy.contains(' (1)').should('exist');
cy.contains('3.57%').should('exist');
});
});

Expand Down Expand Up @@ -100,8 +96,6 @@ describe('Testing service view', () => {

it('Renders service view', () => {
cy.get('h2.euiTitle').contains(SERVICE_NAME).should('exist');
cy.contains('178.6').should('exist');
cy.contains('3.57%').should('exist');
cy.get('div.vis-network').should('exist');
});

Expand All @@ -119,24 +113,4 @@ describe('Testing service view', () => {
cy.wait(delayTime);
cy.get('.euiTitle').contains('Event analytics').should('exist');
});

it('Renders spans data grid, flyout, filters', () => {
cy.get('.euiLink')
.contains(SERVICE_SPAN_ID)
.trigger('mouseover', { force: true });
cy.get('button[data-datagrid-interactable="true"]')
.eq(0)
.click({ force: true });
cy.wait(delayTime);
cy.contains('Span detail').should('exist');
cy.contains('Span attributes').should('exist');
cy.get('.euiTextColor').contains('Span ID').trigger('mouseover');
cy.get('.euiButtonIcon[aria-label="span-flyout-filter-icon"').click({
force: true,
});
cy.wait(delayTime);

cy.get('.euiBadge__text').contains('spanId: ').should('exist');
cy.contains('Spans (1)').should('exist');
});
});
Loading

0 comments on commit 3990e29

Please sign in to comment.