Skip to content
Merged
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
34 changes: 18 additions & 16 deletions test/plugin_functional/test_suites/core_plugins/rendering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ export default function({ getService, getPageObjects }: PluginFunctionalProvider
return JSON.parse(document.querySelector('kbn-injected-metadata')!.getAttribute('data')!)
.legacyMetadata.uiSettings.user;
});
const exists = (selector: string) => testSubjects.exists(selector, { timeout: 2000 });
const exists = (selector: string) => testSubjects.exists(selector, { timeout: 5000 });
const findLoadingMessage = () => testSubjects.find('kbnLoadingMessage', 5000);
const getRenderingSession = () =>
browser.execute(() => {
return window.__RENDERING_SESSION__;
});

describe('rendering service', () => {
it('renders "core" application', async () => {
Expand Down Expand Up @@ -136,8 +140,7 @@ export default function({ getService, getPageObjects }: PluginFunctionalProvider
expect(await exists('renderingHeader')).to.be(false);
});

// Flaky: https://github.com/elastic/kibana/issues/55750
it.skip('navigates between standard application and one with custom appRoute', async () => {
it('navigates between standard application and one with custom appRoute', async () => {
await navigateTo('/');
await find.waitForElementStale(await findLoadingMessage());

Expand All @@ -153,15 +156,14 @@ export default function({ getService, getPageObjects }: PluginFunctionalProvider
expect(await exists('appStatusApp')).to.be(true);
expect(await exists('renderingHeader')).to.be(false);

expect(
await browser.execute(() => {
return window.__RENDERING_SESSION__;
})
).to.eql(['/app/app_status', '/render/core', '/app/app_status']);
expect(await getRenderingSession()).to.eql([
'/app/app_status',
'/render/core',
'/app/app_status',
]);
});

// Flaky: https://github.com/elastic/kibana/issues/55736
it.skip('navigates between applications with custom appRoutes', async () => {
it('navigates between applications with custom appRoutes', async () => {
await navigateTo('/');
await find.waitForElementStale(await findLoadingMessage());

Expand All @@ -170,18 +172,18 @@ export default function({ getService, getPageObjects }: PluginFunctionalProvider
expect(await exists('customAppRouteHeader')).to.be(false);

await navigateToApp('Custom App Route');
expect(await exists('renderingHeader')).to.be(false);
expect(await exists('customAppRouteHeader')).to.be(true);
expect(await exists('renderingHeader')).to.be(false);

await navigateToApp('Rendering');
expect(await exists('renderingHeader')).to.be(true);
expect(await exists('customAppRouteHeader')).to.be(false);

expect(
await browser.execute(() => {
return window.__RENDERING_SESSION__;
})
).to.eql(['/render/core', '/custom/appRoute', '/render/core']);
expect(await getRenderingSession()).to.eql([
'/render/core',
'/custom/appRoute',
'/render/core',
]);
});
});
}