title: Enzyme, How to access a component passed in props
body: <p>What I am trying to test in <code>MyComponent</code> is the value of <code>checked</code> props of the <code>Switch</code> component which is a props of <code>FormControlLabel</code> component:</p>
  
  <pre><code>class MyComponent extends Component {
  
   (...)
  
   render() {
    return (
     &lt;FormControlLabel
      name={`formControl`}
      control={
        &lt;Switch
          name={`switch`}
          data
          checked={this.state.isChecked}
          onClick={this.handleChange}
          value={checked}
          /&gt;
      }
      /&gt;
    );
   }
  }
  </code></pre>
  
  <p>I can access the <code>FormControlLabel</code> component like this: </p>
  
  <pre><code>const wrapper = shallow(&lt;MyComponent /&gt;);
  
  wrapper.find('[name="formControl"]');
  </code></pre>
  
  <p>I tried to access the <code>Switch</code> component like this but it's not working:</p>
  
  <pre><code>wrapper.find('[name="switch"]');
  </code></pre>
  
  <p>How can I access the <code>checked</code> props of <code>Switch</code> component ?</p>
  
  API
  
  <ul>
  <li>shallow</li>
  </ul>
  
  Version
  
  <ul>
  <li>Enzyme: 3.3.0</li>
  <li>React: 16.2.0</li>
  </ul>
  
  Adapter
  
  <ul>
  <li>enzyme-adapter-react-16</li>
  </ul>