Files
grafana/public/app/features/teams/TeamPreferences.test.tsx
Marcus Efraimsson 1194ff282e team preferences ui
2018-11-12 20:58:59 +01:00

29 lines
722 B
TypeScript

import React from 'react';
import { shallow } from 'enzyme';
import { TeamPreferences, Props } from './TeamPreferences';
const setup = () => {
const props: Props = {
preferences: {
homeDashboardId: 1,
timezone: 'UTC',
theme: 'Default',
},
starredDashboards: [{ id: 1, title: 'Standard dashboard', url: '', uri: '', uid: '', type: '', tags: [] }],
setTeamTimezone: jest.fn(),
setTeamTheme: jest.fn(),
setTeamHomeDashboard: jest.fn(),
updateTeamPreferences: jest.fn(),
};
return shallow(<TeamPreferences {...props} />);
};
describe('Render', () => {
it('should render component', () => {
const wrapper = setup();
expect(wrapper).toMatchSnapshot();
});
});