Skip to content

Commit

Permalink
Made latest download link test more robust (#1125)
Browse files Browse the repository at this point in the history
  • Loading branch information
kelynch authored Dec 12, 2024
1 parent 7a2f7b4 commit 20bc097
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/system/project_show_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,15 @@
context "when downloads exist" do
before do
FileInventoryRequest.create!(user_id: sponsor_user.id, project_id: project.id, job_id: 123, state: UserRequest::COMPLETED,
request_details: { project_title: project.title }, completion_time: 1.day.ago)
request_details: { project_title: project.title }, completion_time: 5.days.ago)
FileInventoryRequest.create!(user_id: sponsor_user.id, project_id: project.id, job_id: 456, state: UserRequest::COMPLETED,
request_details: { project_title: project.title }, completion_time: 2.days.ago)
end
it "includes a link to the latest download in the download modal" do
sign_in sponsor_user
visit "/projects/#{project.id}/contents"
click_on("Download Complete List")
expect(page).to have_content("Download latest")
expect(page).to have_content("Download latest report - generated 2 days ago")
end
end
end
Expand Down

0 comments on commit 20bc097

Please sign in to comment.