Rails system tests for multiple screen sizes
18-Dec-2022 960
Rails system tests simulate a user's actions in a web browser so it's akin to the app's real world usage. In a responsive app, this means testing on multiple screen sizes as well.Capybara, the tool used by system tests under the hood, has a method to resize the current window during a test run. But, since the tests are not run in a set order, any test that resizes the window needs to restore the size after it's done. Otherwise, subsequent tests run in that window could fail.
Rails system tests for multiple screen sizes #ruby #rubydeveloper #rubyonrails #Rails #system #tests #multiple #screen #sizes #tests https://rubyonrails.ba/link/rails-system-tests-for-multiple-screen-sizes