Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: Kavitha Conjeevaram Mohan <[email protected]>
  • Loading branch information
kavithacm committed Apr 14, 2022
2 parents 1a25d60 + 715c22f commit e323141
Show file tree
Hide file tree
Showing 203 changed files with 12,992 additions and 22,263 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('Testing dashboard table empty state', () => {

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

Expand Down Expand Up @@ -163,26 +163,27 @@ describe('Testing plots', () => {
});

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

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

cy.get('.euiToggle__input[title="Throughput"]').click();
cy.get('.euiButton__text[title="Throughput"]').click();
cy.get('text.ytitle[data-unformatted="Throughput"]').should('exist');
cy.get('text[data-unformatted="60"]').should('exist');
cy.get('text[data-unformatted="50"]').should('exist');

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

it('Renders plots', () => {
cy.get('text.ytitle[data-unformatted="Error rate (%)"]').should('exist');
cy.get('text.annotation-text[data-unformatted="Now: 0%"]').should('exist');
cy.get('text.annotation-text[data-unformatted="Now: 14.81%"]').should('exist');
cy.get('text.ytitle[data-unformatted="Throughput (n)"]').should('exist');
cy.get('text.annotation-text[data-unformatted="Now: 62"]').should('exist');
cy.get('text.annotation-text[data-unformatted="Now: 108"]').should('exist');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/// <reference types="cypress" />

import { delay, SERVICE_NAME, setTimeFilter } from '../utils/constants';
import { delay, SERVICE_NAME, SERVICE_SPAN_ID, setTimeFilter } from '../utils/constants';

describe('Testing services table empty state', () => {
beforeEach(() => {
Expand All @@ -19,7 +19,7 @@ describe('Testing services table empty state', () => {

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

Expand All @@ -43,7 +43,6 @@ describe('Testing services table', () => {
it('Searches correctly', () => {
cy.get('input[type="search"]').first().focus().type(`${SERVICE_NAME}{enter}`);
cy.get('.euiButton__text').contains('Refresh').click();
cy.wait(delay);
cy.contains(' (1)').should('exist');
cy.contains('3.57%').should('exist');
});
Expand All @@ -61,11 +60,10 @@ describe('Testing service view empty state', () => {
win.sessionStorage.clear();
},
});
cy.wait(delay * 3);
});

it('Renders service view empty state', () => {
cy.get('h2.euiTitle').contains('frontend-client').should('exist');
cy.contains('frontend-client').should('exist');
cy.get('.euiText').contains('0').should('exist');
cy.get('.euiText').contains('-').should('exist');
});
Expand Down Expand Up @@ -109,6 +107,7 @@ describe('Testing service view', () => {
});

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(delay);
cy.contains('Span detail').should('exist');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('Testing traces table empty state', () => {

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

Expand Down Expand Up @@ -54,7 +54,6 @@ describe('Testing traces table', () => {
it('Searches correctly', () => {
cy.get('input[type="search"]').focus().type(`${TRACE_ID}{enter}`);
cy.get('.euiButton__text').contains('Refresh').click();
cy.wait(delay);
cy.contains(' (1)').should('exist');
cy.contains('03/25/2021 10:21:22').should('exist');
});
Expand All @@ -67,40 +66,42 @@ describe('Testing trace view', () => {
win.sessionStorage.clear();
},
});
cy.wait(delay * 3);
});

it('Renders the trace view', () => {
cy.contains('43.75%').should('exist');
cy.contains('42.58%').should('exist');
cy.contains('03/25/2021 10:21:22').should('exist');
cy.get('h2.euiTitle').contains(TRACE_ID).should('exist');
cy.contains(TRACE_ID).should('exist');

cy.get('div.js-plotly-plot').should('have.length.gte', 2);
cy.get('text[data-unformatted="database <br>mysql.APM "]').should('exist');
cy.contains(`"${SPAN_ID}"`).should('exist');
});

it('Has working breadcrumbs', () => {
cy.get('.euiBreadcrumb').contains(TRACE_ID).click();
cy.get(`.euiBreadcrumb[href="#/trace_analytics/traces/${TRACE_ID}"]`).click();
cy.wait(delay);
cy.get('h2.euiTitle').contains(TRACE_ID).should('exist');
cy.get('.euiBreadcrumb').contains('Traces').click();
cy.get('.euiBreadcrumb[href="#/trace_analytics/traces"]').click();
cy.wait(delay);
cy.get('.euiTitle').contains('Traces').should('exist');
cy.get('.euiBreadcrumb').contains('Trace analytics').click();
cy.get('.euiBreadcrumb[href="#/trace_analytics/home"]').click();
cy.wait(delay);
cy.get('.euiTitle').contains('Dashboard').should('exist');
cy.get('.euiBreadcrumb').contains('Observability').click();
cy.get('.euiBreadcrumb[href="observability-dashboards#/"]').click();
cy.wait(delay);
cy.get('.euiTitle').contains('Event analytics').should('exist');
});

it('Renders data grid, flyout and filters', () => {
cy.get('.euiToggle__input[title="Span list"]').click({ force: true });
cy.get('.euiButton__text[title="Span list"]').click({ force: true });
cy.contains('2 columns hidden').should('exist');

cy.wait(delay);
cy.get('.euiLink').contains(SPAN_ID).trigger('mouseover', { force: true });
cy.get('button[data-datagrid-interactable="true"]').eq(0).click({ force: true });
cy.get('button[data-datagrid-interactable="true"]').eq(0).click({ force: true }); // first click doesn't go through eui data grid
cy.wait(delay);
cy.contains('Span detail').should('exist');
cy.contains('Span attributes').should('exist');
Expand Down
7 changes: 4 additions & 3 deletions dashboards-observability/.cypress/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const delay = 1500;
export const TRACE_ID = '8832ed6abbb2a83516461960c89af49d';
export const SPAN_ID = 'a673bc074b438374';
export const SERVICE_NAME = 'frontend-client';
export const SERVICE_SPAN_ID = '7df5609a6d104736';

export const testDataSet = [
{
Expand Down Expand Up @@ -40,7 +41,7 @@ export const setTimeFilter = (setEndTime = false, refresh = true) => {
cy.get('.euiTab__content').contains('Absolute').click();
cy.get('input[data-test-subj="superDatePickerAbsoluteDateInput"]')
.focus()
.type('{selectall}' + startTime);
.type('{selectall}' + startTime, { force: true });
if (setEndTime) {
cy.wait(delay);
cy.get(
Expand All @@ -50,7 +51,7 @@ export const setTimeFilter = (setEndTime = false, refresh = true) => {
cy.get('.euiTab__content').contains('Absolute').click();
cy.get('input[data-test-subj="superDatePickerAbsoluteDateInput"]')
.focus()
.type('{selectall}' + endTime);
.type('{selectall}' + endTime, { force: true });
}
if (refresh) cy.get('.euiButton__text').contains('Refresh').click();
cy.wait(delay);
Expand Down Expand Up @@ -98,4 +99,4 @@ export const supressResizeObserverIssue = () => {
cy.on('uncaught:exception', (err, runnable) => {
if (err.message.includes('ResizeObserver loop')) return false;
});
};
};
2 changes: 1 addition & 1 deletion dashboards-observability/public/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import store from '../framework/redux/store';
import { AppPluginStartDependencies } from '../types';
import { Home as ApplicationAnalyticsHome } from './application_analytics/home';
import { Home as CustomPanelsHome } from './custom_panels/home';
import { EventAnalytics } from './explorer/event_analytics';
import { EventAnalytics } from './event_analytics';
import { Main as NotebooksHome } from './notebooks/components/main';
import { Home as TraceAnalyticsHome } from './trace_analytics/home';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
PanelTitle,
} from '../../../../public/components/trace_analytics/components/common/helper_functions';
import { SpanDetailTable } from '../../../../public/components/trace_analytics/components/traces/span_detail_table';
import { Explorer } from '../../explorer/explorer';
import { Explorer } from '../../event_analytics/explorer/explorer';
import { Configuration } from './configuration';
import {
TAB_CONFIG_ID_TXT_PFX,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ import { VisualizationType } from '../../../../common/types/custom_panels';
import { NEW_SELECTED_QUERY_TAB, TAB_CREATED_TYPE } from '../../../../common/constants/explorer';
import { APP_ANALYTICS_API_PREFIX } from '../../../../common/constants/application_analytics';
import { HttpSetup } from '../../../../../../src/core/public';
import { init as initFields, remove as removefields } from '../../explorer/slices/field_slice';
import { init as initFields, remove as removefields } from '../../event_analytics/redux/slices/field_slice';
import {
init as initVisualizationConfig,
reset as resetVisualizationConfig,
} from '../../explorer/slices/viualization_config_slice';
} from '../../event_analytics/redux/slices/viualization_config_slice';
import {
init as initQuery,
remove as removeQuery,
changeQuery,
} from '../../explorer/slices/query_slice';
} from '../../event_analytics/redux/slices/query_slice';
import {
init as initQueryResult,
remove as removeQueryResult,
} from '../../explorer/slices/query_result_slice';
import { addTab, removeTab } from '../../explorer/slices/query_tab_slice';
} from '../../event_analytics/redux/slices/query_result_slice';
import { addTab, removeTab } from '../../event_analytics/redux/slices/query_tab_slice';

// Name validation
export const isNameValid = (name: string, existingNames: string[]) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import _ from 'lodash';
import { DatePicker } from './date_picker';
import '@algolia/autocomplete-theme-classic';
import { Autocomplete } from './autocomplete';
import { SavePanel } from '../../explorer/save_panel';
import { SavePanel } from '../../event_analytics/explorer/save_panel';
import { PPLReferenceFlyout } from '../helpers';
import { uiSettingsService } from '../../../../common/utils';
import { APP_ANALYTICS_TAB_ID_REGEX } from '../../../../common/constants/explorer';
Expand Down
Loading

0 comments on commit e323141

Please sign in to comment.