<commit_before>When(/^I upload an image$/) do 
  attach_file('image', File.join(Rails.root, '/features/upload_Files/nature1.jpg'), :visible => false)
  click_button "Upload"
end

Then(/^I should see the picture "(.*)" for "(.*)"$/) do |image_name, event_name|
  id_num = Event.find_by_name(event_name).id
  puts image_name
  expect(page).to have_xpath("//img[@src=\"/public/assets/#{id_num}/medium/#{image_name}\"]")
end

Then(/^I should not see any pictures for "(.*)"$/) do |event_name|
  id_num = Event.find_by_name(event_name).id
  Dir.foreach("public/assets/#{id_num}/medium") do |item|
    next if item == '.' or item == '..'
    expect(page).to_not have_xpath("//img[@src=\"/assets/#{id_num}/medium/#{item}.*\"]")
  end
end
<commit_msg>still pending xpath<commit_after>When(/^I upload an image$/) do 
  attach_file('image', File.join(Rails.root, '/features/upload_Files/nature1.jpg'), :visible => false)
  click_button "Upload"
end

Then(/^I should see the picture "(.*)" for "(.*)"$/) do |image_name, event_name|
  pending
  id_num = Event.find_by_name(event_name).id
  puts image_name
  expect(page).to have_xpath("//img[@src=\"/assets/#{id_num}/medium/#{image_name}/^.*$/\"]")
end

Then(/^I should not see any pictures for "(.*)"$/) do |event_name|
  pending
  id_num = Event.find_by_name(event_name).id
  Dir.foreach("public/assets/#{id_num}/medium") do |item|
    next if item == '.' or item == '..'
    expect(page).to_not have_xpath("//img[@src=\"/assets/#{id_num}/medium/#{item}.*\"]")
  end
end

{'fraction_non_alphanumeric': 0.21111846459298478, 'fraction_numerical': 0.0013236267372600927, 'mean_word_length': 4.380782918149467, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '514686', 'n_tokens_mistral': 567, 'n_tokens_neox': 565, 'n_words': 108}