Commit 61e75049 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Minor refactor tests to use snapshots

parent 7a02b40c
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Value stream analytics component isEmptyStage = true renders the empty stage with \`Not enough data\` message 1`] = `"<gl-empty-state-stub title=\\"We don't have enough data to show this stage.\\" svgpath=\\"path/to/no/data\\" description=\\"The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage.\\" class=\\"js-empty-state\\"></gl-empty-state-stub>"`;
exports[`Value stream analytics component isLoading = true renders the path navigation component with prop \`loading\` set to true 1`] = `"<path-navigation-stub loading=\\"true\\" stages=\\"\\" selectedstage=\\"[object Object]\\" class=\\"js-path-navigation gl-w-full gl-pb-2\\"></path-navigation-stub>"`;
exports[`Value stream analytics component without enough permissions renders the empty stage with \`You need permission\` message 1`] = `"<gl-empty-state-stub title=\\"You need permission.\\" svgpath=\\"path/to/no/access\\" description=\\"Want to see the data? Please ask an administrator for access.\\" class=\\"js-empty-state\\"></gl-empty-state-stub>"`;
......@@ -93,8 +93,7 @@ describe('Value stream analytics component', () => {
});
it('renders the path navigation component with prop `loading` set to true', () => {
expect(findPathNavigation().exists()).toBe(true);
expect(findPathNavigation().props('loading')).toBe(true);
expect(findPathNavigation().html()).toMatchSnapshot();
});
it('does not render the overview metrics', () => {
......@@ -131,10 +130,8 @@ describe('Value stream analytics component', () => {
});
});
it('renders the empty stage with not enough data', () => {
const es = findEmptyStage();
expect(es.exists()).toBe(true);
expect(es.props('title')).toBe("We don't have enough data to show this stage.");
it('renders the empty stage with `Not enough data` message', () => {
expect(findEmptyStage().html()).toMatchSnapshot();
});
});
......@@ -145,10 +142,8 @@ describe('Value stream analytics component', () => {
});
});
it('renders the empty stage', () => {
const es = findEmptyStage();
expect(es.exists()).toBe(true);
expect(es.props('title')).toBe('You need permission.');
it('renders the empty stage with `You need permission` message', () => {
expect(findEmptyStage().html()).toMatchSnapshot();
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment