Add welcome screen disabling to common page (#66713)

This PR adds logic to disable the welcome screen to the common_page which is already used in the x-pack security_page.
This commit is contained in:
Robert Oskamp 2020-05-27 13:11:17 +02:00 committed by GitHub
parent 909d4188f4
commit dbbd09058c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,6 +73,11 @@ export function CommonPageProvider({ getService, getPageObjects }: FtrProviderCo
const loginPage = currentUrl.includes('/login');
const wantedLoginPage = appUrl.includes('/login') || appUrl.includes('/logout');
// Disable the welcome screen. This is relevant for environments
// which don't allow to use the yml setting, e.g. cloud production.
// It is done here so it applies to logins but also to a login re-use.
await browser.setLocalStorageItem('home:welcome:show', 'false');
if (loginPage && !wantedLoginPage) {
log.debug('Found login page');
if (config.get('security.disableTestUser')) {