Skip to content

Commit

Permalink
Show exact number of work history months
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thomasleese committed Nov 22, 2023
1 parent adc5834 commit 39f1004
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
<%= f.govuk_error_summary %>

<h1 class="govuk-heading-l">
<% 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 %>
</h1>

Expand Down
2 changes: 1 addition & 1 deletion spec/system/teacher_interface/work_history_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 39f1004

Please sign in to comment.