- {branding.smallLogoUrl === '' ? (
+ {branding.smallLogoUrl === undefined ? (
diff --git a/test/functional/apps/visualize/_custom_branding.js b/test/functional/apps/visualize/_custom_branding.js
index bc3583645e77..32aba1317b8b 100644
--- a/test/functional/apps/visualize/_custom_branding.js
+++ b/test/functional/apps/visualize/_custom_branding.js
@@ -30,7 +30,7 @@
* GitHub history for details.
*/
import expect from '@osd/expect';
-import { UI_SETTINGS } from '../../../../src/plugins/data/common';
+import { UI_SETTINGS } from './index';
export default function ({ getService, getPageObjects }) {
const browser = getService('browser');
@@ -46,12 +46,16 @@ export default function ({ getService, getPageObjects }) {
const expectedWelcomeLogo =
'https://opensearch.org/assets/brand/SVG/Logo/opensearch_logo_darkmode.svg';
const expectedWelcomeMessage = 'Welcome to OpenSearch';
+
+ //unloading any pre-existing settings so the welcome page will appear
before(async function () {
await opensearchArchiver.unload('logstash_functional');
await opensearchArchiver.unload('long_window_logstash');
await opensearchArchiver.unload('visualize');
await PageObjects.common.navigateToApp('home');
});
+
+ //loading the settings again for
after(async function () {
await browser.setWindowSize(1280, 800);
await opensearchArchiver.loadIfNeeded('logstash_functional');
@@ -62,6 +66,7 @@ export default function ({ getService, getPageObjects }) {
[UI_SETTINGS.FORMAT_BYTES_DEFAULT_PATTERN]: '0,0.[000]b',
});
});
+
it('with customized logo', async () => {
await testSubjects.existOrFail('welcomeCustomLogo');
const actualLabel = await testSubjects.getAttribute(
@@ -70,6 +75,7 @@ export default function ({ getService, getPageObjects }) {
);
expect(actualLabel.toUpperCase()).to.equal(expectedWelcomeLogo.toUpperCase());
});
+
it('with customized title', async () => {
await testSubjects.existOrFail('welcomeCustomTitle');
const actualLabel = await testSubjects.getAttribute(
@@ -84,6 +90,7 @@ export default function ({ getService, getPageObjects }) {
this.tags('includeFirefox');
const expectedUrl =
'https://opensearch.org/assets/brand/SVG/Logo/opensearch_logo_darkmode.svg';
+
before(async function () {
await PageObjects.common.navigateToApp('home');
});
diff --git a/test/functional/page_objects/common_page.ts b/test/functional/page_objects/common_page.ts
index 84adae2509e7..57ff47e81cf7 100644
--- a/test/functional/page_objects/common_page.ts
+++ b/test/functional/page_objects/common_page.ts
@@ -68,6 +68,8 @@ export function CommonPageProvider({ getService, getPageObjects }: FtrProviderCo
// 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.
+
+ // Update: Enable the welcome screen for functional tests on the welcome screen.
await browser.setLocalStorageItem('home:welcome:show', 'true');
let currentUrl = await browser.getCurrentUrl();
log.debug(`currentUrl = ${currentUrl}\n appUrl = ${appUrl}`);