title: Enzyme/ReactJS: How to find specific child component
body: <p>I am trying to do a enzyme/jest unit test for a component. I need to simulate a change event of a specific child component (as there are two of them).</p>
  
  <pre><code>const wrapper = shallow(&lt;CreateAccount /&gt;)
  wrapper.find({ name: 'username' }).simulate('change', { target: { value: 'Username' } })
  wrapper.find({ password: 'password' }).simulate('change', { target: { value: 'Password' } })
  const state = wrapper.instance().state
  expect(state).toEqual({ username: 'Username', password: 'Password' })
  </code></pre>
  
  <p>But this is not the correct way to find both Input components...</p>
  
  <p>This is how my render() function of my component looks like:</p>
  
  <pre><code>render () {
    return (
      &lt;Form onSubmit={this._onSubmit.bind(this)}&gt;
        &lt;Input
          value={this.state.description}
          onChange={this._onChange.bind(this)}
          name='username'
          type='text'
          placeholder='Username'
        /&gt;
        &lt;Input
          value={this.state.url}
          onChange={this._onChange.bind(this)}
          name='password'
          type='password'
          placeholder='Password'
        /&gt;
        &lt;Button type='submit'&gt;
          Submit
        &lt;/Button&gt;
      &lt;/Form&gt;
    )
  </code></pre>