diff --git a/public/apps/configuration/utils/tenant-utils.tsx b/public/apps/configuration/utils/tenant-utils.tsx index 1ae8821e7..b1df275de 100644 --- a/public/apps/configuration/utils/tenant-utils.tsx +++ b/public/apps/configuration/utils/tenant-utils.tsx @@ -124,11 +124,11 @@ export async function updateTenancyConfiguration( updatedTenancyConfig: TenancyConfigSettings ) { // Tenancy locked to local cluster - await createLocalClusterRequestContext().httpPut( + await createLocalClusterRequestContext().httpPut({ http, - API_ENDPOINT_TENANCY_CONFIGS, - updatedTenancyConfig - ); + url: API_ENDPOINT_TENANCY_CONFIGS, + body: updatedTenancyConfig, + }); return; } diff --git a/public/apps/configuration/utils/test/request-utils.test.ts b/public/apps/configuration/utils/test/request-utils.test.ts index 564e155ea..d75b64a71 100644 --- a/public/apps/configuration/utils/test/request-utils.test.ts +++ b/public/apps/configuration/utils/test/request-utils.test.ts @@ -45,6 +45,4 @@ describe('RequestContext', () => { const context = requestUtils.createLocalClusterRequestContext(); expect(context.query).toEqual({ dataSourceId: '' }); }); - - // You can write similar tests for other methods like httpPost, httpPut, httpDelete, etc. }); diff --git a/test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js b/test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js index 60f32d02f..2a1a0c4f7 100644 --- a/test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js +++ b/test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js @@ -97,10 +97,7 @@ describe('Multi-datasources enabled', () => { ); cy.contains('h1', 'Get started'); - cy.get('[data-test-subj="dataSourceSelectableContextMenuHeaderLink"]').should( - 'contain', - '9202' - ); + cy.get('[data-test-subj="dataSourceSelectableButton"]').should('contain', '9202'); cy.get('[data-test-subj="purge-cache"]').click(); cy.get('[class="euiToast euiToast--success euiGlobalToastListItem"]') @@ -233,10 +230,7 @@ describe('Multi-datasources enabled', () => { `http://localhost:5601/app/security-dashboards-plugin${externalDataSourceUrl}#/roles` ); - cy.get('[data-test-subj="dataSourceSelectableContextMenuHeaderLink"]').should( - 'contain', - '9202' - ); + cy.get('[data-test-subj="dataSourceSelectableButton"]').should('contain', '9202'); cy.get('[data-test-subj="tableHeaderCell_roleName_0"]').click(); cy.get('[data-test-subj="checkboxSelectRow-9202-role"]').should('exist');