diff --git a/.github/workflows/cypress-workflow-bundle-snapshot-based-windows.yml b/.github/workflows/cypress-workflow-bundle-snapshot-based-windows.yml index 247fb2107..2a6f32d3e 100644 --- a/.github/workflows/cypress-workflow-bundle-snapshot-based-windows.yml +++ b/.github/workflows/cypress-workflow-bundle-snapshot-based-windows.yml @@ -25,7 +25,7 @@ jobs: uses: ./.github/workflows/release-e2e-workflow-template-windows.yml with: test-name: Core Dashboards using Bundle Snapshot - test-command: env CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser firefox --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js' + test-command: env CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chrome --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js' # not useful now as the windows e2e template currently do not allow serving parameters #osd-serve-args: --data_source.enabled=true --vis_builder.enabled=true @@ -35,7 +35,7 @@ jobs: uses: ./.github/workflows/release-e2e-workflow-template-windows.yml with: test-name: Core Dashboards using Bundle Snapshot - test-command: env CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-without-security --browser firefox --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js' + test-command: env CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-without-security --browser chrome --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js' # not useful now as the windows e2e template currently do not allow serving parameters #osd-serve-args: --data_source.enabled=true --vis_builder.enabled=true security-enabled: false diff --git a/.github/workflows/cypress-workflow-bundle-snapshot-based.yml b/.github/workflows/cypress-workflow-bundle-snapshot-based.yml index 332c45e2e..de64f5c13 100644 --- a/.github/workflows/cypress-workflow-bundle-snapshot-based.yml +++ b/.github/workflows/cypress-workflow-bundle-snapshot-based.yml @@ -25,7 +25,7 @@ jobs: uses: ./.github/workflows/release-e2e-workflow-template.yml with: test-name: Core Dashboards using Bundle Snapshot - test-command: env CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser firefox --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js' + test-command: env CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js' osd-serve-args: --data_source.enabled=true --vis_builder.enabled=true --ml_commons_dashboards.enabled=true tests-without-security: @@ -34,6 +34,6 @@ jobs: uses: ./.github/workflows/release-e2e-workflow-template.yml with: test-name: Core Dashboards using Bundle Snapshot - test-command: env CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-without-security --browser firefox --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js' + test-command: env CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-without-security --browser chromium --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js' osd-serve-args: --data_source.enabled=true --vis_builder.enabled=true --ml_commons_dashboards.enabled=true security-enabled: false diff --git a/cypress/utils/dashboards/vis-augmenter/commands.js b/cypress/utils/dashboards/vis-augmenter/commands.js index 93a6902d1..a21486222 100644 --- a/cypress/utils/dashboards/vis-augmenter/commands.js +++ b/cypress/utils/dashboards/vis-augmenter/commands.js @@ -32,9 +32,9 @@ Cypress.Commands.add('getMenuItems', { prevSubject: 'optional' }, (menu) => ); Cypress.Commands.add('visitDashboard', (dashboardName) => { + cy.intercept('/api/saved_objects/_find*').as('loadDashboards'); cy.visit(`${BASE_PATH}/app/dashboards`); - cy.wait(2000); - cy.waitForLoader(); + cy.wait('@loadDashboards', { timeout: 120000 }); cy.get('.euiFieldSearch').type(dashboardName); cy.wait(2000); cy.get('[data-test-subj="itemsInMemTable"]').contains(dashboardName).click({ diff --git a/cypress/utils/dashboards/vis-augmenter/helpers.js b/cypress/utils/dashboards/vis-augmenter/helpers.js index 91a1338c7..e49e6aa81 100644 --- a/cypress/utils/dashboards/vis-augmenter/helpers.js +++ b/cypress/utils/dashboards/vis-augmenter/helpers.js @@ -178,7 +178,6 @@ const addMetric = (metric, index) => { force: true, } ); - cy.contains(`${metric.aggregation}`).click({ force: true }); }); // non-count aggregations will have an additional field value to set @@ -257,8 +256,9 @@ export const bootstrapDashboard = ( sampleDataFilepath ); + cy.intercept('/api/saved_objects/*').as('savedObjectsApis'); miscUtils.visitPage('app/dashboards#/create'); - cy.wait(60000); + cy.wait(['@savedObjectsApis'], { timeout: 120000 }); // Create several different visualizations visualizationSpecs.forEach((visualizationSpec) => {