passwordField.spec.jsx 791 B

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