<commit_before>Then /^I cannot sign the petition$/ do
  expect(page).not_to have_css("a", :text => "Sign")
end

When /^I decide to sign the petition$/ do
  visit petition_path(@petition)
  click_link "Sign this petition"
end

When /^I try to sign$/ do
  click_button "Sign this e-petition"
end

Then /^I have not yet signed the petition$/ do
  expect(page).to have_content("Thank you")
  click_link("view")
  expect(page).to have_css("dd.signature_count", :text => "1")
end

When /^I accept the terms and conditions$/ do
  check "I agree"
end

When /^I confirm my email address$/ do
  steps %Q(
    And I open the email
    And I should see "Thank" in the email body
    When I click the first link in the email
    Then I should see "Thank you"
  )
end

When /^the e\-petition recieves enough signatures to achieve 'critical mass'$/ do
  SystemSetting.create!(:key => 'get_an_mp_signature_count', :value => '3')
  4.times { @petition.signatures << FactoryGirl.create(:validated_signature) }
  Petition.update_all_signature_counts
  Petition.email_all_who_passed_finding_mp_threshold
end

def should_be_signature_count_of(count)
  Petition.update_all_signature_counts
  visit petition_path(@petition)
  expect(page).to have_css("dd.signature_count", :text => count.to_s)
end<commit_msg>When signing a petition "Thank you" is in the ``<title>``<commit_after>Then /^I cannot sign the petition$/ do
  expect(page).not_to have_css("a", :text => "Sign")
end

When /^I decide to sign the petition$/ do
  visit petition_path(@petition)
  click_link "Sign this petition"
end

When /^I try to sign$/ do
  click_button "Sign this e-petition"
end

Then /^I have not yet signed the petition$/ do
  expect(page).to have_title("Thank you")
  click_link("view")
  expect(page).to have_css("dd.signature_count", :text => "1")
end

When /^I accept the terms and conditions$/ do
  check "I agree"
end

When /^I confirm my email address$/ do
  steps %Q(
    And I open the email
    And I should see "Thank" in the email body
    When I click the first link in the email
    Then I should see "Thank you"
  )
end

When /^the e\-petition recieves enough signatures to achieve 'critical mass'$/ do
  SystemSetting.create!(:key => 'get_an_mp_signature_count', :value => '3')
  4.times { @petition.signatures << FactoryGirl.create(:validated_signature) }
  Petition.update_all_signature_counts
  Petition.email_all_who_passed_finding_mp_threshold
end

def should_be_signature_count_of(count)
  Petition.update_all_signature_counts
  visit petition_path(@petition)
  expect(page).to have_css("dd.signature_count", :text => count.to_s)
end
{'fraction_non_alphanumeric': 0.10788064269319052, 'fraction_numerical': 0.0022953328232593728, 'mean_word_length': 4.47071129707113, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 14, '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': '6976997', 'n_tokens_mistral': 882, 'n_tokens_neox': 841, 'n_words': 286}