gitlab-org--gitlab-foss/spec/support/helpers/mobile_helpers.rb
Lin Jen-Shin 65a7a20ae9 Try to reduce testing view port and unify it
Hoping that we don't hit into

    Selenium::WebDriver::Error::NoSuchDriverError:
      invalid session id

Again.
2019-05-07 01:06:15 +08:00

17 lines
325 B
Ruby

module MobileHelpers
def resize_screen_xs
resize_window(575, 768)
end
def resize_screen_sm
resize_window(767, 768)
end
def restore_window_size
resize_window(*CAPYBARA_WINDOW_SIZE)
end
def resize_window(width, height)
Capybara.current_session.current_window.resize_to(width, height)
end
end