title: How to test if an input component is readOnly, React/Enzyme
body: <p>I've designed a component in react that contains an input field that can only ever be set and therefore must be readOnly but can't figure out how to test if this input is readOnly in Enzyme. </p>
  
  <p>I can't find anything about the readOnly attribute but someone had a similar question to <a href="https://github.com/airbnb/enzyme/issues/336" rel="nofollow noreferrer">Test if an Input is disabled</a>. from this it seems like I'd need to use something like the code below.</p>
  
  <pre><code>test('select button select input must be read only', () =&gt; {
      expect(select.find('div').find('div').find('input').hasAttribute('readOnly', 'true').toBeTruthy();
  });
  </code></pre>
  
  <p>However <code>hasAttribute</code> is not recognised on type ShallowWrapper and none of the other methods in the link above translate/work/are recognised. </p>
  
  <p>Just to clarify my input field is below.</p>
  
  <pre><code>&lt;input readOnly={true} type="text" placeholder={selectedOption} /&gt;
  </code></pre>
  
  <p>Has anyone encountered this before? How Would I use Enzyme to test this input is readOnly?</p>