Skip to content

Commit 0e395a0

Browse files
committed
make default tenant global
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
1 parent d70b707 commit 0e395a0

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

cypress/integration/plugins/gantt-chart-dashboards/gantt_ui.spec.js

+15-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,21 @@ const X_LABEL = 'A unique label for X-axis';
2020
const DEFAULT_SIZE = 10;
2121

2222
describe('Dump test data', () => {
23-
before(() => {
23+
beforeEach(() => {
2424
CURRENT_TENANT.newTenant = 'global';
25+
if (Cypress.env('SECURITY_ENABLED')) {
26+
/**
27+
* Security plugin is using private tenant as default.
28+
* So here we'd need to set global tenant as default manually.
29+
*/
30+
cy.changeDefaultTenant({
31+
multitenancy_enabled: true,
32+
private_tenant_enabled: true,
33+
default_tenant: 'global',
34+
});
35+
}
2536
});
37+
2638
it('Indexes test data for gantt chart', () => {
2739
const dumpDataSet = (ndjson, index) =>
2840
cy.request({
@@ -47,7 +59,7 @@ describe('Dump test data', () => {
4759

4860
cy.request({
4961
method: 'POST',
50-
form: false,
62+
failOnStatusCode: false,
5163
url: 'api/saved_objects/index-pattern/jaeger',
5264
headers: {
5365
'content-type': 'application/json',
@@ -66,6 +78,7 @@ describe('Save a gantt chart', { defaultCommandTimeout: 20000 }, () => {
6678
});
6779

6880
it('Creates and saves a gantt chart', () => {
81+
CURRENT_TENANT.newTenant = 'global';
6982
cy.get('.euiButton__text').contains('Create ').click({ force: true });
7083
cy.get('[data-test-subj="visTypeTitle"]')
7184
.contains('Gantt Chart')

0 commit comments

Comments
 (0)