Skip to content

Commit

Permalink
reduce snapshot noise
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsongl committed May 9, 2022
1 parent 480dd66 commit c202a8f
Show file tree
Hide file tree
Showing 26 changed files with 2,588 additions and 16,809 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ describe('DashboardEmptyScreen', () => {

test('renders correctly with view mode', () => {
const component = mountComponent();
expect(component).toMatchSnapshot();
expect(component.render()).toMatchSnapshot();
const enterEditModeParagraph = component.find('.dshStartScreen__panelDesc');
expect(enterEditModeParagraph.length).toBe(1);
});

test('renders correctly with edit mode', () => {
const component = mountComponent({ isEditMode: true });
expect(component).toMatchSnapshot();
expect(component.render()).toMatchSnapshot();
const paragraph = component.find('.dshStartScreen__panelDesc');
expect(paragraph.length).toBe(0);
const emptyPanel = findTestSubject(component, 'emptyDashboardWidget');
Expand All @@ -45,7 +45,7 @@ describe('DashboardEmptyScreen', () => {

test('renders correctly with readonly mode', () => {
const component = mountComponent({ isReadonlyMode: true });
expect(component).toMatchSnapshot();
expect(component.render()).toMatchSnapshot();
const paragraph = component.find('.dshStartScreen__panelDesc');
expect(paragraph.length).toBe(0);
const emptyPanel = findTestSubject(component, 'emptyDashboardWidget');
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('Inspector Data View', () => {
adapters.tables.logDatatable({ columns: [{ id: '1' }], rows: [{ '1': 123 }] });
// After the loader has resolved we'll still need one update, to "flush" the state changes
component.update();
expect(component).toMatchSnapshot();
expect(component.render()).toMatchSnapshot();
});

it('should render single table without selector', async () => {
Expand All @@ -80,7 +80,7 @@ describe('Inspector Data View', () => {
component.update();
expect(component.find('[data-test-subj="inspectorDataViewSelectorLabel"]')).toHaveLength(0);

expect(component).toMatchSnapshot();
expect(component.render()).toMatchSnapshot();
});

it('should support multiple datatables', async () => {
Expand All @@ -104,7 +104,7 @@ describe('Inspector Data View', () => {
component.update();
expect(component.find('[data-test-subj="inspectorDataViewSelectorLabel"]')).toHaveLength(1);

expect(component).toMatchSnapshot();
expect(component.render()).toMatchSnapshot();
});
});
});
Loading

0 comments on commit c202a8f

Please sign in to comment.