From 4cc48046934b09189223265070d2ccdc87af2773 Mon Sep 17 00:00:00 2001 From: manasvinibs Date: Thu, 23 Nov 2023 00:18:40 +0000 Subject: [PATCH] [Tests] Set default tenancy to global for data explorer tests Signed-off-by: manasvinibs --- .../apps/data_explorer/aaa_before.spec.js | 3 +++ .../apps/data_explorer/date_nanos.spec.js | 4 +++- .../apps/data_explorer/date_nanos_mixed.spec.js | 3 ++- .../apps/data_explorer/discover.spec.js | 2 ++ .../apps/data_explorer/discover_histogram.spec.js | 2 ++ .../apps/data_explorer/doc_navigation.spec.js | 2 ++ .../apps/data_explorer/doc_table.spec.js | 2 ++ .../opensearch-dashboards/apps/data_explorer/errors.spec.js | 2 ++ .../apps/data_explorer/field_data.spec.js | 2 ++ .../apps/data_explorer/field_visualize.spec.js | 2 ++ .../apps/data_explorer/filter_editor.spec.js | 2 ++ .../apps/data_explorer/index_pattern_with_encoded_id.spec.js | 2 ++ .../apps/data_explorer/index_pattern_without_field.spec.js | 2 ++ .../apps/data_explorer/inspector.spec.js | 2 ++ .../apps/data_explorer/large_string.spec.js | 2 ++ .../apps/data_explorer/saved_queries.spec.js | 2 ++ .../apps/data_explorer/shared_links.spec.js | 2 ++ .../opensearch-dashboards/apps/data_explorer/sidebar.spec.js | 2 ++ .../apps/data_explorer/source_filter.spec.js | 2 ++ .../apps/data_explorer/zzz_after.spec.js | 2 ++ cypress/utils/commands.js | 5 +++++ 21 files changed, 47 insertions(+), 2 deletions(-) diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/aaa_before.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/aaa_before.spec.js index 8b56fb15c..e7e5af5c2 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/aaa_before.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/aaa_before.spec.js @@ -3,10 +3,13 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { CURRENT_TENANT } from '../../../../../utils/commands'; + /// describe('Before', () => { before(() => { + CURRENT_TENANT.newTenant = 'global'; cy.deleteAllIndices(); cy.deleteSavedObjectByType('index-pattern'); }); diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/date_nanos.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/date_nanos.spec.js index ccdbc3490..b17c78124 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/date_nanos.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/date_nanos.spec.js @@ -7,6 +7,8 @@ import { TestFixtureHandler, MiscUtils, } from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; + const testFixtureHandler = new TestFixtureHandler( cy, Cypress.env('openSearchUrl') @@ -18,6 +20,7 @@ describe('date_nanos', () => { const fromTime = 'Sep 21, 2019 @ 20:31:44.000'; const toTime = 'Sep 23, 2019 @ 03:31:44.000'; before(() => { + CURRENT_TENANT.newTenant = 'global'; // import date nanos testFixtureHandler.importJSONMapping( 'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/date_nanos/mappings.json.txt' @@ -29,7 +32,6 @@ describe('date_nanos', () => { cy.setAdvancedSetting({ defaultIndex: 'date-nanos', }); - miscUtils.visitPage('app/data-explorer/discover#/'); cy.waitForLoader(); diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/date_nanos_mixed.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/date_nanos_mixed.spec.js index 19aca0b41..07e48047f 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/date_nanos_mixed.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/date_nanos_mixed.spec.js @@ -7,6 +7,7 @@ import { TestFixtureHandler, MiscUtils, } from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const miscUtils = new MiscUtils(cy); const testFixtureHandler = new TestFixtureHandler( @@ -16,6 +17,7 @@ const testFixtureHandler = new TestFixtureHandler( describe('date_nanos_mixed', () => { before(() => { + CURRENT_TENANT.newTenant = 'global'; //import date nanos testFixtureHandler.importJSONMapping( 'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/date_nanos_mix/mappings.json.txt' @@ -27,7 +29,6 @@ describe('date_nanos_mixed', () => { cy.setAdvancedSetting({ defaultIndex: 'timestamp-*', }); - miscUtils.visitPage('app/data-explorer/discover#/'); cy.waitForLoader(); diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/discover.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/discover.spec.js index f7d28e7c6..10f332146 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/discover.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/discover.spec.js @@ -11,6 +11,7 @@ import { DE_DEFAULT_END_TIME, DE_DEFAULT_START_TIME, } from '../../../../../utils/constants'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const miscUtils = new MiscUtils(cy); const testFixtureHandler = new TestFixtureHandler( @@ -25,6 +26,7 @@ const indexSet = [ describe('discover app', { scrollBehavior: false }, () => { before(() => { + CURRENT_TENANT.newTenant = 'global'; // import logstash functional testFixtureHandler.importJSONDocIfNeeded( indexSet, diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/discover_histogram.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/discover_histogram.spec.js index 444e68c90..3003b5e8b 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/discover_histogram.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/discover_histogram.spec.js @@ -7,6 +7,7 @@ import { TestFixtureHandler, MiscUtils, } from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const miscUtils = new MiscUtils(cy); const testFixtureHandler = new TestFixtureHandler( @@ -21,6 +22,7 @@ const indexSet = [ describe('discover histogram', { scrollBehavior: false }, () => { before(() => { + CURRENT_TENANT.newTenant = 'global'; cy.log('load opensearch-dashboards index with default index pattern'); // import long window logstash index pattern diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/doc_navigation.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/doc_navigation.spec.js index 07c957905..f7f465b36 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/doc_navigation.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/doc_navigation.spec.js @@ -7,6 +7,7 @@ import { MiscUtils, TestFixtureHandler, } from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const miscUtils = new MiscUtils(cy); const testFixtureHandler = new TestFixtureHandler( @@ -21,6 +22,7 @@ const indexSet = [ describe('doc link in discover', () => { beforeEach(() => { + CURRENT_TENANT.newTenant = 'global'; // import logstash functional testFixtureHandler.importJSONDocIfNeeded( indexSet, diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/doc_table.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/doc_table.spec.js index 656ddb3bf..e79c33fb3 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/doc_table.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/doc_table.spec.js @@ -7,6 +7,7 @@ import { MiscUtils, TestFixtureHandler, } from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const miscUtils = new MiscUtils(cy); const testFixtureHandler = new TestFixtureHandler( @@ -21,6 +22,7 @@ const indexSet = [ describe('discover doc table', () => { before(() => { + CURRENT_TENANT.newTenant = 'global'; // import logstash functional testFixtureHandler.importJSONDocIfNeeded( indexSet, diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/errors.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/errors.spec.js index fba6d481d..8f2fb99f9 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/errors.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/errors.spec.js @@ -11,6 +11,7 @@ import { DE_DEFAULT_END_TIME, DE_DEFAULT_START_TIME, } from '../../../../../utils/constants'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const miscUtils = new MiscUtils(cy); const testFixtureHandler = new TestFixtureHandler( @@ -20,6 +21,7 @@ const testFixtureHandler = new TestFixtureHandler( describe('errors', () => { before(() => { + CURRENT_TENANT.newTenant = 'global'; // import invalid_scripted_field testFixtureHandler.importJSONMapping( 'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/invalid_scripted_field/mappings.json.txt' diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/field_data.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/field_data.spec.js index 126956296..2cbf475ae 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/field_data.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/field_data.spec.js @@ -7,6 +7,7 @@ import { TestFixtureHandler, MiscUtils, } from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const miscUtils = new MiscUtils(cy); const testFixtureHandler = new TestFixtureHandler( @@ -21,6 +22,7 @@ const indexSet = [ describe('discover tab', () => { before(() => { + CURRENT_TENANT.newTenant = 'global'; // import logstash functional testFixtureHandler.importJSONDocIfNeeded( indexSet, diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/field_visualize.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/field_visualize.spec.js index 5bd420669..5b9083bfe 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/field_visualize.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/field_visualize.spec.js @@ -7,6 +7,7 @@ import { MiscUtils, TestFixtureHandler, } from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const miscUtils = new MiscUtils(cy); const testFixtureHandler = new TestFixtureHandler( @@ -21,6 +22,7 @@ const indexSet = [ describe('discover field visualize button', () => { before(() => { + CURRENT_TENANT.newTenant = 'global'; testFixtureHandler.importJSONMapping( 'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/discover/discover.mappings.json.txt' ); diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/filter_editor.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/filter_editor.spec.js index 1ecd717ec..18c3c5c3c 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/filter_editor.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/filter_editor.spec.js @@ -7,6 +7,7 @@ import { MiscUtils, TestFixtureHandler, } from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const miscUtils = new MiscUtils(cy); const testFixtureHandler = new TestFixtureHandler( @@ -21,6 +22,7 @@ const indexSet = [ describe('discover filter editor', () => { before(() => { + CURRENT_TENANT.newTenant = 'global'; testFixtureHandler.importJSONMapping( 'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/discover/discover.mappings.json.txt' ); diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/index_pattern_with_encoded_id.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/index_pattern_with_encoded_id.spec.js index b848203fb..6d99eecc5 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/index_pattern_with_encoded_id.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/index_pattern_with_encoded_id.spec.js @@ -11,6 +11,7 @@ import { DE_DEFAULT_END_TIME, DE_DEFAULT_START_TIME, } from '../../../../../utils/constants'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const miscUtils = new MiscUtils(cy); const testFixtureHandler = new TestFixtureHandler( @@ -20,6 +21,7 @@ const testFixtureHandler = new TestFixtureHandler( describe('index pattern with encoded id', () => { before(() => { + CURRENT_TENANT.newTenant = 'global'; testFixtureHandler.importJSONMapping( 'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/index_pattern_with_encoded_id/mappings.json.txt' ); diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/index_pattern_without_field.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/index_pattern_without_field.spec.js index 7601381d0..bc09964e2 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/index_pattern_without_field.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/index_pattern_without_field.spec.js @@ -7,6 +7,7 @@ import { TestFixtureHandler, MiscUtils, } from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const miscUtils = new MiscUtils(cy); const testFixtureHandler = new TestFixtureHandler( @@ -16,6 +17,7 @@ const testFixtureHandler = new TestFixtureHandler( describe('index pattern without field spec', () => { before(() => { + CURRENT_TENANT.newTenant = 'global'; testFixtureHandler.importJSONMapping( 'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/index_pattern_without_timefield/mappings.json.txt' ); diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/inspector.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/inspector.spec.js index 3688be2ff..afc9b6c55 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/inspector.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/inspector.spec.js @@ -11,6 +11,7 @@ import { DE_DEFAULT_END_TIME, DE_DEFAULT_START_TIME, } from '../../../../../utils/constants'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const miscUtils = new MiscUtils(cy); const testFixtureHandler = new TestFixtureHandler( @@ -25,6 +26,7 @@ const indexSet = [ describe('inspector', () => { before(() => { + CURRENT_TENANT.newTenant = 'global'; // import logstash functional testFixtureHandler.importJSONDocIfNeeded( indexSet, diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/large_string.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/large_string.spec.js index e7a5fcb1c..825bcbd60 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/large_string.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/large_string.spec.js @@ -7,6 +7,7 @@ import { TestFixtureHandler, MiscUtils, } from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const miscUtils = new MiscUtils(cy); const testFixtureHandler = new TestFixtureHandler( @@ -16,6 +17,7 @@ const testFixtureHandler = new TestFixtureHandler( describe('test large strings', () => { before(() => { + CURRENT_TENANT.newTenant = 'global'; testFixtureHandler.importJSONMapping( 'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/empty_opensearch_dashboards/mappings.json.txt' ); diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/saved_queries.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/saved_queries.spec.js index 7179a4280..8173db2cb 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/saved_queries.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/saved_queries.spec.js @@ -11,6 +11,7 @@ import { DE_DEFAULT_END_TIME, DE_DEFAULT_START_TIME, } from '../../../../../utils/constants'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const miscUtils = new MiscUtils(cy); const testFixtureHandler = new TestFixtureHandler( @@ -27,6 +28,7 @@ describe('saved queries saved objects', () => { const fromTime = 'Sep 20, 2015 @ 08:00:00.000'; const toTime = 'Sep 21, 2015 @ 08:00:00.000'; before(() => { + CURRENT_TENANT.newTenant = 'global'; testFixtureHandler.importJSONMapping( 'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/discover/discover.mappings.json.txt' ); diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/shared_links.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/shared_links.spec.js index e2b2dc39b..bfebacfcd 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/shared_links.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/shared_links.spec.js @@ -11,6 +11,7 @@ import { DE_DEFAULT_END_TIME, DE_DEFAULT_START_TIME, } from '../../../../../utils/constants'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const miscUtils = new MiscUtils(cy); const testFixtureHandler = new TestFixtureHandler( @@ -25,6 +26,7 @@ const indexSet = [ describe('shared links', () => { before(() => { + CURRENT_TENANT.newTenant = 'global'; testFixtureHandler.importJSONMapping( 'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/discover/discover.mappings.json.txt' ); diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/sidebar.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/sidebar.spec.js index 18b3ac9d2..4cf36e93c 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/sidebar.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/sidebar.spec.js @@ -7,6 +7,7 @@ import { MiscUtils, TestFixtureHandler, } from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const miscUtils = new MiscUtils(cy); const testFixtureHandler = new TestFixtureHandler( @@ -21,6 +22,7 @@ const indexSet = [ describe('discover sidebar', () => { before(() => { + CURRENT_TENANT.newTenant = 'global'; testFixtureHandler.importJSONMapping( 'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/discover/discover.mappings.json.txt' ); diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/source_filter.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/source_filter.spec.js index e884b8435..b5e2d39a5 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/source_filter.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/source_filter.spec.js @@ -7,6 +7,7 @@ import { TestFixtureHandler, MiscUtils, } from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const miscUtils = new MiscUtils(cy); const testFixtureHandler = new TestFixtureHandler( @@ -16,6 +17,7 @@ const testFixtureHandler = new TestFixtureHandler( describe('source filters', () => { before(() => { + CURRENT_TENANT.newTenant = 'global'; testFixtureHandler.importJSONMapping( 'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/visualize_source-filters/mappings.json.txt' ); diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/zzz_after.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/zzz_after.spec.js index dea9bb66c..12d7407d2 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/zzz_after.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/zzz_after.spec.js @@ -6,6 +6,7 @@ /// import { TestFixtureHandler } from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; +import { CURRENT_TENANT } from '../../../../../utils/commands'; const testFixtureHandler = new TestFixtureHandler( cy, @@ -14,6 +15,7 @@ const testFixtureHandler = new TestFixtureHandler( describe('After', () => { before(() => { + CURRENT_TENANT.newTenant = 'global'; //cy.deleteAllIndices(); testFixtureHandler.clearJSONMapping( 'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/logstash/logstash.mappings.json.txt' diff --git a/cypress/utils/commands.js b/cypress/utils/commands.js index 9a2cfba20..51c705805 100644 --- a/cypress/utils/commands.js +++ b/cypress/utils/commands.js @@ -403,6 +403,11 @@ Cypress.Commands.add('setAdvancedSetting', (changes) => { .request({ method: 'POST', url, + qs: Cypress.env('SECURITY_ENABLED') + ? { + security_tenant: CURRENT_TENANT.defaultTenant, + } + : {}, headers: { 'content-type': 'application/json;charset=UTF-8', 'osd-xsrf': true,