textField.spec.jsx 625 B

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