debian-mirror-gitlab/spec/support/helpers/mobile_helpers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
356 B
Ruby
Raw Permalink Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
module MobileHelpers
def resize_screen_xs
2018-11-08 19:23:39 +05:30
resize_window(575, 768)
2017-08-17 22:00:37 +05:30
end
def resize_screen_sm
2018-11-08 19:23:39 +05:30
resize_window(767, 768)
2017-08-17 22:00:37 +05:30
end
def restore_window_size
2019-07-31 22:56:46 +05:30
resize_window(*CAPYBARA_WINDOW_SIZE)
2017-08-17 22:00:37 +05:30
end
def resize_window(width, height)
2018-03-17 18:26:18 +05:30
Capybara.current_session.current_window.resize_to(width, height)
2017-08-17 22:00:37 +05:30
end
end