mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Add some helpers to test mobile views
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module UIComponentHelper
|
||||
def browser_as_small
|
||||
Capybara.current_session.current_window
|
||||
.resize_to(640, 480)
|
||||
end
|
||||
|
||||
def browse_as_medium
|
||||
Capybara.current_session.current_window
|
||||
.resize_to(1024, 768)
|
||||
end
|
||||
|
||||
def browse_as_default
|
||||
Capybara.current_session.current_window
|
||||
.resize_to(1200, 800)
|
||||
end
|
||||
|
||||
def browse_as_large
|
||||
Capybara.current_session.current_window
|
||||
.resize_to(1280, 800)
|
||||
|
||||
Reference in New Issue
Block a user