@@ -20,9 +20,21 @@ const X_LABEL = 'A unique label for X-axis';
20
20
const DEFAULT_SIZE = 10 ;
21
21
22
22
describe ( 'Dump test data' , ( ) => {
23
- before ( ( ) => {
23
+ beforeEach ( ( ) => {
24
24
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
+ }
25
36
} ) ;
37
+
26
38
it ( 'Indexes test data for gantt chart' , ( ) => {
27
39
const dumpDataSet = ( ndjson , index ) =>
28
40
cy . request ( {
@@ -47,7 +59,7 @@ describe('Dump test data', () => {
47
59
48
60
cy . request ( {
49
61
method : 'POST' ,
50
- form : false ,
62
+ failOnStatusCode : false ,
51
63
url : 'api/saved_objects/index-pattern/jaeger' ,
52
64
headers : {
53
65
'content-type' : 'application/json' ,
@@ -66,6 +78,7 @@ describe('Save a gantt chart', { defaultCommandTimeout: 20000 }, () => {
66
78
} ) ;
67
79
68
80
it ( 'Creates and saves a gantt chart' , ( ) => {
81
+ CURRENT_TENANT . newTenant = 'global' ;
69
82
cy . get ( '.euiButton__text' ) . contains ( 'Create ' ) . click ( { force : true } ) ;
70
83
cy . get ( '[data-test-subj="visTypeTitle"]' )
71
84
. contains ( 'Gantt Chart' )
0 commit comments