Skip to content

Commit

Permalink
Add data test subj to app analytics (#704)
Browse files Browse the repository at this point in the history
Signed-off-by: Eugene Lee <[email protected]>
  • Loading branch information
eugenesk24 authored May 3, 2022
1 parent 9ebb7d2 commit 6b15239
Show file tree
Hide file tree
Showing 50 changed files with 755 additions and 364 deletions.
457 changes: 209 additions & 248 deletions dashboards-observability/.cypress/integration/app_analytics.spec.js

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions dashboards-observability/.cypress/utils/app_constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,28 @@ export const moveToHomePage = () => {

export const moveToCreatePage = () => {
cy.visit(`${Cypress.env('opensearchDashboards')}/app/observability-dashboards#/application_analytics/`);
cy.wait(delay * 2);
cy.get('.euiButton__text').contains('Create application').click();
cy.get('.euiButton[href="#/application_analytics/create"]').eq(0).click();
supressResizeObserverIssue();
cy.wait(delay);
cy.get('.euiTitle').contains('Create application').should('exist');
cy.get('[data-test-subj="createPageTitle"]').should('contain', 'Create application');
};

export const moveToApplication = (name) => {
cy.visit(`${Cypress.env('opensearchDashboards')}/app/observability-dashboards#/application_analytics/`);
supressResizeObserverIssue();
cy.wait(delay * 6);
cy.get('.euiLink').contains(name).click();
cy.get(`[data-test-subj="${name}ApplicationLink"]`).click();
cy.wait(delay);
cy.get('.euiTitle').contains(name).should('exist');
cy.get('[data-test-subj="applicationTitle"]').should('contain', name);
changeTimeTo24('years');
};

export const moveToEditPage = () => {
moveToApplication(nameOne);
cy.get('.euiTab').contains('Configuration').click();
cy.get('.euiButton').contains('Edit').click();
cy.get('[data-test-subj="app-analytics-configTab"]').click();
cy.get('[data-test-subj="editApplicationButton"]').click();
supressResizeObserverIssue();
cy.wait(delay);
cy.get('.euiTitle').contains('Edit application');
cy.get('[data-test-subj="createPageTitle"]').should('contain', 'Edit application');
};

export const changeTimeTo24 = (timeUnit) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* SPDX-License-Identifier: Apache-2.0
*/

export const TAB_OVERVIEW_ID_TXT_PFX = 'app-analytics-overview-';
export const TAB_SERVICE_ID_TXT_PFX = 'app-analytics-service-';
export const TAB_TRACE_ID_TXT_PFX = 'app-analytics-trace-';
export const TAB_LOG_ID_TXT_PFX = 'app-analytics-log-';
export const TAB_PANEL_ID_TXT_PFX = 'app-analytics-panel-';
export const TAB_CONFIG_ID_TXT_PFX = 'app-analytics-config-';
export const TAB_OVERVIEW_ID = 'app-analytics-overview';
export const TAB_SERVICE_ID = 'app-analytics-service';
export const TAB_TRACE_ID = 'app-analytics-trace';
export const TAB_LOG_ID = 'app-analytics-log';
export const TAB_PANEL_ID = 'app-analytics-panel';
export const TAB_CONFIG_ID = 'app-analytics-config';
export const TAB_OVERVIEW_TITLE = 'Overview';
export const TAB_SERVICE_TITLE = 'Services';
export const TAB_TRACE_TITLE = 'Traces & Spans';
Expand Down
Loading

0 comments on commit 6b15239

Please sign in to comment.