<commit_before>When(/^I attempt to register$/) do
  sign_up_page.load(locale: 'en')
end

When(/^I register$/) do
  sign_up_page.load(locale: 'en')
  sign_up_page.first_name.set 'phil'
  sign_up_page.email.set '<EMAIL>'
  sign_up_page.password.set 'password'
  sign_up_page.post_code.set 'NE1 6EE'
  sign_up_page.opt_in_for_research.set true
  sign_up_page.contact_number '03005005000'
  sign_up_page.submit.click
end

When(/^I register from a direct link$/) do
  step 'I register'
end

Then(/^My MAS account should (not )?be created$/) do |negated|
  if negated
    expect(User.count).to eql(0)
  else
    expect(User.where(email: '<EMAIL>')
                .where(first_name: 'phil')
                .where(post_code: 'NE1 6EE')
                .where(newsletter_subscription: false)
                .count).to eql(1)
  end
end
<commit_msg>Fix minor bug in registration steps highlighted by newer version of capybara<commit_after>When(/^I attempt to register$/) do
  sign_up_page.load(locale: 'en')
end

When(/^I register$/) do
  sign_up_page.load(locale: 'en')
  sign_up_page.first_name.set 'phil'
  sign_up_page.email.set '<EMAIL>'
  sign_up_page.password.set 'password'
  sign_up_page.post_code.set 'NE1 6EE'
  sign_up_page.opt_in_for_research.set true
  sign_up_page.contact_number.set '03005005000'
  sign_up_page.submit.click
end

When(/^I register from a direct link$/) do
  step 'I register'
end

Then(/^My MAS account should (not )?be created$/) do |negated|
  if negated
    expect(User.count).to eql(0)
  else
    expect(User.where(email: '<EMAIL>')
                .where(first_name: 'phil')
                .where(post_code: 'NE1 6EE')
                .where(newsletter_subscription: false)
                .count).to eql(1)
  end
end

{'fraction_non_alphanumeric': 0.12292738707833048, 'fraction_numerical': 0.019439679817038306, 'mean_word_length': 3.2787286063569683, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6952529', 'n_tokens_mistral': 670, 'n_tokens_neox': 641, 'n_words': 143}