Skip to content

Commit

Permalink
Fix serverless log explorer nav tests
Browse files Browse the repository at this point in the history
  • Loading branch information
weltenwort committed Aug 28, 2023
1 parent 2b2e27a commit 5d07c88
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
3 changes: 3 additions & 0 deletions x-pack/test_serverless/functional/config.base.ts
Expand Up @@ -52,6 +52,9 @@ export function createTestConfig(options: CreateTestConfigOptions) {
observability: {
pathname: '/app/observability',
},
observabilityLogExplorer: {
pathname: '/app/observability-log-explorer',
},
management: {
pathname: '/app/management',
},
Expand Down
Expand Up @@ -36,12 +36,12 @@ export default function ({ getPageObject, getService }: FtrProviderContext) {
await svlCommonNavigation.sidenav.expectSectionClosed('project_settings_project_nav');

// navigate to log explorer
await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'observabilityLogExplorer' });
await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'observability-log-explorer' });
await svlCommonNavigation.sidenav.expectLinkActive({
deepLinkId: 'observabilityLogExplorer',
deepLinkId: 'observability-log-explorer',
});
await svlCommonNavigation.breadcrumbs.expectBreadcrumbExists({
deepLinkId: 'observabilityLogExplorer',
deepLinkId: 'observability-log-explorer',
});
await expect(await browser.getCurrentUrl()).contain('/app/observability-log-explorer');

Expand Down Expand Up @@ -79,15 +79,6 @@ export default function ({ getPageObject, getService }: FtrProviderContext) {
await svlCommonNavigation.sidenav.expectSectionOpen('project_settings_project_nav');
});

it('navigate using search', async () => {
await svlCommonNavigation.search.showSearch();
await svlCommonNavigation.search.searchFor('discover log explorer');
await svlCommonNavigation.search.clickOnOption(0);
await svlCommonNavigation.search.hideSearch();

await expect(await browser.getCurrentUrl()).contain('/app/discover#/p/log-explorer');
});

it('shows cases in sidebar navigation', async () => {
await svlCommonNavigation.expectExists();

Expand Down
Expand Up @@ -9,8 +9,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context';

export default function ({ getService, getPageObjects }: FtrProviderContext) {
const kibanaServer = getService('kibanaServer');
const PageObjects = getPageObjects(['navigationalSearch']);
const serverlessNavigation = getService('svlObltNavigation');
const PageObjects = getPageObjects(['observabilityLogExplorer', 'svlCommonNavigation']);

describe('Application', () => {
before('initialize tests', async () => {
Expand All @@ -22,11 +21,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

it('is shown in the global search', async () => {
await serverlessNavigation.navigateToLandingPage();
await PageObjects.navigationalSearch.searchFor('log explorer');
await PageObjects.observabilityLogExplorer.navigateTo();
await PageObjects.svlCommonNavigation.search.showSearch();
await PageObjects.svlCommonNavigation.search.searchFor('log explorer');

const results = await PageObjects.navigationalSearch.getDisplayedResults();
const results = await PageObjects.svlCommonNavigation.search.getDisplayedResults();
expect(results[0].label).to.eql('Log Explorer');

await PageObjects.svlCommonNavigation.search.hideSearch();
});
});
}

0 comments on commit 5d07c88

Please sign in to comment.