title: How to set screen size for chrome headless system test in rails 5.1?
body: <p>In order to work with and test a new responsive frontend for my site, I'm trying to use Rails' new system tests (specs) with javascript and Chrome headless. I cannot figure out a way to set the screen size of the browser in the spec, though.</p>
  
  <p>Here's my setup in <code>spec/rails_helper.rb</code></p>
  
  <pre><code>config.before(:each, type: :system, js: true) do
    driven_by :selenium_chrome_headless, screen_size: [1900, 800]
  end
  </code></pre>
  
  <p>I then create the screenshot with:</p>
  
  <pre><code>page.driver.save_screenshot(the_uri)
  </code></pre>
  
  <p>But the size of the rendered screenshot still is the default, which is much smaller. Ideally, I'd like to see the entire rendered page, but at this point, I'd be happy with just using the dimensions I've provided. </p>
  
  <p>Ideas on what I'm missing here? </p>