2019-07-25 05:27:42 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-11-14 18:56:52 +00:00
|
|
|
module MobileHelpers
|
2017-04-19 19:10:16 +00:00
|
|
|
def resize_screen_xs
|
2018-04-23 21:40:04 +00:00
|
|
|
resize_window(575, 768)
|
2017-04-19 19:10:16 +00:00
|
|
|
end
|
|
|
|
|
2016-11-14 18:56:52 +00:00
|
|
|
def resize_screen_sm
|
2018-04-23 21:40:04 +00:00
|
|
|
resize_window(767, 768)
|
2016-11-14 18:56:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def restore_window_size
|
2019-04-15 16:19:10 +00:00
|
|
|
resize_window(*CAPYBARA_WINDOW_SIZE)
|
2016-11-14 18:56:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def resize_window(width, height)
|
2017-08-10 05:32:30 +00:00
|
|
|
Capybara.current_session.current_window.resize_to(width, height)
|
2016-11-14 18:56:52 +00:00
|
|
|
end
|
|
|
|
end
|