Skip to content

Commit

Permalink
remove legacyMode leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Sep 3, 2020
1 parent 484dea4 commit 68de7ea
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 30 deletions.
1 change: 0 additions & 1 deletion src/core/public/chrome/ui/header/header.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ function mockProps() {
forceAppSwitcherNavigation$: new BehaviorSubject(false),
helpExtension$: new BehaviorSubject(undefined),
helpSupportUrl$: new BehaviorSubject(''),
legacyMode: false,
navControlsLeft$: new BehaviorSubject([]),
navControlsRight$: new BehaviorSubject([]),
basePath: http.basePath,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/core/server/rendering/rendering_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export class RenderingService implements CoreService<InternalRenderingServiceSet
basePath,
serverBasePath,
env,
legacyMode: false,
anonymousStatusPage: status.isStatusPageAnonymous(),
i18n: {
translationsUrl: `${basePath}/translations/${i18n.getLocale()}.json`,
Expand Down
1 change: 0 additions & 1 deletion src/core/server/rendering/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export interface RenderingMetadata {
mode: EnvironmentMode;
packageInfo: PackageInfo;
};
legacyMode: boolean;
anonymousStatusPage: boolean;
i18n: {
translationsUrl: string;
Expand Down
11 changes: 0 additions & 11 deletions test/plugin_functional/test_suites/core_plugins/applications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,5 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
const windowHeight = (await browser.getWindowSize()).height;
expect(wrapperHeight).to.be.below(windowHeight);
});

// Not sure if we need this test or not. If yes, we need to find another legacy app
it.skip('can navigate from NP apps to legacy apps', async () => {
await appsMenu.clickLink('Stack Management');
await testSubjects.existOrFail('managementNav');
});

it('can navigate from legacy apps to NP apps', async () => {
await appsMenu.clickLink('Foo');
await testSubjects.existOrFail('fooAppHome');
});
});
}
14 changes: 3 additions & 11 deletions test/plugin_functional/test_suites/core_plugins/rendering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
window.__RENDERING_SESSION__.push(window.location.pathname);
});
};
const getLegacyMode = () =>
browser.execute(() => {
return JSON.parse(document.querySelector('kbn-injected-metadata')!.getAttribute('data')!)
.legacyMode;
});

const getUserSettings = () =>
browser.execute(() => {
return JSON.parse(document.querySelector('kbn-injected-metadata')!.getAttribute('data')!)
Expand All @@ -73,13 +69,11 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
it('renders "core" application', async () => {
await navigateTo('/render/core');

const [loadingMessage, legacyMode, userSettings] = await Promise.all([
const [loadingMessage, userSettings] = await Promise.all([
findLoadingMessage(),
getLegacyMode(),
getUserSettings(),
]);

expect(legacyMode).to.be(false);
expect(userSettings).to.not.be.empty();

await find.waitForElementStale(loadingMessage);
Expand All @@ -90,13 +84,11 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
it('renders "core" application without user settings', async () => {
await navigateTo('/render/core?includeUserSettings=false');

const [loadingMessage, legacyMode, userSettings] = await Promise.all([
const [loadingMessage, userSettings] = await Promise.all([
findLoadingMessage(),
getLegacyMode(),
getUserSettings(),
]);

expect(legacyMode).to.be(false);
expect(userSettings).to.be.empty();

await find.waitForElementStale(loadingMessage);
Expand Down

0 comments on commit 68de7ea

Please sign in to comment.