Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,8 @@ import { coreWorkerFixtures } from '../../worker';
* ensuring consistent browser state across all tests.
*/
export const pageContextFixture = coreWorkerFixtures.extend<{ context: BrowserContext }>({
context: async ({ context, log }, use) => {
// Add init script to set localStorage flags before any page navigation
// This will be executed on every page load/reload
await context.addInitScript(() => {
// Force hide tour for the solution navigation
localStorage.setItem('solutionNavigationTour:completed', 'true');
});

log.debug('Page context initialized');
context: async ({ context }, use) => {
// set localStorage flags before any page navigation
await use(context);
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ export const coreWorkerFixtures = base.extend<{}, CoreWorkerFixtures>({
const serversConfigDir = projectUse.serversConfigDir;
const configInstance = createScoutConfig(serversConfigDir, projectUse.configName, log);

log.info(
`Running tests against ${
configInstance.isCloud
? configInstance.serverless
? `MKI ${configInstance.projectType} project`
: 'ECH deployment'
: `local ${
configInstance.serverless ? `serverless ${configInstance.projectType}` : 'stateful'
} cluster`
}`
);

use(configInstance);
},
{ scope: 'worker' },
Expand Down Expand Up @@ -179,6 +191,8 @@ export const coreWorkerFixtures = base.extend<{}, CoreWorkerFixtures>({

customRoleHash = newRoleHash;
};
// Hide the announcements (including the sidenav tour) in the default space
await kbnClient.uiSettings.update({ hideAnnouncements: true });

await use({ session, customRoleName, setCustomRole });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ export const scoutSpaceParallelFixture = coreWorkerFixtures.extend<
setDefaultTime,
};

/**
* To hide the sidenav tour we need to enable 'hideAnnouncements' setting
* It should hide both space tour and sidenav tour.
* Currently it can be set only per space, so we set it right after new space is created.
* TODO: update if setting becomes global https://github.com/elastic/kibana/issues/234771
*/
await kbnClient.uiSettings.update({ hideAnnouncements: true }, { space: spaceId });

log.serviceMessage('scoutSpace', `New Kibana space '${spaceId}' created`);
await use({ savedObjects, uiSettings, id: spaceId });

Expand Down