<commit_before>require 'spec_helper'

feature 'Toggle Whitespace Changes', js: true, feature: true do
  let(:merge_request) { create(:merge_request) }
  let(:project) { merge_request.source_project }

  before do
    login_as :admin
    visit diffs_namespace_project_merge_request_path(project.namespace, project, merge_request)
  end

  it 'has a button to toggle whitespace changes' do
    expect(page).to have_content "Hide whitespace changes"
  end

  describe 'clicking "Hide whitespace changes" button' do
    it 'toggles the "Hide whitespace changes" button' do
      click_link "Hide whitespace changes"
      expect(page).to have_content "Show whitespace changes"
    end
  end
end<commit_msg>Use variables instead of let<commit_after>require 'spec_helper'

feature 'Toggle Whitespace Changes', js: true, feature: true do
  before do
    login_as :admin
    merge_request = create(:merge_request)
    project = merge_request.source_project
    visit diffs_namespace_project_merge_request_path(project.namespace, project, merge_request)
  end

  it 'has a button to toggle whitespace changes' do
    expect(page).to have_content "Hide whitespace changes"
  end

  describe 'clicking "Hide whitespace changes" button' do
    it 'toggles the "Hide whitespace changes" button' do
      click_link "Hide whitespace changes"
      expect(page).to have_content "Show whitespace changes"
    end
  end
end
{'fraction_non_alphanumeric': 0.06970128022759602, 'fraction_numerical': 0.0, 'mean_word_length': 4.49609375, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4901407', 'n_tokens_mistral': 408, 'n_tokens_neox': 402, 'n_words': 135}