Skip to content

Commit

Permalink
Add availability entry points (opensearch-project#731)
Browse files Browse the repository at this point in the history
Signed-off-by: Eugene Lee <[email protected]>
  • Loading branch information
eugenesk24 committed Jun 6, 2022
1 parent 9c81bdd commit 6f1c6bc
Show file tree
Hide file tree
Showing 40 changed files with 2,491 additions and 515 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ describe('Testing service view', () => {
cy.wait(delay);

cy.get('.euiBadge__text').contains('spanId: ').should('exist');
cy.get('[data-test-subj="euiFlyoutCloseButton"]').click({ force: true });
cy.contains('Spans (1)').should('exist');
});
});

Large diffs are not rendered by default.

25 changes: 19 additions & 6 deletions dashboards-observability/.cypress/utils/app_constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import { supressResizeObserverIssue } from './constants';

export const delay = 1000;
export const timeoutDelay = 30000;
export const TYPING_DELAY = 500;

export const moveToHomePage = () => {
cy.visit(`${Cypress.env('opensearchDashboards')}/app/observability-dashboards#/application_analytics/`);
Expand Down Expand Up @@ -43,11 +45,11 @@ export const changeTimeTo24 = (timeUnit) => {
cy.get('[aria-label="Time unit"]').select(timeUnit);
cy.get('.euiButton').contains('Apply').click();
cy.wait(delay);
cy.get('.euiButton').contains('Refresh').click();
cy.get('[data-test-subj="superDatePickerApplyTimeButton"]').click();
};

export const expectMessageOnHover = (message) => {
cy.get('.euiToolTipAnchor').contains('Create').click({ force: true });
export const expectMessageOnHover = (button, message) => {
cy.get(`[data-test-subj="${button}"]`).click({ force: true });
cy.get('.euiToolTipPopover').contains(message).should('exist');
};

Expand All @@ -58,9 +60,19 @@ export const moveToPanelHome = () => {
cy.wait(delay * 3);
};

export const deleteAllSavedApplications = () => {
moveToHomePage();
cy.get('[data-test-subj="checkboxSelectAll"]').click();
cy.get('.euiPopover').contains('Actions').click();
cy.get('.euiContextMenuItem').contains('Delete').click();
cy.get('.euiButton__text').contains('Delete').click();
};

export const uniqueId = Date.now();
export const baseQuery = 'source = opensearch_dashboards_sample_data_flights';
export const nameOne = 'Cypress';
export const nameTwo = 'Pine';
export const nameOne = `Cypress-${uniqueId}`;
export const nameTwo = `Pine-${uniqueId}`;
export const nameThree = `Cedar-${uniqueId}`;
export const description = 'This is my application for cypress testing.';
export const service_one = 'order';
export const service_two = 'payment';
Expand All @@ -69,7 +81,8 @@ export const trace_two = 'HTTP GET';
export const trace_three = 'client_pay_order';
export const query_one = 'where DestCityName = "Venice" | stats count() by span( timestamp , 6h )';
export const query_two = 'where OriginCityName = "Seoul" | stats count() by span( timestamp , 6h )';
export const availability_default = 'stats count() by span( timestamp, 1h )';
export const visOneName = 'Flights to Venice';
export const visTwoName = 'Flights from Seoul';
export const composition = 'order, payment, HTTP POST, HTTP GET, client_pay_order'
export const newName = 'Monterey Cypress';
export const newName = `Monterey Cypress-${uniqueId}`;
1 change: 1 addition & 0 deletions dashboards-observability/common/constants/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@ export const REDUX_EXPL_SLICE_VISUALIZATION = 'explorerVisualization';
export const REDUX_EXPL_SLICE_COUNT_DISTRIBUTION = 'countDistributionVisualization';
export const PLOTLY_GAUGE_COLUMN_NUMBER = 5;
export const APP_ANALYTICS_TAB_ID_REGEX = /application-analytics-tab.+/;
export const DEFAULT_AVAILABILITY_QUERY = 'stats count() by span( timestamp, 1h )';
2 changes: 2 additions & 0 deletions dashboards-observability/common/types/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ export interface IExplorerProps {
setStartTime?: any;
setEndTime?: any;
appBaseQuery?: string;
callback?: any;
callbackInApp?: any;
}

export interface SavedQuery {
Expand Down
Loading

0 comments on commit 6f1c6bc

Please sign in to comment.