diff options
Diffstat (limited to 'qa/qa/mobile/page/sub_menus/common.rb')
-rw-r--r-- | qa/qa/mobile/page/sub_menus/common.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/qa/qa/mobile/page/sub_menus/common.rb b/qa/qa/mobile/page/sub_menus/common.rb new file mode 100644 index 00000000000..6a0477a3f31 --- /dev/null +++ b/qa/qa/mobile/page/sub_menus/common.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +module QA + module Mobile + module Page + module SubMenus + module Common + def open_mobile_nav_sidebar + if has_element?(:project_sidebar, visible: false) + Support::Retrier.retry_until do + click_element(:toggle_mobile_nav_button) + has_element?(:project_sidebar, visible: true) + end + end + end + + def within_sidebar + wait_for_requests + + open_mobile_nav_sidebar + + super + end + end + end + end + end +end |