diff --git a/app/views/schemes/check_answers.html.erb b/app/views/schemes/check_answers.html.erb index 82369ea63..e84d49503 100644 --- a/app/views/schemes/check_answers.html.erb +++ b/app/views/schemes/check_answers.html.erb @@ -116,5 +116,6 @@ <%= form_for(@scheme, as: :scheme, method: :patch) do |f| %> <%= f.hidden_field :page, value: "check-answers" %> <%= f.hidden_field :confirmed, value: "true" %> - <%= f.govuk_submit "Create scheme" %> + <% button_label = @scheme.confirmed? ? "Save" : "Create scheme" %> + <%= f.govuk_submit button_label %> <% end %> diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb index 91edcd1a2..0ad1919d6 100644 --- a/spec/features/schemes_spec.rb +++ b/spec/features/schemes_spec.rb @@ -270,6 +270,11 @@ RSpec.describe "Schemes scheme Features" do expect(page.current_url.split("/").last).to eq("check-answers#locations") expect(page).to have_content(location_name) end + + it "has the correct action button text" do + expect(page).to have_button("Save") + expect(page).not_to have_button("Create scheme") + end end end end