Skip to content

Commit d9460de

Browse files
authored
fix: defaultTenant does not take effect (#1318)
Signed-off-by: SuZhou-Joe <[email protected]>
1 parent 179ca7a commit d9460de

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

cypress/utils/commands.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,3 +587,14 @@ Cypress.Commands.add('loadSampleData', (type) => {
587587
url: `${BASE_PATH}/api/sample_data/${type}`,
588588
});
589589
});
590+
591+
Cypress.Commands.add('fleshTenantSettings', () => {
592+
if (Cypress.env('SECURITY_ENABLED')) {
593+
// Use xhr request is good enough to flesh tenant
594+
cy.request({
595+
url: `${BASE_PATH}/app/home?security_tenant=${CURRENT_TENANT.defaultTenant}`,
596+
method: 'GET',
597+
failOnStatusCode: false,
598+
});
599+
}
600+
});

cypress/utils/dashboards/commands.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import './vis_builder/commands';
77
import './vis_type_table/commands';
88
import './vis-augmenter/commands';
99
import './data_explorer/commands';
10-
import { BASE_PATH } from '../base_constants';
11-
import { CURRENT_TENANT } from '../commands';
1210

1311
Cypress.Commands.add('waitForLoader', () => {
1412
const opts = { log: false };
@@ -119,14 +117,3 @@ Cypress.Commands.add('setTopNavDate', (start, end, submit = true) => {
119117
Cypress.Commands.add('updateTopNav', (options) => {
120118
cy.getElementByTestId('querySubmitButton', options).click({ force: true });
121119
});
122-
123-
Cypress.Commands.add('fleshTenantSettings', () => {
124-
if (Cypress.env('SECURITY_ENABLED')) {
125-
// Use xhr request is good enough to flesh tenant
126-
cy.request({
127-
url: `${BASE_PATH}/app/home?security_tenant=${CURRENT_TENANT.defaultTenant}`,
128-
method: 'GET',
129-
failOnStatusCode: false,
130-
});
131-
}
132-
});

0 commit comments

Comments
 (0)