diff --git a/test/jest_integration/saml_auth.test.ts b/test/jest_integration/saml_auth.test.ts index 7123baf15..5357c14fc 100644 --- a/test/jest_integration/saml_auth.test.ts +++ b/test/jest_integration/saml_auth.test.ts @@ -47,6 +47,7 @@ describe('start OpenSearch Dashboards server', () => { plugins: { scanDirs: [resolve(__dirname, '../..')], }, + home: { disableWelcomeScreen: true }, server: { host: 'localhost', port: 5601, @@ -266,7 +267,7 @@ describe('start OpenSearch Dashboards server', () => { }); it('Login to Dashboard with Hash', async () => { - 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)`; + const urlWithHash = `http://localhost:5601/app/security-dashboards-plugin#/getstarted`; const driver = getDriver(browser, options).build(); await driver.manage().deleteAllCookies(); await driver.get(urlWithHash); diff --git a/test/jest_integration/saml_multiauth.test.ts b/test/jest_integration/saml_multiauth.test.ts index c29c88085..7c755fff2 100644 --- a/test/jest_integration/saml_multiauth.test.ts +++ b/test/jest_integration/saml_multiauth.test.ts @@ -43,6 +43,7 @@ describe('start OpenSearch Dashboards server', () => { plugins: { scanDirs: [resolve(__dirname, '../..')], }, + home: { disableWelcomeScreen: true }, server: { host: 'localhost', port: 5601, @@ -235,8 +236,8 @@ describe('start OpenSearch Dashboards server', () => { }); it('Login to Dashboards and resume from nextUrl', async () => { - 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)`; - 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)`; + const urlWithHash = `http://localhost:5601/app/security-dashboards-plugin#/getstarted`; + const loginUrlWithNextUrl = `http://localhost:5601/app/login?nextUrl=%2Fapp%2Fsecurity-dashboards-plugin#/getstarted`; const driver = getDriver(browser, options).build(); await driver.manage().deleteAllCookies(); await driver.get(loginUrlWithNextUrl); @@ -259,7 +260,7 @@ describe('start OpenSearch Dashboards server', () => { }); it('Login to Dashboards without nextUrl', async () => { - const urlWithoutHash = `http://localhost:5601/app/home`; + const urlWithoutHash = `http://localhost:5601/app/home#/`; const loginUrl = `http://localhost:5601/app/login`; const driver = getDriver(browser, options).build(); await driver.manage().deleteAllCookies(); @@ -273,6 +274,15 @@ describe('start OpenSearch Dashboards server', () => { until.elementsLocated(By.xpath('/html/body/div[1]/div/header/div/div[2]')), 20000 ); + await driver.wait(until.elementsLocated(By.css('img[data-test-subj="defaultLogo"]')), 20000); + await driver.wait( + until.elementsLocated(By.css('section[aria-labelledby="homDataAdd__title"]')), + 20000 + ); + await driver.wait( + until.elementsLocated(By.css('section[aria-labelledby="homDataManage__title"]')), + 20000 + ); const windowHash = await driver.getCurrentUrl(); console.log('windowHash: ' + windowHash); expect(windowHash).toEqual(urlWithoutHash);