From 82083707350cc115885def9e32ade120c6a802e8 Mon Sep 17 00:00:00 2001 From: moveson Date: Thu, 19 Dec 2024 08:34:15 -0700 Subject: [PATCH] Spec for uploading, downloading, and removing completed service form --- app/controllers/application_controller.rb | 2 +- .../_service_form_status_card.html.erb | 8 +- service_form.pdf | Bin 0 -> 18666 bytes spec/fixtures/files/service_form.pdf | Bin 0 -> 18666 bytes spec/support/basic_configure.rb | 4 + spec/system/lotteries/manage_service_spec.rb | 133 +++++++++++++----- .../lotteries/visit_manage_service_spec.rb | 63 +++++++++ 7 files changed, 166 insertions(+), 44 deletions(-) create mode 100644 service_form.pdf create mode 100644 spec/fixtures/files/service_form.pdf create mode 100644 spec/system/lotteries/visit_manage_service_spec.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index cc9b37261..6e54b6eb0 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -117,7 +117,7 @@ def user_not_authorized end def set_current_url_options - ::ActiveStorage::Current.url_options = { host: OstConfig.full_uri } if Rails.env.development? + ::ActiveStorage::Current.url_options = { host: OstConfig.full_uri } if Rails.env.development? || Rails.env.test? end def set_current_user diff --git a/app/views/lotteries/entrant_service_details/_service_form_status_card.html.erb b/app/views/lotteries/entrant_service_details/_service_form_status_card.html.erb index 208d9f1af..7dae276a2 100644 --- a/app/views/lotteries/entrant_service_details/_service_form_status_card.html.erb +++ b/app/views/lotteries/entrant_service_details/_service_form_status_card.html.erb @@ -25,13 +25,13 @@ <% if presenter.rejected? %> <%= fa_icon("circle-xmark", type: :solid, class: "text-danger") %> Rejected - <%= l(presenter.service_form_rejected_at) %> - <%= presenter.service_form_rejected_comments %> + <%= l(presenter.form_rejected_at) %> + <%= presenter.form_rejected_comments %> <% elsif presenter.accepted? %> <%= fa_icon("circle-check", type: :solid, class: "text-success") %> Accepted - <%= l(presenter.service_form_accepted_at) %> - <%= presenter.service_form_accepted_comments %> + <%= l(presenter.form_accepted_at) %> + <%= presenter.form_accepted_comments %> <% elsif presenter.completed_form.attached? %> <%= fa_icon("file-magnifying-glass", type: :solid, class: "text-secondary") %> Under review diff --git a/service_form.pdf b/service_form.pdf new file mode 100644 index 0000000000000000000000000000000000000000..481eb12155b8668a34519b4e7e3f0196464d8008 GIT binary patch literal 18666 zcmaHS1CZ$6^5)p~+_7!jHtyKAXYSaxZQHhO+qR9pzxUpM-_~x`rcRPhr%!jfbH1-m zk`^jUDjGl`PHm>Hd1aw`O2s!WXl(HT~N~*w)YyU(wjc$k@Tyfr6J8>aX~Z zPp1F+Hq^&wfT9zW!Kah`>r&t9zeX(oH4-(qa{3#DPSi@@$ynIf(ALNpicZ?t#?;9S zpN*c8mlxmB$-!9P8p<{ENNvgjn*pYKM(GuFU#;F~Ox|7G%t1Dd%`AgIFQoVe{%P_X zNkwg28m?$9mYOx0Z!CvbJves#1Z*9z45Rxi-CIt<6^G~3HUJ@cW@V)IgdRTG=9$ z__u%q?1RB2n1gVfwEDm&kEbNX#0mXRCb0>1lbsEi3v%H_ps1cNv3usOgI1oe=dT_0 zcg8=ps9_L=hrP+F5iH?$5`iOCb}gudqmtxKf>BGLgeA?5%a^_KFfcBju35RI=}>oT z!d=+x?Ybiy(^|ggYls+e+qPTI@s37W!0mRA#hG44(rLWi}b-yHJQgO-K5}YA$}7A*A<}cbpfs`qc!-a>WrHKb*e5o*dVP_`UlV# zr;s+|4z=&53o@#rgdC=8G+?r2<(gM{ED@EV@mWps{wC^AEkl#rlpc<%&^W1|7uiy* zE2?rGq=J`9EW*pu+!i0J3q43Av?&vpuRrNOr2>~;|AnZ^fdQYXoj@bGR?JDrDo=)8 z=6GfRgRQw+G#{c9X}!f(z~>!wDNZ(_@A@T zf6fxxP;?@$PGU+x!>Q z|5wS%z=+Sr!T8sW&|hm~8z)Ene^9CjMW^KC;B4q5ukY|LB|Q|Kvc7>MKAqBEiujif zpY=a+{*%~0m;b{q|2r|qfBZWCeT=`1AZ2dkh_Cri{)*cFyPJ@{lfIR$=|5pi z|CZxlQK0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9}9_aD~<|-%W)vG2o*B`suT3J&+=f>ox zA>Fa>J5^NIyw)ynyj#>GGMBqwsH~Q>wdED0^j+Wgk!=4T%KM$yt5eEecD)E;J)HO> zOzJGYtDv}}#Xi)&Ug4RLSQcG=;oPeO!H2hR>$#Y;B&*BZ-d*uL`{DLyJ0Gpcw#(1- zD@uPf+vW1R_Foj{#V&5yov|V#^3ut>d3_I0H(YJHcBnbu+b2+2u+ULnX$=r$mub0m zhG#*~kJVi{xa{I-S$f|t$5$QFT^9Q;X-dwUt&U(>CSW}DmvMG9 zG5#*3h=ej4Ye$M0=v?D5o&g<@q5Vt-6|^t|)+JJCHbZ2f!N}v|p;O`rL6^kMWGGrj WlgeNkh!x4xjM!%JV(%ayn|}bZaIO{r literal 0 HcmV?d00001 diff --git a/spec/fixtures/files/service_form.pdf b/spec/fixtures/files/service_form.pdf new file mode 100644 index 0000000000000000000000000000000000000000..481eb12155b8668a34519b4e7e3f0196464d8008 GIT binary patch literal 18666 zcmaHS1CZ$6^5)p~+_7!jHtyKAXYSaxZQHhO+qR9pzxUpM-_~x`rcRPhr%!jfbH1-m zk`^jUDjGl`PHm>Hd1aw`O2s!WXl(HT~N~*w)YyU(wjc$k@Tyfr6J8>aX~Z zPp1F+Hq^&wfT9zW!Kah`>r&t9zeX(oH4-(qa{3#DPSi@@$ynIf(ALNpicZ?t#?;9S zpN*c8mlxmB$-!9P8p<{ENNvgjn*pYKM(GuFU#;F~Ox|7G%t1Dd%`AgIFQoVe{%P_X zNkwg28m?$9mYOx0Z!CvbJves#1Z*9z45Rxi-CIt<6^G~3HUJ@cW@V)IgdRTG=9$ z__u%q?1RB2n1gVfwEDm&kEbNX#0mXRCb0>1lbsEi3v%H_ps1cNv3usOgI1oe=dT_0 zcg8=ps9_L=hrP+F5iH?$5`iOCb}gudqmtxKf>BGLgeA?5%a^_KFfcBju35RI=}>oT z!d=+x?Ybiy(^|ggYls+e+qPTI@s37W!0mRA#hG44(rLWi}b-yHJQgO-K5}YA$}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b*WW{BRO9)HZYvTZOap9wPpKESz+t1n8>v@t{O3}yl`1_b z5k!Ia8q=l$Sh2|nu1j^%@mP95u8z@w{=p{XA_18YHRy{389+Kjql-cCH8;2nKt+OH zuT{t4AQD)kU=0>0P>NV043Q$x3=oNgJPjcWLo|n!9LEX8Vv59K zB)||NJ}@(C8A~FTK_d%U7Pc8O4nrJ|I5A>bPDrv8%|MD^+tI%{5J^DP@JT$}j;CoM z0SO|*5KkgFa%4FVyVIklN4qd$76$qAT7y^uyF8S(Q5r4(Cq+Ps#|ROG9k?8Oo|xg? z`)YS+=~r!*gK1=~?!EAC$=$7K3->A{0^88=7f;@Aq+DS%ZG3ZTQg$sf~xBUiRYe6Ti9}9_aD~<|-%W)vG2o*B`suT3J&+=f>ox zA>Fa>J5^NIyw)ynyj#>GGMBqwsH~Q>wdED0^j+Wgk!=4T%KM$yt5eEecD)E;J)HO> zOzJGYtDv}}#Xi)&Ug4RLSQcG=;oPeO!H2hR>$#Y;B&*BZ-d*uL`{DLyJ0Gpcw#(1- zD@uPf+vW1R_Foj{#V&5yov|V#^3ut>d3_I0H(YJHcBnbu+b2+2u+ULnX$=r$mub0m zhG#*~kJVi{xa{I-S$f|t$5$QFT^9Q;X-dwUt&U(>CSW}DmvMG9 zG5#*3h=ej4Ye$M0=v?D5o&g<@q5Vt-6|^t|)+JJCHbZ2f!N}v|p;O`rL6^kMWGGrj WlgeNkh!x4xjM!%JV(%ayn|}bZaIO{r literal 0 HcmV?d00001 diff --git a/spec/support/basic_configure.rb b/spec/support/basic_configure.rb index 6cd37aca6..6556966e9 100644 --- a/spec/support/basic_configure.rb +++ b/spec/support/basic_configure.rb @@ -10,5 +10,9 @@ config.before(:each, type: :system, js: true) do driven_by :chrome_headless # driven_by :chrome_visible + + download_path = Rails.root.join("tmp/downloads") + page.driver.browser.download_path = download_path + FileUtils.mkdir_p(download_path) end end diff --git a/spec/system/lotteries/manage_service_spec.rb b/spec/system/lotteries/manage_service_spec.rb index d1bea2e7e..bb80d4f05 100644 --- a/spec/system/lotteries/manage_service_spec.rb +++ b/spec/system/lotteries/manage_service_spec.rb @@ -3,61 +3,116 @@ require "rails_helper" RSpec.describe "manage lottery service", js: true do - let(:admin) { users(:admin_user) } - let(:steward) { users(:fifth_user) } let(:user) { users(:fourth_user) } - before do - organization.stewards << steward - end - let(:lottery) { lotteries(:lottery_with_tickets_and_draws) } let(:organization) { lottery.organization } let(:entrant) { lottery_entrants(:lottery_entrant_0004) } - let(:person) { people(:bruno_fadel) } - - before { lottery.update(status: :finished) } + let(:download_path) { Rails.root.join("tmp/downloads") } - scenario "user who is an admin" do - login_as admin, scope: :user - visit_page - - expect(page).to have_current_path(organization_lottery_entrant_service_detail_path(organization, lottery, entrant)) + before do + entrant.update!(email: user.email) + lottery.update(status: :finished) end - scenario "user who is a steward" do - login_as steward, scope: :user - visit_page + context "service form not available" do + scenario "user visits the page" do + login_as user, scope: :user + visit_page - expect(page).to have_current_path(organization_lottery_entrant_service_detail_path(organization, lottery, entrant)) + expect(page).to have_current_path(page_path) + expect(page).to have_text("not yet available for download") + end end - scenario "user who has the same email as the entrant" do - entrant.update!(email: user.email) - login_as user, scope: :user - visit_page - - expect(page).to have_current_path(organization_lottery_entrant_service_detail_path(organization, lottery, entrant)) + context "service form is available" do + before do + lottery.service_form.attach( + io: File.open(file_fixture("service_form.pdf")), + filename: "service_form.pdf", + content_type: "application/pdf" + ) + end + + scenario "user downloads the service form" do + login_as user, scope: :user + visit_page + + expect(page).to have_current_path(page_path) + expect(page).to have_text("Download a blank service form") + + click_link "Download" + downloaded_file = download_path.join("service_form.pdf") + expect(File.exist?(downloaded_file)).to be true + + expect(page).to have_current_path(page_path) + end + + scenario "user uploads a completed service form pdf" do + login_as user, scope: :user + visit_page + + expect(page).to have_current_path(page_path) + attach_file_and_validate + expect(page).to have_current_path(page_path) + expect(page).to have_text("Under review") + end + + context "completed form is attached and has been rejected" do + before do + entrant.create_service_detail + entrant.service_detail.completed_form.attach( + io: File.open(file_fixture("potato3.jpg")), + filename: "potato3.jpg", + content_type: "image/jpeg" + ) + end + + context "and has been accepted" do + before { entrant.service_detail.update(form_accepted_at: Time.zone.now, form_accepted_comments: "Thank you for your service") } + + scenario "user sees feedback" do + login_as user, scope: :user + visit_page + + expect(page).to have_current_path(page_path) + expect(page).to have_text "Accepted" + expect(page).to have_text "Thank you for your service" + end + end + + context "and has been rejected" do + before { entrant.service_detail.update(form_rejected_at: Time.zone.now, form_rejected_comments: "This is a potato") } + + scenario "user sees feedback and removes the form" do + login_as user, scope: :user + visit_page + + expect(page).to have_current_path(page_path) + expect(page).to have_text "Rejected" + expect(page).to have_text "This is a potato" + + click_button "Remove" + expect(page).to have_current_path(page_path) + expect(page).to have_text "Not received" + expect(page).not_to have_text "This is a potato" + end + end + end end - scenario "user who has the same person" do - entrant.update!(person: person) - person.update!(claimant: user) - login_as user, scope: :user - visit_page - - expect(page).to have_current_path(organization_lottery_entrant_service_detail_path(organization, lottery, entrant)) + def visit_page + visit page_path end - scenario "user who is not associated" do - login_as user, scope: :user - visit_page - - expect(page).to have_current_path(root_path) - expect(page).to have_text("Access denied") + def page_path + organization_lottery_entrant_service_detail_path(organization, lottery, entrant) end - def visit_page - visit organization_lottery_entrant_service_detail_path(organization, lottery, entrant) + def attach_file_and_validate + find(".dropzone").drop(file_fixture("potato3.jpg")) + click_button "Attach" + sleep 1 + expect(entrant.service_detail.completed_form.attached?).to eq(true) end end diff --git a/spec/system/lotteries/visit_manage_service_spec.rb b/spec/system/lotteries/visit_manage_service_spec.rb new file mode 100644 index 000000000..6cd7f780a --- /dev/null +++ b/spec/system/lotteries/visit_manage_service_spec.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +require "rails_helper" + +RSpec.describe "visit the manage service view", js: true do + let(:admin) { users(:admin_user) } + let(:steward) { users(:fifth_user) } + let(:user) { users(:fourth_user) } + + before do + organization.stewards << steward + end + + let(:lottery) { lotteries(:lottery_with_tickets_and_draws) } + let(:organization) { lottery.organization } + let(:entrant) { lottery_entrants(:lottery_entrant_0004) } + let(:person) { people(:bruno_fadel) } + + before { lottery.update(status: :finished) } + + scenario "user who is an admin" do + login_as admin, scope: :user + visit_page + + expect(page).to have_current_path(organization_lottery_entrant_service_detail_path(organization, lottery, entrant)) + end + + scenario "user who is a steward" do + login_as steward, scope: :user + visit_page + + expect(page).to have_current_path(organization_lottery_entrant_service_detail_path(organization, lottery, entrant)) + end + + scenario "user who has the same email as the entrant" do + entrant.update!(email: user.email) + login_as user, scope: :user + visit_page + + expect(page).to have_current_path(organization_lottery_entrant_service_detail_path(organization, lottery, entrant)) + end + + scenario "user who has the same person" do + entrant.update!(person: person) + person.update!(claimant: user) + login_as user, scope: :user + visit_page + + expect(page).to have_current_path(organization_lottery_entrant_service_detail_path(organization, lottery, entrant)) + end + + scenario "user who is not associated" do + login_as user, scope: :user + visit_page + + expect(page).to have_current_path(root_path) + expect(page).to have_text("Access denied") + end + + def visit_page + visit organization_lottery_entrant_service_detail_path(organization, lottery, entrant) + end +end