textField.spec.jsx 611 B

123456789101112131415161718192021
  1. import {mountWithTheme} from 'sentry-test/enzyme';
  2. import {Form, TextField} from 'app/components/forms';
  3. describe('TextField', function () {
  4. describe('render()', function () {
  5. it('renders without form context', function () {
  6. const wrapper = mountWithTheme(<TextField name="fieldName" />);
  7. expect(wrapper).toSnapshot();
  8. });
  9. it('renders with form context', function () {
  10. const wrapper = mountWithTheme(
  11. <Form initialData={{fieldName: 'fieldValue'}}>
  12. <TextField name="fieldName" />
  13. </Form>
  14. );
  15. expect(wrapper).toSnapshot();
  16. });
  17. });
  18. });