Skip to content

Commit

Permalink
Don't show progress bar if no current_intake
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Greenberg <jgreenberg@codeforamerica.org>
  • Loading branch information
kayline and jonsgreen committed Jun 23, 2020
1 parent 9689d92 commit b14dfdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/shared/_progress_bar.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% if show_progress? %>
<% if show_progress? && current_intake.present? %>
<div class="progress-indicator">
<div class="progress-indicator__bar" style="width:<%= IntakeProgressCalculator.get_progress(controller.class, current_intake) %>%"></div>
<div class="progress-indicator__percentage"><%= IntakeProgressCalculator.get_progress(controller.class, current_intake) %>%</div>
Expand Down
4 changes: 4 additions & 0 deletions spec/features/web_intake/new_single_filer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,10 @@
expect{ track_progress }.to change { @current_progress }.to(100)
expect(page).to have_text("Your confirmation number is: #{ticket_id}")

# reloading the success page works without trying to show the progress bar
visit "/questions/successfully-submitted"
expect(page).to have_selector("h1", text: "Success! Your tax information has been submitted.")

# going back to another page after submit redirects to beginning
visit "/questions/wages"
expect(page).to have_selector("h1", text: "Welcome! How can we help you?")
Expand Down

0 comments on commit b14dfdb

Please sign in to comment.