Skip to content

Commit

Permalink
Fix more jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stacey-gammon committed Aug 31, 2019
1 parent 46cba34 commit 465864a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ test('renders DashboardGrid', () => {
</KibanaContextProvider>
);

const panelElements = component.find('EmbeddableChildPanelUi');
const panelElements = component.find('EmbeddableChildPanel');
expect(panelElements.length).toBe(2);
});

Expand All @@ -115,7 +115,7 @@ test('renders DashboardGrid with no visualizations', async () => {
props.container.updateInput({ panels: {} });
await nextTick();
component.update();
expect(component.find('InjectIntl(EmbeddableChildPanelUi)').length).toBe(0);
expect(component.find('EmbeddableChildPanel').length).toBe(0);
});

test('DashboardGrid removes panel when removed from container', async () => {
Expand All @@ -132,7 +132,7 @@ test('DashboardGrid removes panel when removed from container', async () => {
props.container.updateInput({ panels: filteredPanels });
await nextTick();
component.update();
const panelElements = component.find('InjectIntl(EmbeddableChildPanelUi)');
const panelElements = component.find('EmbeddableChildPanel');
expect(panelElements.length).toBe(1);
});

Expand All @@ -148,7 +148,7 @@ test('DashboardGrid renders expanded panel', async () => {
await nextTick();
component.update();
// Both panels should still exist in the dom, so nothing needs to be re-fetched once minimized.
expect(component.find('InjectIntl(EmbeddableChildPanelUi)').length).toBe(2);
expect(component.find('EmbeddableChildPanel').length).toBe(2);

expect(
(component.find('DashboardGridUi').state() as { expandedPanelId?: string }).expandedPanelId
Expand All @@ -157,7 +157,7 @@ test('DashboardGrid renders expanded panel', async () => {
props.container.updateInput({ expandedPanelId: undefined });
await nextTick();
component.update();
expect(component.find('InjectIntl(EmbeddableChildPanelUi)').length).toBe(2);
expect(component.find('EmbeddableChildPanel').length).toBe(2);

expect(
(component.find('DashboardGridUi').state() as { expandedPanelId?: string }).expandedPanelId
Expand Down

0 comments on commit 465864a

Please sign in to comment.