Hi,
I have a feature request regarding the screen size used by System test. Currently you initiate the screen size inside
/test/application_system_test_case.rb
require "test_helper"
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
end
What if you have a mobile friendly web application, and the app is displayed differently depending on the screen size.
Could it be possible to change the size of the browser while running the test suite, this could be handy, because nobody wants to change a config files in between tests?
I have found that you can change the screen size using capybara like this. I have tested this myself, and works fine. There must be similar solutions using poltergeist and webkit as well.
Capybara.current_session.driver.browser.manage.window.resize_to(400, 400)
My initial idea would be to somehow specify in your test, what screen size you would like for your tests, and change it depending. What do you think about this?
If there is anything else that need to be done in regards to System Test, I am open for suggestion, I am eager to contribute. :)