mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Fixing flaky CI tests for custom appRoutes (#55763)
This commit is contained in:
parent
c001014f78
commit
5c3de3e16d
1 changed files with 18 additions and 16 deletions
|
@ -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 () => {
|
||||
|
@ -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());
|
||||
|
||||
|
@ -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());
|
||||
|
||||
|
@ -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',
|
||||
]);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue