Skip to content

Commit

Permalink
remove legacy snapshots from rendering service
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Aug 13, 2020
1 parent 5adf934 commit 2f19db6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 330 deletions.
274 changes: 0 additions & 274 deletions src/core/server/rendering/__snapshots__/rendering_service.test.ts.snap

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

56 changes: 0 additions & 56 deletions src/core/server/rendering/rendering_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,62 +126,6 @@ describe('RenderingService', () => {

expect(data).toMatchSnapshot(INJECTED_METADATA);
});

it('renders "legacy" page', async () => {
const content = await render(createRawRequest(), uiSettings, { app: legacyApp });
const dom = load(content);
const data = JSON.parse(dom('kbn-injected-metadata').attr('data'));

expect(data).toMatchSnapshot(INJECTED_METADATA);
});

it('renders "legacy" page for blank basepath', async () => {
mockRenderingSetupDeps.http.basePath.get.mockReturnValueOnce('');

const content = await render(createRawRequest(), uiSettings, { app: legacyApp });
const dom = load(content);
const data = JSON.parse(dom('kbn-injected-metadata').attr('data'));

expect(data).toMatchSnapshot(INJECTED_METADATA);
});

it('renders "legacy" with custom vars', async () => {
const content = await render(createRawRequest(), uiSettings, {
app: legacyApp,
vars: {
fake: '__TEST_TOKEN__',
},
});
const dom = load(content);
const data = JSON.parse(dom('kbn-injected-metadata').attr('data'));

expect(data).toMatchSnapshot(INJECTED_METADATA);
});

it('renders "legacy" with excluded user settings', async () => {
const content = await render(createRawRequest(), uiSettings, {
app: legacyApp,
includeUserSettings: false,
});
const dom = load(content);
const data = JSON.parse(dom('kbn-injected-metadata').attr('data'));

expect(data).toMatchSnapshot(INJECTED_METADATA);
});

it('renders "legacy" with excluded user settings and custom vars', async () => {
const content = await render(createRawRequest(), uiSettings, {
app: legacyApp,
includeUserSettings: false,
vars: {
fake: '__TEST_TOKEN__',
},
});
const dom = load(content);
const data = JSON.parse(dom('kbn-injected-metadata').attr('data'));

expect(data).toMatchSnapshot(INJECTED_METADATA);
});
});
});
});

0 comments on commit 2f19db6

Please sign in to comment.