Browse Source

Update warning text

CLDC-3465-hard-validation-updates
Kat 8 months ago
parent
commit
384e32569d
  1. 2
      app/views/check_errors/confirm_clear_answer.html.erb
  2. 4
      spec/requests/check_errors_controller_spec.rb

2
app/views/check_errors/confirm_clear_answer.html.erb

@ -8,7 +8,7 @@
<%= content_for(:title) %> <%= content_for(:title) %>
</h1> </h1>
<%= govuk_warning_text(text: "This action is permanent") %> <%= govuk_warning_text(text: "Dependent answers related to this question may also get cleared. You will not be able to undo this action") %>
<%= form_with model: @log, url: send("#{@log.model_name.param_key}_#{@page.id}_path", @log), method: "post", local: true do |f| %> <%= form_with model: @log, url: send("#{@log.model_name.param_key}_#{@page.id}_path", @log), method: "post", local: true do |f| %>
<% @related_question_ids.each do |id| %> <% @related_question_ids.each do |id| %>

4
spec/requests/check_errors_controller_spec.rb

@ -145,7 +145,7 @@ RSpec.describe CheckErrorsController, type: :request do
it "displays correct clear links" do it "displays correct clear links" do
expect(page).to have_content("Are you sure you want to clear Number of household members?") expect(page).to have_content("Are you sure you want to clear Number of household members?")
expect(page).to have_content("This action is permanent") expect(page).to have_content("Dependent answers related to this question may also get cleared. You will not be able to undo this action")
expect(page).to have_link("Cancel") expect(page).to have_link("Cancel")
expect(page).to have_button("Confirm and continue") expect(page).to have_button("Confirm and continue")
end end
@ -172,7 +172,7 @@ RSpec.describe CheckErrorsController, type: :request do
it "displays correct clear links" do it "displays correct clear links" do
expect(page).to have_content("Are you sure you want to clear Buyer 1’s gross annual income?") expect(page).to have_content("Are you sure you want to clear Buyer 1’s gross annual income?")
expect(page).to have_content("This action is permanent") expect(page).to have_content("Dependent answers related to this question may also get cleared. You will not be able to undo this action")
expect(page).to have_link("Cancel") expect(page).to have_link("Cancel")
expect(page).to have_button("Confirm and continue") expect(page).to have_button("Confirm and continue")
end end

Loading…
Cancel
Save