mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 08:35:43 -06:00
* Migrate shared preferences * Remove unused import * Migrate org name form * Update TeamSettings * Convert user settings * Fix inital default values * Update snapshots * Fix CI errors * Fix failing Ci * Update snapshots * Large spacing * Move use Form for OrgSettings and add FieldSet * Remove snapshots * Add snapshots * Remove unused prop
30 lines
636 B
TypeScript
30 lines
636 B
TypeScript
import React from 'react';
|
|
import { shallow } from 'enzyme';
|
|
import { Props, TeamSettings } from './TeamSettings';
|
|
import { getMockTeam } from './__mocks__/teamMocks';
|
|
|
|
const setup = (propOverrides?: object) => {
|
|
const props: Props = {
|
|
team: getMockTeam(),
|
|
updateTeam: jest.fn(),
|
|
};
|
|
|
|
Object.assign(props, propOverrides);
|
|
|
|
const wrapper = shallow(<TeamSettings {...props} />);
|
|
const instance = wrapper.instance() as any;
|
|
|
|
return {
|
|
wrapper,
|
|
instance,
|
|
};
|
|
};
|
|
|
|
describe('Render', () => {
|
|
it('should render component', () => {
|
|
const { wrapper } = setup();
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
});
|