<commit_before># frozen_string_literal: true

module QA
  context 'Create' do
    describe 'Merge request rebasing' do
      it 'user rebases source branch of merge request' do
        Runtime::Browser.visit(:gitlab, Page::Main::Login)
        Page::Main::Login.perform(&:sign_in_using_credentials)

        project = Resource::Project.fabricate! do |project|
          project.name = "only-fast-forward"
        end
        project.visit!

        Page::Project::Menu.perform(&:click_settings)
        Page::Project::Settings::MergeRequest.perform(&:enable_ff_only)

        merge_request = Resource::MergeRequest.fabricate! do |merge_request|
          merge_request.project = project
          merge_request.title = 'Needs rebasing'
        end

        Resource::Repository::ProjectPush.fabricate! do |push|
          push.project = project
          push.file_name = "other.txt"
          push.file_content = "New file added!"
          push.branch_name = "master"
          push.new_branch = false
        end

        merge_request.visit!

        Page::MergeRequest::Show.perform do |merge_request|
          expect(merge_request).to have_content('Needs rebasing')
          expect(merge_request).not_to be_fast_forward_possible
          expect(merge_request).not_to have_merge_button

          merge_request.rebase!

          expect(merge_request).to have_merge_button
          expect(merge_request).to be_fast_forward_possible
        end
      end
    end
  end
end
<commit_msg>Quarantine failing spec<commit_after># frozen_string_literal: true

module QA
  # Failure issue: https://gitlab.com/gitlab-org/quality/staging/issues/66
  context 'Create', :quarantine do
    describe 'Merge request rebasing' do
      it 'user rebases source branch of merge request' do
        Runtime::Browser.visit(:gitlab, Page::Main::Login)
        Page::Main::Login.perform(&:sign_in_using_credentials)

        project = Resource::Project.fabricate! do |project|
          project.name = "only-fast-forward"
        end
        project.visit!

        Page::Project::Menu.perform(&:click_settings)
        Page::Project::Settings::MergeRequest.perform(&:enable_ff_only)

        merge_request = Resource::MergeRequest.fabricate! do |merge_request|
          merge_request.project = project
          merge_request.title = 'Needs rebasing'
        end

        Resource::Repository::ProjectPush.fabricate! do |push|
          push.project = project
          push.file_name = "other.txt"
          push.file_content = "New file added!"
          push.branch_name = "master"
          push.new_branch = false
        end

        merge_request.visit!

        Page::MergeRequest::Show.perform do |merge_request|
          expect(merge_request).to have_content('Needs rebasing')
          expect(merge_request).not_to be_fast_forward_possible
          expect(merge_request).not_to have_merge_button

          merge_request.rebase!

          expect(merge_request).to have_merge_button
          expect(merge_request).to be_fast_forward_possible
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.09208819714656291, 'fraction_numerical': 0.0006485084306095979, 'mean_word_length': 2.7303506650544134, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '986490', 'n_tokens_mistral': 877, 'n_tokens_neox': 852, 'n_words': 170}