Use a more realistic size for small window tests
The resolution of most devices is at least 640 pixels in at least one of their dimensions. Since we need the width to be smaller than 640 pixels, having a height of 479px wasn't realistic. Doing so caused the tests checking the sticky "support proposal" tests to fail because on 480px-high devices the sticky message covers the whole screen. This is a usability issue, but since I'm not sure how many people use such a small window when browsing the web, for now I'm simply changing the tests. We're changing the width to 320px since it's the width required by the Web Content Accessibility Guidelines 2.2. Quoting these guidelines [1]: > Content can be presented without loss of information or functionality, > and without requiring scrolling in two dimensions for: > * Vertical scrolling content at a width equivalent to 320 CSS pixels; > * Horizontal scrolling content at a height equivalent to 256 CSS > pixels. Note that, using a height of 256px, the sticky message would make the application unusable, though. IMHO we'll have to get rid of the sticky message sooner or later.
This commit is contained in:
@@ -126,7 +126,7 @@ RSpec.configure do |config|
|
|||||||
|
|
||||||
config.before(:each, :small_window) do
|
config.before(:each, :small_window) do
|
||||||
@window_size = Capybara.current_window.size
|
@window_size = Capybara.current_window.size
|
||||||
Capybara.current_window.resize_to(639, 479)
|
Capybara.current_window.resize_to(320, 640)
|
||||||
end
|
end
|
||||||
|
|
||||||
config.after(:each, :small_window) do
|
config.after(:each, :small_window) do
|
||||||
|
|||||||
Reference in New Issue
Block a user