mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-12 03:50:22 +00:00
Adapt large browser window as default
We were really close to that anyway. It simplifies the code a bit.
This commit is contained in:
@@ -10,14 +10,10 @@ module UIComponentHelper
|
||||
end
|
||||
|
||||
def browse_as_default(&block)
|
||||
browse_with_window_size(1200, 800)
|
||||
browse_with_window_size(1280, 800)
|
||||
block&.call
|
||||
end
|
||||
|
||||
def browse_as_large(&block)
|
||||
browse_with_window_size(1280, 800, &block)
|
||||
end
|
||||
|
||||
def browse_with_window_size(width, height, &block)
|
||||
Capybara.current_session.current_window
|
||||
.resize_to(width, height)
|
||||
|
||||
Reference in New Issue
Block a user