Skip to content

Commit

Permalink
Add tests back
Browse files Browse the repository at this point in the history
  • Loading branch information
raymond-hughes committed Aug 29, 2024
1 parent 3040ef5 commit 2149ba9
Showing 1 changed file with 43 additions and 43 deletions.
86 changes: 43 additions & 43 deletions spec/features/backend_error_flows_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,49 +60,49 @@
DownloadHelpers.clear_downloads
end

# context "When VBMS returns an error" do
# before do
# allow(Fakes::VBMSService).to receive(:v2_fetch_documents_for).and_raise(VBMS::ClientError.new("vbms returned an error"))
# allow(Fakes::VVAService).to receive(:v2_fetch_documents_for).and_return(documents)
# end

# scenario "Download with VBMS connection error" do
# perform_enqueued_jobs do
# visit "/"
# fill_in "Search for a Veteran ID number below to get started.", with: veteran_id
# click_button "Search"

# expect(page).to have_css ".usa-alert-heading", text: "We could not complete the search for this Veteran ID"
# expect(page).to have_content Caseflow::DocumentTypes::TYPES[documents[0].type_id]

# click_link "Back to eFolder Express"

# expect(page).to have_current_path("/")
# end
# end
# end

# context "When VVA returns an error" do
# before do
# allow(Fakes::VVAService).to receive(:v2_fetch_documents_for).and_raise(VVA::ClientError.new("vva returned an error"))
# allow(Fakes::VBMSService).to receive(:v2_fetch_documents_for).and_return(documents)
# end

# scenario "Download with VVA connection error" do
# perform_enqueued_jobs do
# visit "/"
# fill_in "Search for a Veteran ID number below to get started.", with: veteran_id
# click_button "Search"

# expect(page).to have_css ".usa-alert-heading", text: "We are having trouble connecting to VVA"
# expect(page).to have_content Caseflow::DocumentTypes::TYPES[documents[0].type_id]

# click_link "Back to eFolder Express"

# expect(page).to have_current_path("/")
# end
# end
# end
context "When VBMS returns an error" do
before do
allow(Fakes::VBMSService).to receive(:v2_fetch_documents_for).and_raise(VBMS::ClientError.new("vbms returned an error"))
allow(Fakes::VVAService).to receive(:v2_fetch_documents_for).and_return(documents)
end

scenario "Download with VBMS connection error" do

Check failure on line 69 in spec/features/backend_error_flows_spec.rb

View workflow job for this annotation

GitHub Actions / rake

Backend Error Flows When VBMS returns an error Download with VBMS connection error Failure/Error: expect(page).to have_content Caseflow::DocumentTypes::TYPES[documents[0].type_id] expected to find text "Fiduciary Appeal - Notice of Disagreement Acceptance Letter" in "Caseflow> eFolder Express First Last We could not complete the search for this Veteran ID Error message: vbms returned an error (Sentry event id: ) Please try again and if you continue to see an error, submit a support ticket. Welcome to eFolder Express eFolder Express allows VA employees to bulk-download VBMS eFolders. Search for a Veteran ID number below to get started. Search Note: eFolder Express now includes Virtual VA documents from the Legacy Content Manager Documents tab in VBMS. Recent downloads... Built with ♡ by the Digital Service at VA Track Caseflow Status|Send feedback"
perform_enqueued_jobs do
visit "/"
fill_in "Search for a Veteran ID number below to get started.", with: veteran_id
click_button "Search"

expect(page).to have_css ".usa-alert-heading", text: "We could not complete the search for this Veteran ID"
expect(page).to have_content Caseflow::DocumentTypes::TYPES[documents[0].type_id]

click_link "Back to eFolder Express"

expect(page).to have_current_path("/")
end
end
end

context "When VVA returns an error" do
before do
allow(Fakes::VVAService).to receive(:v2_fetch_documents_for).and_raise(VVA::ClientError.new("vva returned an error"))
allow(Fakes::VBMSService).to receive(:v2_fetch_documents_for).and_return(documents)
end

scenario "Download with VVA connection error" do

Check failure on line 91 in spec/features/backend_error_flows_spec.rb

View workflow job for this annotation

GitHub Actions / rake

Backend Error Flows When VVA returns an error Download with VVA connection error Failure/Error: expect(page).to have_css ".usa-alert-heading", text: "We are having trouble connecting to VVA" expected to find visible css ".usa-alert-heading" with text "We are having trouble connecting to VVA" but there were no matches. Also found "We could not complete the search for this Veteran ID", which matched the selector but not all filters.
perform_enqueued_jobs do
visit "/"
fill_in "Search for a Veteran ID number below to get started.", with: veteran_id
click_button "Search"

expect(page).to have_css ".usa-alert-heading", text: "We are having trouble connecting to VVA"
expect(page).to have_content Caseflow::DocumentTypes::TYPES[documents[0].type_id]

click_link "Back to eFolder Express"

expect(page).to have_current_path("/")
end
end
end

context "When at least one document fails" do
before do
Expand Down

0 comments on commit 2149ba9

Please sign in to comment.