title: Testing simple Redux-Form with Enzyme (where is value??)
body: <p>I have the most simple redux-form connected to redux example :</p>
  
  <pre><code>import * as React from 'react';
  import { Field, reduxForm } from 'redux-form';
  import { connect } from 'react-redux';
  
  class TestForm extends React.PureComponent {
      render() {
          return (
              &lt;form&gt;
                  &lt;Field component={Input} name={'testField'}/&gt;
              &lt;/form&gt;
          );
      }
  }
  
  class Input extends React.PureComponent {
      render(): React.Node {
          let { input } = this.props;
          // input = {name: 'testField', value: 'test value'};
          return (
                  &lt;input name={input.name} value={input.value} type='text' onChange={()=&gt;1}/&gt;
          );
      }
  }
  
  const mapStateToProps = ({ testForm }) =&gt; {
      return {
          initialValues: testForm,
      };
  };
  
  export const TestFormWithReduxForm = reduxForm({ form: 'test form'})(TestForm);
  
  export default connect(mapStateToProps)(TestFormWithReduxForm);
  </code></pre>
  
  <p>Note the following :</p>
  
  <ul>
  <li>I have my own custom Input (called Input)</li>
  <li>I am connecting to reduxForm, and then connecting to redux.</li>
  <li>The initial values that are passed in should have 'name' and 'value'.</li>
  </ul>
  
  <p>I have the following test (Jest+Enzyme)</p>
  
  <pre><code>import React from 'react';
  import { Provider } from 'react-redux';
  import Enzyme, { mount } from 'enzyme';
  import Adapter from 'enzyme-adapter-react-16';
  import configureStore from 'redux-mock-store';
  
  import TestForm from './TestForm';
  
  Enzyme.configure({ adapter: new Adapter() });
  
  describe('Redux Form Test', () =&gt; {
      let wrapper;
  
      let mockStoreData = {
          testForm: {
              testField: 'test value',
          },
      };
  
      const mockStore = configureStore();
      const store = mockStore(mockStoreData);
  
      beforeEach(() =&gt; {
          wrapper = mount(
              &lt;Provider store={store}&gt;
                      &lt;TestForm /&gt;
              &lt;/Provider&gt;
          );
      });
  
      it('Check Value', () =&gt; {
          let inputs = wrapper.find('input');
          expect(inputs.at(0).prop('name')).toBe('testField'); //OK!!!
          expect(inputs.at(0).prop('value')).toBe('test value'); //empty string!!
      });
  });
  </code></pre>
  
  <p>The Jest test passes in a 'testForm' object with 'testField' (and its value) into the the store.</p>
  
  <p>As expected, the name on the first input is 'testField', however the 'value' is empty (ie. an empty string).</p>
  
  <p>This is not expected, because if I were to render the component in a normal page then 'test value' would appear.</p>
  
  <p>So something seems to be broken here. I am not sure if it has something to do with redux-form or enzyme, but the redux-form Field object seems to be intercepting the properties that are passed into the Input object. </p>
  
  <p>I am starting to question whether it is even <strong><em>possible</em></strong> to test <strong>redux form</strong>.</p>