f0391c2517
Using the sed script from https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
19 lines
356 B
Ruby
19 lines
356 B
Ruby
# frozen_string_literal: true
|
|
|
|
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
|