<commit_before>Then %r/^I should see call for application '([^']*)'(?: with description '([^']*)':)?$/ do |*args|
  name, description, table = args
  check_details '.call-details', name, description, table
end

def check_personal_details(container_selector, person_attributes)
  check_that_contains_values container_selector, person_attributes[:first_name], person_attributes[:last_name],
    person_attributes[:phone], person_attributes[:email]
end

Then %r/^I should see my own name, phone number and email\-address in the application form$/ do
  check_personal_details '.applicant-details', FactoryGirl.attributes_for(:eija)
end

Then %r/^I should see my own name, phone number and email\-address in the confirmation dialog$/ do
  check_personal_details '#application-sent .applicant-details', FactoryGirl.attributes_for(:eija)
end

Then %r/^I should see (\d+) persons in '([^']*)'$/ do |person_count, title|
  all(".organ-members:contains('#{title}') .member-card" ).count().should == person_count.to_i
end

def member(name)
  find ".edit_call .member-card:contains('#{name}')"
end

Then %r/^I set applicant '([^']*)' as '([^']*)'$/ do |name, position|
  member_slot = find ".member-card-empty:contains('#{position.downcase}')"
  member(name).drag_to member_slot
end<commit_msg>Fix step to find the applicant card<commit_after>Then %r/^I should see call for application '([^']*)'(?: with description '([^']*)':)?$/ do |*args|
  name, description, table = args
  check_details '.call-details', name, description, table
end

def check_personal_details(container_selector, person_attributes)
  check_that_contains_values container_selector, person_attributes[:first_name], person_attributes[:last_name],
    person_attributes[:phone], person_attributes[:email]
end

Then %r/^I should see my own name, phone number and email\-address in the application form$/ do
  check_personal_details '.applicant-details', FactoryGirl.attributes_for(:eija)
end

Then %r/^I should see my own name, phone number and email\-address in the confirmation dialog$/ do
  check_personal_details '#application-sent .applicant-details', FactoryGirl.attributes_for(:eija)
end

Then %r/^I should see (\d+) persons in '([^']*)'$/ do |person_count, title|
  all(".organ-members:contains('#{title}') .member-card" ).count().should == person_count.to_i
end

def applicant(name)
  find ".applicants .member-card:contains('#{name}')"
end

Then %r/^I set applicant '([^']*)' as '([^']*)'$/ do |name, position|
  member_slot = find ".member-card-empty:contains('#{position.downcase}')"
  applicant(name).drag_to member_slot
end
{'fraction_non_alphanumeric': 0.15657539529502507, 'fraction_numerical': 0.0, 'mean_word_length': 6.029810298102981, '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': '2351672', 'n_tokens_mistral': 816, 'n_tokens_neox': 794, 'n_words': 219}