From 39f10047618df226af1abb2083bb66c1ca4a2053 Mon Sep 17 00:00:00 2001 From: Thomas Leese Date: Wed, 22 Nov 2023 09:55:05 +0000 Subject: [PATCH] Show exact number of work history months This changes the heading shown to teachers after they add work history to show the exact number of months rather than a statement saying they've added enough. --- .../teacher_interface/work_histories/add_another.html.erb | 6 ++---- spec/system/teacher_interface/work_history_spec.rb | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/views/teacher_interface/work_histories/add_another.html.erb b/app/views/teacher_interface/work_histories/add_another.html.erb index b5641ad049..cda67709ae 100644 --- a/app/views/teacher_interface/work_histories/add_another.html.erb +++ b/app/views/teacher_interface/work_histories/add_another.html.erb @@ -5,12 +5,10 @@ <%= f.govuk_error_summary %>

- <% if @months_count <= 8 %> - You’ve added <%= pluralize(@months_count, "month") %> of work experience. You need to add at least <%= pluralize(9 - @months_count, "more month") %>. - <% elsif @months_count <= 20 %> + <% if @months_count >= 9 %> You’ve told us about <%= pluralize(@months_count, "month") %> of work experience <% else %> - You’ve added enough work experience + You’ve added <%= pluralize(@months_count, "month") %> of work experience. You need to add at least <%= pluralize(9 - @months_count, "more month") %>. <% end %>

diff --git a/spec/system/teacher_interface/work_history_spec.rb b/spec/system/teacher_interface/work_history_spec.rb index fef49f658a..56de3a1716 100644 --- a/spec/system/teacher_interface/work_history_spec.rb +++ b/spec/system/teacher_interface/work_history_spec.rb @@ -192,7 +192,7 @@ def when_i_click_continue def and_i_see_the_heading_with_the_number_of_months expect(teacher_add_another_work_history_page.heading.text).to eq( - "You’ve added enough work experience", + "You’ve told us about 24 months of work experience", ) end