Welcome to mirror list, hosted at ThFree Co, Russian Federation.

common.rb « sub_menus « page « mobile « qa « qa - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ef2815ca777c358eb283b9feefbad93e50a3c94b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# frozen_string_literal: true

module QA
  module Mobile
    module Page
      module SubMenus
        module Common
          def open_mobile_nav_sidebar
            unless has_css?('.sidebar-expanded-mobile')
              Support::Retrier.retry_until do
                click_element('toggle-mobile-nav-button')
                has_css?('.sidebar-expanded-mobile')
              end
            end
          end

          def within_sidebar
            wait_for_requests

            open_mobile_nav_sidebar

            super
          end
        end
      end
    end
  end
end