<commit_before>module QA
  module Page
    module Group
      class Show < Page::Base
        def go_to_subgroup(name)
          click_link name
        end

        def has_subgroup?(name)
          page.has_link?(name)
        end

        def go_to_new_subgroup
          within '.new-project-subgroup' do
            find('.dropdown-toggle').click
            find("li[data-value='new-subgroup']").click
          end
          find("input[data-action='new-subgroup']").click
        end

        def go_to_new_project
          within '.new-project-subgroup' do
            find('.dropdown-toggle').click
            find("li[data-value='new-project']").click
          end
          find("input[data-action='new-project']").click
        end
      end
    end
  end
end
<commit_msg>Filter by subgroup name before determining if our group has a subgroup<commit_after>module QA
  module Page
    module Group
      class Show < Page::Base
        def go_to_subgroup(name)
          click_link name
        end

        def filter_by_name(name)
          fill_in 'Filter by name...', with: name
        end

        def has_subgroup?(name)
          filter_by_name(name)

          page.has_link?(name)
        end

        def go_to_new_subgroup
          within '.new-project-subgroup' do
            find('.dropdown-toggle').click
            find("li[data-value='new-subgroup']").click
          end
          find("input[data-action='new-subgroup']").click
        end

        def go_to_new_project
          within '.new-project-subgroup' do
            find('.dropdown-toggle').click
            find("li[data-value='new-project']").click
          end
          find("input[data-action='new-project']").click
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.10505394662123793, 'fraction_numerical': 0.0, 'mean_word_length': 1.7660910518053374, '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': '4519769', 'n_tokens_mistral': 508, 'n_tokens_neox': 501, 'n_words': 105}