@@ -92,6 +92,31 @@ context('Create remote detector workflow', () => {
92
92
} ) ;
93
93
94
94
cy . wait ( 5000 ) ;
95
+ const remoteSettings = `${ Cypress . env (
96
+ 'remoteDataSourceNoAuthUrl'
97
+ ) } /_cluster/settings?include_defaults=true`;
98
+ cy . request (
99
+ {
100
+ method : 'GET' ,
101
+ form : false ,
102
+ url : remoteSettings ,
103
+ headers : {
104
+ 'content-type' : 'application/json;charset=UTF-8' ,
105
+ 'osd-xsrf' : true ,
106
+ } ,
107
+ } ,
108
+ 1000
109
+ ) . then ( ( response ) => {
110
+ Cypress . log ( {
111
+ message : `transport port: ${ JSON . stringify (
112
+ response . body . defaults . transport . port
113
+ ) } `,
114
+ } ) ;
115
+
116
+ if ( response . body . defaults . transport . port != 9301 ) {
117
+ this . skip ( ) ;
118
+ }
119
+ } ) ;
95
120
} ) ;
96
121
97
122
// Index some sample data in local and follower cluster (remote)
@@ -178,11 +203,11 @@ context('Create remote detector workflow', () => {
178
203
179
204
cy . wait ( 500 ) ;
180
205
181
- cy . getElementByTestId ( 'indicesFilter' ) . type ( 'sample-ad-index' ) ;
206
+ cy . getElementByTestId ( 'indicesFilter' ) . type ( TEST_INDEX_NAME ) ;
182
207
cy . wait ( 500 ) ;
183
208
cy . contains (
184
209
'.euiComboBoxOption__content' ,
185
- `${ remoteClusterName } :sample-ad-index `
210
+ `${ remoteClusterName } :${ TEST_INDEX_NAME } `
186
211
) . click ( ) ;
187
212
cy . wait ( 1500 ) ;
188
213
@@ -217,7 +242,7 @@ context('Create remote detector workflow', () => {
217
242
TEST_DETECTOR_DESCRIPTION
218
243
) ;
219
244
cy . getElementByTestId ( 'indexNameCell' ) . contains (
220
- `${ remoteClusterName } :sample-ad-index `
245
+ `${ remoteClusterName } :${ TEST_INDEX_NAME } `
221
246
) ;
222
247
cy . getElementByTestId ( 'timestampNameCell' ) . contains ( TEST_TIMESTAMP_NAME ) ;
223
248
cy . getElementByTestId ( 'featureTable' ) . contains ( TEST_FEATURE_NAME ) ;
@@ -257,22 +282,22 @@ context('Create remote detector workflow', () => {
257
282
258
283
cy . getElementByTestId ( 'indicesFilter' ) . click ( ) ;
259
284
260
- cy . getElementByTestId ( 'indicesFilter' ) . type ( 'sample-ad-index' ) ;
285
+ cy . getElementByTestId ( 'indicesFilter' ) . type ( TEST_INDEX_NAME ) ;
261
286
cy . wait ( 500 ) ;
262
287
cy . get ( '.euiComboBoxOption__content' )
263
- . contains ( `${ remoteClusterName } :sample-ad-index ` )
288
+ . contains ( `${ remoteClusterName } :${ TEST_INDEX_NAME } ` )
264
289
. click ( ) ;
265
290
266
291
cy . getElementByTestId ( 'indicesFilter' ) . click ( ) ;
267
- cy . getElementByTestId ( 'indicesFilter' ) . type ( 'sample-ad-index' ) ;
292
+ cy . getElementByTestId ( 'indicesFilter' ) . type ( TEST_INDEX_NAME ) ;
268
293
cy . wait ( 500 ) ;
269
- cy . get ( '.euiComboBoxOption__content' ) . contains ( 'sample-ad-index' ) . click ( ) ;
294
+ cy . get ( '.euiComboBoxOption__content' ) . contains ( TEST_INDEX_NAME ) . click ( ) ;
270
295
271
296
cy . getElementByTestId ( 'indicesFilter' ) . click ( ) ;
272
- cy . getElementByTestId ( 'indicesFilter' ) . type ( 'sample-ad-index-two' ) ;
297
+ cy . getElementByTestId ( 'indicesFilter' ) . type ( TEST_SECOND_INDEX_NAME ) ;
273
298
cy . wait ( 500 ) ;
274
299
cy . get ( '.euiComboBoxOption__content' )
275
- . contains ( `${ remoteClusterName } :sample-ad-index-two ` )
300
+ . contains ( `${ remoteClusterName } :${ TEST_SECOND_INDEX_NAME } ` )
276
301
. click ( ) ;
277
302
278
303
selectTopItemFromFilter ( 'timestampFilter' , false ) ;
@@ -336,7 +361,7 @@ context('Create remote detector workflow', () => {
336
361
cy . contains ( `${ remoteClusterName } (Remote)` ) . should ( 'be.visible' ) ;
337
362
338
363
cy . contains ( '(Local)' ) . should ( 'be.visible' ) ;
339
- cy . contains ( 'sample-ad-index' ) . should ( 'be.visible' ) ;
364
+ cy . contains ( TEST_INDEX_NAME ) . should ( 'be.visible' ) ;
340
365
341
366
cy . getElementByTestId ( 'euiFlyoutCloseButton' ) . click ( ) ;
342
367
cy . wait ( 500 ) ;
@@ -365,7 +390,7 @@ context('Create remote detector workflow', () => {
365
390
) ;
366
391
cy . contains ( `${ remoteClusterName } (Remote)` ) . should ( 'be.visible' ) ;
367
392
cy . contains ( '(Local)' ) . should ( 'be.visible' ) ;
368
- cy . contains ( 'sample-ad-index' ) . should ( 'be.visible' ) ;
393
+ cy . contains ( TEST_INDEX_NAME ) . should ( 'be.visible' ) ;
369
394
} ) ;
370
395
} ) ;
371
396
} ) ;
0 commit comments