<commit_before>step 'I attach 3 photos' do
  photos = Rails.root.join("spec", "support", "fixtures")
  find(".new_photo").set(photos + "1.jpg")
  find(".new_photo").set(photos + "2.jpg")
  find(".new_photo").set(photos + "3.jpg")
  click_button("Save")
end

step 'I should see the three photos in the carousel' do
  expect(page).to have_css("#project-gallery img[src*='1.jpg']")
  expect(page).to have_css("#project-gallery img[src*='2.jpg']")
  expect(page).to have_css("#project-gallery img[src*='3.jpg']")
end

step 'I set the last image to be first' do
  photo_ids = @project.photos.map(&:id)
  # the input is hidden, but it's easier to set it than to deal with drag/drop
  find("#project_photo_order", visible: false).set([photo_ids[2], photo_ids[0], photo_ids[1]].join(" "))
  click_button("Save")
end

step 'I should see that last image when I load the page' do
  expect(page).to have_css(".project-gallery img[src*='3.jpg']:not(.faded)")
end<commit_msg>Fix spec to use correct capitalization of image fixtures<commit_after>step 'I attach 3 photos' do
  photos = Rails.root.join("spec", "support", "fixtures")
  find(".new_photo").set(photos + "1.JPG")
  find(".new_photo").set(photos + "2.JPG")
  find(".new_photo").set(photos + "3.JPG")
  click_button("Save")
end

step 'I should see the three photos in the carousel' do
  expect(page).to have_css("#project-gallery img[src*='1.JPG']")
  expect(page).to have_css("#project-gallery img[src*='2.JPG']")
  expect(page).to have_css("#project-gallery img[src*='3.JPG']")
end

step 'I set the last image to be first' do
  photo_ids = @project.photos.map(&:id)
  # the input is hidden, but it's easier to set it than to deal with drag/drop
  find("#project_photo_order", visible: false).set([photo_ids[2], photo_ids[0], photo_ids[1]].join(" "))
  click_button("Save")
end

step 'I should see that last image when I load the page' do
  expect(page).to have_css(".project-gallery img[src*='3.JPG']:not(.faded)")
end
{'fraction_non_alphanumeric': 0.17608142493638676, 'fraction_numerical': 0.011195928753180661, 'mean_word_length': 5.163009404388715, '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': '3304722', 'n_tokens_mistral': 714, 'n_tokens_neox': 688, 'n_words': 187}