diff --git a/cypress.json b/cypress.json index f048c8e2f..f79ebf340 100644 --- a/cypress.json +++ b/cypress.json @@ -19,6 +19,7 @@ "MANAGED_SERVICE_ENDPOINT": false, "VISBUILDER_ENABLED": true, "DATASOURCE_MANAGEMENT_ENABLED": false, - "ML_COMMONS_DASHBOARDS_ENABLED": true + "ML_COMMONS_DASHBOARDS_ENABLED": true, + "WAIT_FOR_LOADER_BUFFER_MS": 0 } } diff --git a/cypress/utils/dashboards/commands.js b/cypress/utils/dashboards/commands.js index 1d2188c4f..dd1f5d024 100644 --- a/cypress/utils/dashboards/commands.js +++ b/cypress/utils/dashboards/commands.js @@ -15,7 +15,7 @@ Cypress.Commands.add('waitForLoader', () => { displayName: 'wait', message: 'page load', }); - + cy.wait(Cypress.env('WAIT_FOR_LOADER_BUFFER_MS')); cy.getElementByTestId('homeIcon', opts); // Update to `homeLoader` once useExpandedHeader is enabled }); diff --git a/package.json b/package.json index bd3626e53..5608b16c3 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "test": "echo \"Error: no test specified\" && exit 1", "cypress:open": "cypress open", "cypress:run-without-security": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=false", - "cypress:run-with-security": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200", - "cypress:run-with-security-and-aggregation-view": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200,AGGREGATION_VIEW=true", + "cypress:run-with-security": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200,WAIT_FOR_LOADER_BUFFER_MS=500", + "cypress:run-with-security-and-aggregation-view": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200,AGGREGATION_VIEW=true,WAIT_FOR_LOADER_BUFFER_MS=500", "cypress:run-plugin-tests-without-security": "yarn cypress:run-without-security --spec 'cypress/integration/plugins/*/*.js'", "cypress:run-plugin-tests-with-security": "yarn cypress:run-with-security --spec 'cypress/integration/plugins/*/*.js'", "cypress:release-chrome": "yarn cypress:run-with-security --browser chrome --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/*.js,cypress/integration/plugins/*/*'",