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

[BACKPORT] Add data test subj to app analytics (#704) #718

Merged
merged 1 commit into from
May 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
461 changes: 211 additions & 250 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