Browse Source

Changed logic to check last page visited was check answers

pull/740/head
Ted 3 years ago committed by JG
parent
commit
e9d3b3d166
  1. 1
      app/views/form/page.html.erb
  2. 2
      spec/features/form/form_navigation_spec.rb

1
app/views/form/page.html.erb

@ -5,7 +5,6 @@
<% end %>
<div data-controller="govukfrontend"></div>
<%= form_with model: @case_log, url: form_case_log_path(@case_log), method: "post", local: true do |f| %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-<%= @page.questions[0].type == "interruption_screen" ? "full-from-desktop" : "two-thirds-from-desktop" %>">

2
spec/features/form/form_navigation_spec.rb

@ -62,7 +62,7 @@ RSpec.describe "Form Navigation" do
end
it "a question page has a link allowing you to cancel your input and return to the check answers page" do
visit("logs/#{id}/tenant-code-test")
visit("logs/#{id}/tenant-code-test?referrer=check_answers")
click_link(text: "Cancel")
expect(page).to have_current_path("/logs/#{id}/setup/check-answers")
end

Loading…
Cancel
Save