diff --git a/cypress/integration/plugins/reports-dashboards/01-create.spec.js b/cypress/integration/plugins/reports-dashboards/01-create.spec.js index 1bd8d1187..80476154d 100644 --- a/cypress/integration/plugins/reports-dashboards/01-create.spec.js +++ b/cypress/integration/plugins/reports-dashboards/01-create.spec.js @@ -215,7 +215,9 @@ describe('Cypress', () => { }); function visitCreateReportDefinitionPage() { - cy.visit(`${BASE_PATH}/app/reports-dashboards#/`); + cy.visit(`${BASE_PATH}/app/reports-dashboards#/`, { + waitForGetTenant: true, + }); cy.location('pathname', { timeout: 60000 }).should( 'include', '/reports-dashboards' diff --git a/cypress/integration/plugins/reports-dashboards/02-edit.spec.js b/cypress/integration/plugins/reports-dashboards/02-edit.spec.js index 89864cc2b..ec3fe0804 100644 --- a/cypress/integration/plugins/reports-dashboards/02-edit.spec.js +++ b/cypress/integration/plugins/reports-dashboards/02-edit.spec.js @@ -7,7 +7,9 @@ import { BASE_PATH } from '../../../utils/constants'; describe('Cypress', () => { it('Visit edit page, update name and description', () => { - cy.visit(`${BASE_PATH}/app/reports-dashboards#/`); + cy.visit(`${BASE_PATH}/app/reports-dashboards#/`, { + waitForGetTenant: true, + }); cy.location('pathname', { timeout: 60000 }).should( 'include', '/reports-dashboards' diff --git a/cypress/utils/commands.js b/cypress/utils/commands.js index 89ec3c478..b5b41d9f1 100644 --- a/cypress/utils/commands.js +++ b/cypress/utils/commands.js @@ -32,7 +32,7 @@ Cypress.Commands.overwrite('visit', (orig, url, options) => { }; } newOptions.qs = { security_tenant: 'private' }; - if (!waitForGetTenant) { + if (waitForGetTenant) { cy.intercept('GET', '/api/v1/multitenancy/tenant').as('getTenant'); orig(url, newOptions); supressNoRequestOccurred(); diff --git a/cypress/utils/plugins/reports-dashboards/constants.js b/cypress/utils/plugins/reports-dashboards/constants.js index 86f05b05a..8ec10266e 100644 --- a/cypress/utils/plugins/reports-dashboards/constants.js +++ b/cypress/utils/plugins/reports-dashboards/constants.js @@ -6,7 +6,9 @@ import { BASE_PATH } from '../../../utils/constants'; export function visitReportingLandingPage() { - cy.visit(`${BASE_PATH}/app/reports-dashboards#/`); + cy.visit(`${BASE_PATH}/app/reports-dashboards#/`, { + waitForGetTenant: true, + }); cy.location('pathname', { timeout: 60000 }).should( 'include', '/reports-dashboards' diff --git a/test_finder.sh b/test_finder.sh index 651c1fa8c..c1ce35bb7 100755 --- a/test_finder.sh +++ b/test_finder.sh @@ -3,7 +3,7 @@ set -e OSD_BUILD_MANIFEST='../local-test-cluster/opensearch-dashboards-*/manifest.yml' -OSD_TEST_PATH='cypress/integration/core-opensearch-dashboards' +OSD_TEST_PATH='cypress/integration/core-opensearch-dashboards/opensearch-dashboards' OSD_PLUGIN_TEST_PATH='cypress/integration/plugins' # Map component name in opensearch-build repo INPUT_MANIFEST with folder name for tests in functional repo @@ -63,7 +63,7 @@ function get_test_list() { fi elif [ "$TEST_TYPE" = "manifest" ]; then - if grep -q $component_name; then + if grep -q $component_name $OSD_BUILD_MANIFEST; then TEST_FILES_LOCAL+="$TEST_PATH_LOCAL/$test_folder/$TEST_FILES_EXT_LOCAL," fi fi