mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix: Updated test
This commit is contained in:
parent
1e5ad4da78
commit
68767acb1c
@ -4,10 +4,6 @@ import { AlertRuleList, Props } from './AlertRuleList';
|
|||||||
import { AlertRule, NavModel } from '../../types';
|
import { AlertRule, NavModel } from '../../types';
|
||||||
import appEvents from '../../core/app_events';
|
import appEvents from '../../core/app_events';
|
||||||
|
|
||||||
jest.mock('react-redux', () => ({
|
|
||||||
connect: () => params => params,
|
|
||||||
}));
|
|
||||||
|
|
||||||
jest.mock('../../core/app_events', () => ({
|
jest.mock('../../core/app_events', () => ({
|
||||||
emit: jest.fn(),
|
emit: jest.fn(),
|
||||||
}));
|
}));
|
||||||
@ -93,7 +89,7 @@ describe('Life cycle', () => {
|
|||||||
const { instance } = setup();
|
const { instance } = setup();
|
||||||
instance.fetchRules = jest.fn();
|
instance.fetchRules = jest.fn();
|
||||||
|
|
||||||
instance.componentDidUpdate({ stateFilter: 'ok' });
|
instance.componentDidUpdate({ stateFilter: 'ok' } as Props);
|
||||||
|
|
||||||
expect(instance.fetchRules).toHaveBeenCalled();
|
expect(instance.fetchRules).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
@ -101,7 +101,7 @@ exports[`Render should render alert rules 1`] = `
|
|||||||
<ol
|
<ol
|
||||||
className="alert-rule-list"
|
className="alert-rule-list"
|
||||||
>
|
>
|
||||||
<AlertRuleItem
|
<Connect(AlertRuleItem)
|
||||||
key="1"
|
key="1"
|
||||||
rule={
|
rule={
|
||||||
Object {
|
Object {
|
||||||
@ -121,7 +121,7 @@ exports[`Render should render alert rules 1`] = `
|
|||||||
}
|
}
|
||||||
search=""
|
search=""
|
||||||
/>
|
/>
|
||||||
<AlertRuleItem
|
<Connect(AlertRuleItem)
|
||||||
key="3"
|
key="3"
|
||||||
rule={
|
rule={
|
||||||
Object {
|
Object {
|
||||||
|
Loading…
Reference in New Issue
Block a user