title: When to choose system test over integration test Rails 5.1?
body: <p>With the release of Rails 5.1, they included system tests. Which means we can test our JavaScript too in Rails.
  I see Rails guide explains a sample test <strong>creating article</strong> in both ways: via system test and via integration test.</p>
  
  <p>Now the question is: before Rails 5.1 I was writing complex test cases in integration tests. But now I have two options to write a test case.
  I can write test case like </p>
  
  <pre><code>test: should create article
  </code></pre>
  
  <p>in integration test, but I can also write the same test case in system test. </p>
  
  <p>So when should I choose system test to write a test case and when to choose integration tests ?</p>