2018-09-27 04:26:47 -05:00
|
|
|
|
import React from 'react';
|
|
|
|
|
import { shallow } from 'enzyme';
|
|
|
|
|
import { ApiKeysAddedModal, Props } from './ApiKeysAddedModal';
|
|
|
|
|
|
|
|
|
|
const setup = (propOverrides?: object) => {
|
|
|
|
|
const props: Props = {
|
2021-04-28 08:22:28 -05:00
|
|
|
|
onDismiss: jest.fn(),
|
2018-09-27 04:26:47 -05:00
|
|
|
|
apiKey: 'api key test',
|
|
|
|
|
rootPath: 'test/path',
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Object.assign(props, propOverrides);
|
|
|
|
|
|
|
|
|
|
const wrapper = shallow(<ApiKeysAddedModal {...props} />);
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
wrapper,
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
describe('Render', () => {
|
|
|
|
|
it('should render component', () => {
|
|
|
|
|
const { wrapper } = setup();
|
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
|
|
|
});
|
|
|
|
|
});
|