<commit_before>module QA
  module Page
    module Main
      class Menu < Page::Base
        def go_to_groups
          within_global_menu { click_link 'Groups' }
        end

        def go_to_projects
          within_global_menu { click_link 'Projects' }
        end

        def go_to_admin_area
          within_user_menu { click_link 'Admin area' }
        end

        def sign_out
          within_user_menu do
            find('.header-user-dropdown-toggle').click
            click_link('Sign out')
          end
        end

        def has_personal_area?
          page.has_selector?('.header-user-dropdown-toggle')
        end

        private

        def within_global_menu
          find('.global-dropdown-toggle').click

          page.within('.global-dropdown-menu') do
            yield
          end
        end

        def within_user_menu
          page.within('.navbar-nav') do
            yield
          end
        end
      end
    end
  end
end
<commit_msg>Fix GitLab QA for new navigation enabled by default<commit_after>module QA
  module Page
    module Main
      class Menu < Page::Base
        def go_to_groups
          within_top_menu { click_link 'Groups' }
        end

        def go_to_projects
          within_top_menu { click_link 'Projects' }
        end

        def go_to_admin_area
          within_top_menu { click_link 'Admin area' }
        end

        def sign_out
          within_user_menu do
            click_link('Sign out')
          end
        end

        def has_personal_area?
          page.has_selector?('.header-user-dropdown-toggle')
        end

        private

        def within_top_menu
          page.within('.navbar') do
            yield
          end
        end

        def within_user_menu
          within_top_menu do
            find('.header-user-dropdown-toggle').click

            page.within('.dropdown-menu-nav') do
              yield
            end
          end
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.06068204613841525, 'fraction_numerical': 0.0, 'mean_word_length': 1.4329268292682926, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5653779', 'n_tokens_mistral': 560, 'n_tokens_neox': 536, 'n_words': 132}