@@ -43,6 +43,7 @@ describe('start OpenSearch Dashboards server', () => {
43
43
plugins : {
44
44
scanDirs : [ resolve ( __dirname , '../..' ) ] ,
45
45
} ,
46
+ home : { disableWelcomeScreen : true } ,
46
47
server : {
47
48
host : 'localhost' ,
48
49
port : 5601 ,
@@ -235,8 +236,8 @@ describe('start OpenSearch Dashboards server', () => {
235
236
} ) ;
236
237
237
238
it ( 'Login to Dashboards and resume from nextUrl' , async ( ) => {
238
- const urlWithHash = `http://localhost:5601/app/dashboards#/view/7adfa750-4c81-11e8-b3d7-01146121b73d?_g=(filters:!(),refreshInterval:(pause:!f,value:900000),time:(from:now-24h,to:now))&_a=(description:'Analyze%20mock%20flight%20data%20for%20OpenSearch-Air,%20Logstash%20Airways,%20OpenSearch%20Dashboards%20Airlines%20and%20BeatsWest',filters:!(),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!t,title:'%5BFlights%5D%20Global%20Flight%20Dashboard',viewMode:view) ` ;
239
- const loginUrlWithNextUrl = `http://localhost:5601/app/login?nextUrl=%2Fapp%2Fdashboards#/view/7adfa750-4c81-11e8-b3d7-01146121b73d?_g=(filters:!(),refreshInterval:(pause:!f,value:900000),time:(from:now-24h,to:now))&_a=(description:'Analyze%20mock%20flight%20data%20for%20OpenSearch-Air,%20Logstash%20Airways,%20OpenSearch%20Dashboards%20Airlines%20and%20BeatsWest',filters:!(),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!t,title:'%5BFlights%5D%20Global%20Flight%20Dashboard',viewMode:view) ` ;
239
+ const urlWithHash = `http://localhost:5601/app/security- dashboards-plugin#/getstarted ` ;
240
+ const loginUrlWithNextUrl = `http://localhost:5601/app/login?nextUrl=%2Fapp%2Fsecurity-dashboards-plugin#/getstarted ` ;
240
241
const driver = getDriver ( browser , options ) . build ( ) ;
241
242
await driver . manage ( ) . deleteAllCookies ( ) ;
242
243
await driver . get ( loginUrlWithNextUrl ) ;
@@ -259,7 +260,7 @@ describe('start OpenSearch Dashboards server', () => {
259
260
} ) ;
260
261
261
262
it ( 'Login to Dashboards without nextUrl' , async ( ) => {
262
- const urlWithoutHash = `http://localhost:5601/app/home` ;
263
+ const urlWithoutHash = `http://localhost:5601/app/home#/ ` ;
263
264
const loginUrl = `http://localhost:5601/app/login` ;
264
265
const driver = getDriver ( browser , options ) . build ( ) ;
265
266
await driver . manage ( ) . deleteAllCookies ( ) ;
@@ -273,6 +274,15 @@ describe('start OpenSearch Dashboards server', () => {
273
274
until . elementsLocated ( By . xpath ( '/html/body/div[1]/div/header/div/div[2]' ) ) ,
274
275
20000
275
276
) ;
277
+ await driver . wait ( until . elementsLocated ( By . css ( 'img[data-test-subj="defaultLogo"]' ) ) , 20000 ) ;
278
+ await driver . wait (
279
+ until . elementsLocated ( By . css ( 'section[aria-labelledby="homDataAdd__title"]' ) ) ,
280
+ 20000
281
+ ) ;
282
+ await driver . wait (
283
+ until . elementsLocated ( By . css ( 'section[aria-labelledby="homDataManage__title"]' ) ) ,
284
+ 20000
285
+ ) ;
276
286
const windowHash = await driver . getCurrentUrl ( ) ;
277
287
console . log ( 'windowHash: ' + windowHash ) ;
278
288
expect ( windowHash ) . toEqual ( urlWithoutHash ) ;
0 commit comments