From 7bdcf5c54a456be9a43101782c1c1e002978e878 Mon Sep 17 00:00:00 2001 From: Shujat Khalid Date: Mon, 16 Oct 2023 04:13:11 +0100 Subject: [PATCH] Fixed failing tests and made suggested changes Made changes following product review --- .../further_information_requests/preview.html.erb | 11 ++++------- config/locales/assessor_interface.en.yml | 2 +- .../requesting_further_information_spec.rb | 4 +--- .../teacher_interface/further_information_spec.rb | 6 ++---- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/app/views/assessor_interface/further_information_requests/preview.html.erb b/app/views/assessor_interface/further_information_requests/preview.html.erb index e935397c39..e060c2741a 100644 --- a/app/views/assessor_interface/further_information_requests/preview.html.erb +++ b/app/views/assessor_interface/further_information_requests/preview.html.erb @@ -15,15 +15,15 @@

Reason for request

<% if items.size == 1 %> -

We were unable to verify the details for <%= items.first.work_history.school_name %>

- <% elsif items.size > 1 %> +

We were unable to verify the details for <%= items.first.work_history.school_name %>.

+ <% else %>

We were unable to verify the details for:

- <%end%> + <% end %>

Note to applicant

<%= govuk_inset_text do %> @@ -33,7 +33,7 @@ <% else %> <% items.each do |item| %>
-

<%= t(item.failure_reason_key, scope: %i[assessor_interface assessment_sections failure_reasons as_statement]) %>

+

<%= t(item.failure_reason_key, scope: %i[assessor_interface assessment_sections failure_reasons as_statement]) %>

Note to applicant

@@ -45,9 +45,6 @@ <% end %> <% end %> -

Send the further information request email

-

On the next screen, you’ll see a preview of the email.

-
<%= govuk_button_link_to "Continue", new_assessor_interface_application_form_assessment_further_information_request_path(@application_form, @assessment) %> <%= govuk_button_link_to "Back to overview", assessor_interface_application_form_path(@application_form), secondary: true %> diff --git a/config/locales/assessor_interface.en.yml b/config/locales/assessor_interface.en.yml index 5635c46e7d..60924ebd50 100644 --- a/config/locales/assessor_interface.en.yml +++ b/config/locales/assessor_interface.en.yml @@ -198,7 +198,7 @@ en: registration_number: We could not find the applicant’s reference number, or the number was in the wrong format. The applicant will need to supply the number again. registration_number_alternative: We could not find the applicant’s reference number. The applicant will need to upload written proof of recognition as a teacher instead. satisfactory_evidence_work_history: The information provided on work history is not sufficient to award QTS. - school_details_cannot_be_verified: We could not verify the details of one of the schools that the applicant has entered. + school_details_cannot_be_verified: We could not verify school details entered by the applicant. teaching_certificate_illegible: The teaching qualification certificate (or translation) is illegible or in a format that we cannot accept. teaching_hours_not_fulfilled: The required teaching hours have not been fulfilled. teaching_qualification: We were not provided with sufficient evidence to confirm the teaching qualification entered on the online application form. diff --git a/spec/system/assessor_interface/requesting_further_information_spec.rb b/spec/system/assessor_interface/requesting_further_information_spec.rb index 03bde869da..92a8c1dcae 100644 --- a/spec/system/assessor_interface/requesting_further_information_spec.rb +++ b/spec/system/assessor_interface/requesting_further_information_spec.rb @@ -75,9 +75,7 @@ def when_i_select_request_further_information def and_i_see_the_further_information_request_items expect(assessor_request_further_information_page.items.count).to eq(1) - expect( - assessor_request_further_information_page.items.first.heading.text, - ).to eq( + expect(assessor_request_further_information_page).to have_content( "Subjects entered are acceptable for QTS, but the uploaded qualifications do not match them.", ) expect( diff --git a/spec/system/teacher_interface/further_information_spec.rb b/spec/system/teacher_interface/further_information_spec.rb index c34a9a0293..4292ab2ad4 100644 --- a/spec/system/teacher_interface/further_information_spec.rb +++ b/spec/system/teacher_interface/further_information_spec.rb @@ -159,9 +159,7 @@ def and_i_see_the_check_your_answers_items expect(rows.first.key.text).to eq( "Tell us more about the subjects you can teach", ) - expect(rows.second.key.text).to eq( - "Add your work history contact’s details", - ) + expect(rows.second.key.text).to eq("Add work history details") expect(rows.last.key.text).to eq("Upload your identity document") end @@ -233,7 +231,7 @@ def text_check_answers_item def work_history_task_list_item teacher_further_information_requested_page.task_list.find_item( - "Add your work history contact’s details", + "Add work history details", ) end