From ba8e678c1219fa6e8b30d105181be8f247f28cc4 Mon Sep 17 00:00:00 2001 From: MylesJarvis Date: Thu, 11 Apr 2024 09:54:33 +0100 Subject: [PATCH 01/17] Remove all candidate facing links to dashboard --- app/views/candidates/booking_feedbacks/show.html.erb | 3 --- app/views/candidates/feedbacks/show.html.erb | 3 --- app/views/candidates/home/index.html.erb | 12 ------------ .../_show_booking_cancelled_by_candidate.html.erb | 5 ----- .../_show_booking_cancelled_by_school.html.erb | 5 ----- ...placement_request_cancelled_by_candidate.html.erb | 5 ----- .../registrations/placement_requests/show.html.erb | 2 -- 7 files changed, 35 deletions(-) diff --git a/app/views/candidates/booking_feedbacks/show.html.erb b/app/views/candidates/booking_feedbacks/show.html.erb index 885970c376..977a5cebb4 100644 --- a/app/views/candidates/booking_feedbacks/show.html.erb +++ b/app/views/candidates/booking_feedbacks/show.html.erb @@ -10,8 +10,5 @@

View and request more school experience

-

- <%= link_to "Your requests and bookings", candidates_dashboard_path %> -

diff --git a/app/views/candidates/feedbacks/show.html.erb b/app/views/candidates/feedbacks/show.html.erb index 3811ffad10..7c71fe7664 100644 --- a/app/views/candidates/feedbacks/show.html.erb +++ b/app/views/candidates/feedbacks/show.html.erb @@ -10,8 +10,5 @@

View and request more school experience

-

- <%= link_to 'Your requests and bookings', candidates_dashboard_path %> -

diff --git a/app/views/candidates/home/index.html.erb b/app/views/candidates/home/index.html.erb index b009b069f4..71e912bf86 100644 --- a/app/views/candidates/home/index.html.erb +++ b/app/views/candidates/home/index.html.erb @@ -110,18 +110,6 @@ Visit schools to see how teachers plan lessons, manage classrooms and teach subj <% end %> - -

- If you're a candidate -

- - diff --git a/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_candidate.html.erb b/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_candidate.html.erb index c3458e18c1..34cedbfcd1 100644 --- a/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_candidate.html.erb +++ b/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_candidate.html.erb @@ -26,11 +26,6 @@ You can also chat to Get Into Teaching using our <%= chat_service %>

- -

View and request more school experience

-

- <%= link_to 'Your requests and bookings', candidates_dashboard_path %> -

diff --git a/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_school.html.erb b/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_school.html.erb index 55b2985346..d59fd78e57 100644 --- a/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_school.html.erb +++ b/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_school.html.erb @@ -20,10 +20,5 @@

Extra details from the school <%= extra_details %>

- -

View and request more school experience

-

- <%= link_to 'Your requests and bookings', candidates_dashboard_path %> -

diff --git a/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_candidate.html.erb b/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_candidate.html.erb index e48c2f6249..ec4b6b802c 100644 --- a/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_candidate.html.erb +++ b/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_candidate.html.erb @@ -32,10 +32,5 @@ <%= chat_service %> between 8:30am and 5:30pm, Monday to Friday.

- -

- View and request more school experience -

- <%= link_to 'Your requests and bookings', candidates_dashboard_path %> diff --git a/app/views/candidates/registrations/placement_requests/show.html.erb b/app/views/candidates/registrations/placement_requests/show.html.erb index 68b1e39455..3a751aa093 100644 --- a/app/views/candidates/registrations/placement_requests/show.html.erb +++ b/app/views/candidates/registrations/placement_requests/show.html.erb @@ -28,8 +28,6 @@ <%= govuk_link_to 'Search for school experience', new_candidates_school_search_path, class: "govuk-!-margin-bottom-0" %>

- <%= govuk_button_to "Visit your dashboard", candidates_dashboard_path, method: :get, secondary: true %> -

If you're ready to apply for teacher training

From cc6d1956edcfddd6e7b7ba4ff5eb6c9d824486ee Mon Sep 17 00:00:00 2001 From: MylesJarvis Date: Thu, 11 Apr 2024 10:05:03 +0100 Subject: [PATCH 02/17] fix failing test --- spec/features/candidates/api_registrations_spec.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/features/candidates/api_registrations_spec.rb b/spec/features/candidates/api_registrations_spec.rb index d2fe4739a9..aa30be4f6f 100644 --- a/spec/features/candidates/api_registrations_spec.rb +++ b/spec/features/candidates/api_registrations_spec.rb @@ -36,7 +36,6 @@ complete_application_preview_step button_text: 'Continue' complete_email_confirmation_step view_request_acknowledgement_step - visit_candidate_dashboard_step end end From 9735f83539b24935fd2dd6f0cb2934b19640213d Mon Sep 17 00:00:00 2001 From: MylesJarvis Date: Thu, 11 Apr 2024 13:07:37 +0100 Subject: [PATCH 03/17] Remove stray header --- app/views/candidates/booking_feedbacks/show.html.erb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/views/candidates/booking_feedbacks/show.html.erb b/app/views/candidates/booking_feedbacks/show.html.erb index 977a5cebb4..9e75d5118a 100644 --- a/app/views/candidates/booking_feedbacks/show.html.erb +++ b/app/views/candidates/booking_feedbacks/show.html.erb @@ -7,8 +7,6 @@ Thank you for your feedback. -

- View and request more school experience -

+ From 38ee75586058e2595973b7831e57cd7b83e5e0d0 Mon Sep 17 00:00:00 2001 From: MylesJarvis Date: Thu, 11 Apr 2024 13:14:00 +0100 Subject: [PATCH 04/17] Add logical next step for post-feedback completion page --- app/views/candidates/booking_feedbacks/show.html.erb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/views/candidates/booking_feedbacks/show.html.erb b/app/views/candidates/booking_feedbacks/show.html.erb index 9e75d5118a..d8693866ee 100644 --- a/app/views/candidates/booking_feedbacks/show.html.erb +++ b/app/views/candidates/booking_feedbacks/show.html.erb @@ -4,9 +4,14 @@

- Thank you for your feedback. + Thank you for your feedback

- +

+ Search for more school experience +

+

+ <%= govuk_link_to 'Search for school experience', new_candidates_school_search_path, class: "govuk-!-margin-bottom-0" %> +

From af5853c23985d1c47d3dd3abf6a15178de057188 Mon Sep 17 00:00:00 2001 From: MylesJarvis Date: Thu, 11 Apr 2024 13:16:08 +0100 Subject: [PATCH 05/17] Add logical next step for service feedback completion page --- app/views/candidates/feedbacks/show.html.erb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/candidates/feedbacks/show.html.erb b/app/views/candidates/feedbacks/show.html.erb index 7c71fe7664..d86cf79325 100644 --- a/app/views/candidates/feedbacks/show.html.erb +++ b/app/views/candidates/feedbacks/show.html.erb @@ -4,11 +4,14 @@

- Thank you for your feedback. + Thank you for your feedback

-

- View and request more school experience -

+

+ Search for more school experience +

+

+ <%= govuk_link_to 'Search for school experience', new_candidates_school_search_path, class: "govuk-!-margin-bottom-0" %> +

From afbd0fff32f2a4a57df33f684d9d3e5c6312ace7 Mon Sep 17 00:00:00 2001 From: MylesJarvis Date: Thu, 11 Apr 2024 13:33:29 +0100 Subject: [PATCH 06/17] fix tests --- features/candidates/booking_feedback.feature | 2 +- features/candidates/feedback.feature | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/features/candidates/booking_feedback.feature b/features/candidates/booking_feedback.feature index 21b594bd0e..e94e022f7a 100644 --- a/features/candidates/booking_feedback.feature +++ b/features/candidates/booking_feedback.feature @@ -44,4 +44,4 @@ Feature: Feedback And I choose 'Positively' from the 'How has your experience affected your decision to apply for teacher training?' radio buttons And I choose 'No' from the 'Do you want to apply for teacher training?' radio buttons When I click the 'Submit feedback' button - Then I should see the text 'Thank you for your feedback.' + Then I should see the text 'Thank you for your feedback' diff --git a/features/candidates/feedback.feature b/features/candidates/feedback.feature index 7f1e7e587a..35f9236419 100644 --- a/features/candidates/feedback.feature +++ b/features/candidates/feedback.feature @@ -41,10 +41,10 @@ Feature: Feedback And I choose 'Satisfied' from the 'Overall, how did you feel about the service you received?' radio buttons And I enter 'Keep up the good work' into the 'How could we improve the service? (optional)' field When I click the 'Submit feedback' button - Then I should see the text 'Thank you for your feedback.' + Then I should see the text 'Thank you for your feedback' Scenario: Recording the referrer Given I am on the 'find a school' page prior to giving feedback When I click 'Give feedback', fill in and submit the candidate feedback form - Then I should see the text 'Thank you for your feedback.' + Then I should see the text 'Thank you for your feedback' And my referrer should have been recorded From 0c66269f8a7475e292ce35ecd3cd7edbdff544fc Mon Sep 17 00:00:00 2001 From: Chidi Ekuma Date: Tue, 16 Apr 2024 12:50:22 +0100 Subject: [PATCH 07/17] Implement redirects: - Redirect candidates signin route to candidates page - redirects candidates/dashboard to /candidates --- config/routes.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 5190588495..0cb608cfe1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -164,6 +164,8 @@ root to: 'home#index' get "splash", to: "home#splash" + get '/dashboard', to: redirect('/candidates') + # email confirmation link get 'confirm/:uuid', to: 'registrations/placement_requests#create', as: :confirm @@ -199,8 +201,8 @@ resource :feedback, only: %i[new create show], controller: "booking_feedbacks" end - get 'signin', to: 'sessions#new' - post 'signin', to: 'sessions#create' + get 'signin', to: redirect('/candidates') + post 'signin', to: redirect('/candidates') put 'signin', to: 'sessions#update', as: :signin_code get 'signout', to: 'sessions#sign_out' From c51cd729dad065176ff448a65c97883299a44157 Mon Sep 17 00:00:00 2001 From: Chidi Ekuma Date: Wed, 17 Apr 2024 12:02:12 +0100 Subject: [PATCH 08/17] Update specs to reflect redirects for candidates signin and dashboard routes - Remove candidates/dashboard.feature - Refactor cookie_preferences_spec.rb to update user acceptance scenario - Comment parts of api_reg_spec --- features/candidates/dashboard.feature | 40 -------------- .../candidates/dashboards_controller_spec.rb | 32 ++---------- .../candidates/sessions_controller_spec.rb | 26 ++++------ .../candidates/api_registrations_spec.rb | 52 ++++++------------- spec/features/cookie_preferences_spec.rb | 4 +- 5 files changed, 32 insertions(+), 122 deletions(-) delete mode 100644 features/candidates/dashboard.feature diff --git a/features/candidates/dashboard.feature b/features/candidates/dashboard.feature deleted file mode 100644 index f991091af0..0000000000 --- a/features/candidates/dashboard.feature +++ /dev/null @@ -1,40 +0,0 @@ -Feature: View Dashboard page - Login as a Candidate - I want to see my Dashboard showing my Placement Requests and Bookings - - Background: - Given there is a fully-onboarded school - And the school has subjects - - Scenario: Viewing the Dashboard when signed out - Given I visit the Dashboard page - Then I should be redirected to the candidate signin page - - Scenario: Page title - Given I am logged in as a candidate user - When I visit the Dashboard page - Then the page title should be 'Candidate dashboard' - - Scenario: List candidate's placements only - Given I am logged in as a candidate user - And there are some placement requests - And there are some placement requests of the current user - When I visit the Dashboard page - Then I should see all my placement requests listed - - Scenario: Table contents - Given I am logged in as a candidate user - And there are some placement requests of the current user - When I visit the Dashboard page - Then I should see a table with the following headings: - | Placement date | - | School | - | Subject | - | Status | - | Action | - - Scenario: Empty list - Given I am logged in as a candidate user - When I visit the Dashboard page - Then I should see the text 'You have no placement requests or bookings' - And I should not see the requests table diff --git a/spec/controllers/candidates/dashboards_controller_spec.rb b/spec/controllers/candidates/dashboards_controller_spec.rb index 78ce77e876..0503c2938a 100644 --- a/spec/controllers/candidates/dashboards_controller_spec.rb +++ b/spec/controllers/candidates/dashboards_controller_spec.rb @@ -2,35 +2,9 @@ RSpec.describe Candidates::DashboardsController, type: :request do describe "GET #show" do - it_behaves_like "candidate signed out", -> { get candidates_dashboard_path } - - context "when signed in" do - include_context 'candidate signin' - - let(:school) { build :bookings_school } - let(:other_school) { build :bookings_school } - let(:placement_requests) { create_list :placement_request, 1, school: school } - let(:current_candidate_placement_requests) do - create_list :placement_request, 2, candidate: current_candidate, school: school - end - - before do - # Ensure there are placement requests for other candidates - create_list :placement_request, 2, school: other_school - get candidates_dashboard_path - end - - it 'assigns the current contact' do - expect(assigns(:current_candidate)).to eq(current_candidate) - end - - it "assigns the placement requests of the current candidate" do - expect(assigns(:placement_requests)).to match_array(current_candidate_placement_requests) - end - - it "returns http success" do - expect(response).to have_http_status(:success) - end + it "redirects to /candidates" do + get candidates_dashboard_path + expect(response).to redirect_to("/candidates") end end end diff --git a/spec/controllers/candidates/sessions_controller_spec.rb b/spec/controllers/candidates/sessions_controller_spec.rb index 872cbb8097..c757cb2414 100644 --- a/spec/controllers/candidates/sessions_controller_spec.rb +++ b/spec/controllers/candidates/sessions_controller_spec.rb @@ -6,8 +6,8 @@ describe "GET #new" do before { get candidates_signin_path } - it "returns http success" do - expect(response).to have_http_status(:success) + it "redirects the user to /candidates" do + expect(response).to have_http_status(:redirect) end end @@ -32,9 +32,8 @@ post candidates_signin_path, params: { candidates_session: valid_creds } end - it "returns http success" do - expect(response).to have_http_status(:success) - expect(response.body).to match('Verify your school experience sign in') + it "redirects the user to /candidates" do + expect(response).to have_http_status(:redirect) end end @@ -48,10 +47,8 @@ end end - it "renders an error page with a link to try again" do - expect(response).to have_http_status(:success) - expect(response.body).to match('We didn’t recognise the email address you entered') - expect(response.body).to match("Try entering your details again.") + it "redirects the user to /candidates" do + expect(response).to have_http_status(:redirect) end end @@ -62,10 +59,8 @@ end end - it "renders an error page" do - expect(response).to have_http_status(:success) - expect(response.body).to match('We didn’t recognise the email address you entered') - expect(response.body).to match("To login, you need to be registered with us.") + it "redirects the user to /candidates" do + expect(response).to have_http_status(:redirect) end end end @@ -74,9 +69,8 @@ let(:invalid_creds) { { candidates_session: { email: 'invalid' } } } before { post candidates_signin_path, params: invalid_creds } - it "returns http success" do - expect(response).to have_http_status(:success) - expect(response.body).to match('Get school experience sign in') + it "returns http redirect to /candidates" do + expect(response).to have_http_status(:redirect) end end end diff --git a/spec/features/candidates/api_registrations_spec.rb b/spec/features/candidates/api_registrations_spec.rb index aa30be4f6f..59e3f97b9b 100644 --- a/spec/features/candidates/api_registrations_spec.rb +++ b/spec/features/candidates/api_registrations_spec.rb @@ -93,18 +93,17 @@ .with(sign_up.candidate_id) { sign_up } end - scenario "completing the Journey" do - sign_in_via_dashboard(sign_up) - complete_personal_information_step fill_in_fields: false - complete_contact_information_step - complete_education_step - complete_teaching_preference_step - complete_placement_preference_step - complete_availability_preference_step - complete_background_step - complete_application_preview_step(name: sign_up.full_name) - view_request_acknowledgement_step - end + # scenario "completing the Journey" do + # complete_personal_information_step fill_in_fields: false + # complete_contact_information_step + # complete_education_step + # complete_teaching_preference_step + # complete_placement_preference_step + # complete_availability_preference_step + # complete_background_step + # complete_application_preview_step(name: sign_up.full_name) + # view_request_acknowledgement_step + # end end context 'for known Candidate already signed in switching account part way through' do @@ -131,14 +130,12 @@ .with(code, request2) { candidate2.gitis_contact } end - scenario "completing the Journey" do - sign_in_via_dashboard(candidate1.gitis_contact) - complete_personal_information_step(fill_in_fields: false) - complete_contact_information_step - sign_in_via_dashboard(candidate2.gitis_contact) - swap_back_to_education_step - get_bounced_to_contact_information_step - end + # scenario "completing the Journey" do + # complete_personal_information_step(fill_in_fields: false) + # complete_contact_information_step + # swap_back_to_education_step + # get_bounced_to_contact_information_step + # end end end @@ -303,21 +300,6 @@ def visit_candidate_dashboard_step expect(page).to have_text "Your dashboard" end - def sign_in_via_dashboard(sign_up) - visit "/candidates/signin" - - fill_in 'Email address', with: sign_up.email - fill_in 'First name', with: sign_up.first_name - fill_in 'Last name', with: sign_up.last_name - click_button 'Sign in' - - expect(page.current_path).to eq "/candidates/signin" - - complete_sign_in_step - - expect(page.current_path).to eq "/candidates/dashboard" - end - def swap_back_to_education_step visit "/candidates/schools/#{school_urn}/registrations/education/new" end diff --git a/spec/features/cookie_preferences_spec.rb b/spec/features/cookie_preferences_spec.rb index d6466bf7c6..81350696cb 100644 --- a/spec/features/cookie_preferences_spec.rb +++ b/spec/features/cookie_preferences_spec.rb @@ -11,11 +11,11 @@ end scenario "a user accepts the cookies from valid path" do - visit candidates_signin_path + visit root_path click_on "Accept analytics cookies" - expect(page.current_path).to eq(candidates_signin_path) + expect(page.current_path).to eq(root_path) end scenario "a user accepts the cookies from a blacklisted path" do From f65b8314612f4c132013c6e804871365839cd3e3 Mon Sep 17 00:00:00 2001 From: Chidi Ekuma Date: Wed, 17 Apr 2024 15:33:00 +0100 Subject: [PATCH 09/17] Fix redirect issue for candidates dashboard route --- config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index 0cb608cfe1..536b168bfa 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -164,7 +164,7 @@ root to: 'home#index' get "splash", to: "home#splash" - get '/dashboard', to: redirect('/candidates') + get '/dashboard', to: redirect('/candidates') # email confirmation link get 'confirm/:uuid', to: 'registrations/placement_requests#create', as: :confirm From 4813c71cbba19570f8b7471d98f6097b7b935770 Mon Sep 17 00:00:00 2001 From: MylesJarvis Date: Wed, 17 Apr 2024 16:08:14 +0100 Subject: [PATCH 10/17] Add next steps to all relevant pages - to review --- app/views/candidates/booking_feedbacks/show.html.erb | 2 +- app/views/candidates/feedbacks/show.html.erb | 2 +- .../_show_booking_cancelled_by_candidate.html.erb | 6 ++++++ .../_show_booking_cancelled_by_school.html.erb | 8 ++++++++ ...show_placement_request_cancelled_by_candidate.html.erb | 8 ++++++++ 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/app/views/candidates/booking_feedbacks/show.html.erb b/app/views/candidates/booking_feedbacks/show.html.erb index d8693866ee..5f43e9c186 100644 --- a/app/views/candidates/booking_feedbacks/show.html.erb +++ b/app/views/candidates/booking_feedbacks/show.html.erb @@ -7,7 +7,7 @@ Thank you for your feedback -

+

Search for more school experience

diff --git a/app/views/candidates/feedbacks/show.html.erb b/app/views/candidates/feedbacks/show.html.erb index d86cf79325..312094c14a 100644 --- a/app/views/candidates/feedbacks/show.html.erb +++ b/app/views/candidates/feedbacks/show.html.erb @@ -7,7 +7,7 @@ Thank you for your feedback -

+

Search for more school experience

diff --git a/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_candidate.html.erb b/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_candidate.html.erb index 34cedbfcd1..4f3042d28a 100644 --- a/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_candidate.html.erb +++ b/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_candidate.html.erb @@ -26,6 +26,12 @@ You can also chat to Get Into Teaching using our <%= chat_service %>

+

+ Search for more school experience +

+

+ <%= govuk_link_to 'Search for school experience', new_candidates_school_search_path, class: "govuk-!-margin-bottom-0" %> +

diff --git a/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_school.html.erb b/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_school.html.erb index d59fd78e57..b25add4017 100644 --- a/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_school.html.erb +++ b/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_school.html.erb @@ -20,5 +20,13 @@

Extra details from the school <%= extra_details %>

+ +

+ Search for more school experience +

+

+ <%= govuk_link_to 'Search for school experience', new_candidates_school_search_path, class: "govuk-!-margin-bottom-0" %> +

+ diff --git a/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_candidate.html.erb b/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_candidate.html.erb index ec4b6b802c..0c3d89a0e9 100644 --- a/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_candidate.html.erb +++ b/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_candidate.html.erb @@ -32,5 +32,13 @@ <%= chat_service %> between 8:30am and 5:30pm, Monday to Friday.

+ +

+ Search for more school experience +

+

+ <%= govuk_link_to 'Search for school experience', new_candidates_school_search_path, class: "govuk-!-margin-bottom-0" %> +

+ From bb620a8281e80be9cf7c28f2591104ff4a8a94a7 Mon Sep 17 00:00:00 2001 From: Chidi Ekuma Date: Thu, 18 Apr 2024 16:39:25 +0100 Subject: [PATCH 11/17] Refactor `api_registrations_spec.rb` to remove unused irrelevant sign-in blocks --- config/routes.rb | 2 +- .../candidates/api_registrations_spec.rb | 58 ------------------- 2 files changed, 1 insertion(+), 59 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 0cb608cfe1..536b168bfa 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -164,7 +164,7 @@ root to: 'home#index' get "splash", to: "home#splash" - get '/dashboard', to: redirect('/candidates') + get '/dashboard', to: redirect('/candidates') # email confirmation link get 'confirm/:uuid', to: 'registrations/placement_requests#create', as: :confirm diff --git a/spec/features/candidates/api_registrations_spec.rb b/spec/features/candidates/api_registrations_spec.rb index 59e3f97b9b..a958ac40fe 100644 --- a/spec/features/candidates/api_registrations_spec.rb +++ b/spec/features/candidates/api_registrations_spec.rb @@ -79,64 +79,6 @@ view_request_acknowledgement_step end end - - context 'for known Candidate already signed in' do - include_context "api candidate matched back" - include_context "api correct verification code" - - let(:email_address) { sign_up.email } - let!(:candidate) { create(:candidate, :confirmed, gitis_uuid: sign_up.candidate_id) } - - before do - allow_any_instance_of(GetIntoTeachingApiClient::SchoolsExperienceApi).to \ - receive(:get_schools_experience_sign_up) - .with(sign_up.candidate_id) { sign_up } - end - - # scenario "completing the Journey" do - # complete_personal_information_step fill_in_fields: false - # complete_contact_information_step - # complete_education_step - # complete_teaching_preference_step - # complete_placement_preference_step - # complete_availability_preference_step - # complete_background_step - # complete_application_preview_step(name: sign_up.full_name) - # view_request_acknowledgement_step - # end - end - - context 'for known Candidate already signed in switching account part way through' do - include_context "api candidate matched back" - include_context "api correct verification code" - - let(:email_address) { sign_up.email } - let(:candidate1) { create(:candidate, :confirmed, gitis_contact: sign_up, gitis_uuid: sign_up.candidate_id) } - let(:candidate2) { create(:candidate, :confirmed, :with_api_contact) } - let(:request2) do - GetIntoTeachingApiClient::ExistingCandidateRequest.new( - first_name: candidate2.gitis_contact.first_name, - last_name: candidate2.gitis_contact.last_name, - email: candidate2.gitis_contact.email - ) - end - - before do - allow_any_instance_of(GetIntoTeachingApiClient::SchoolsExperienceApi).to \ - receive(:get_schools_experience_sign_up) - .with(candidate2.gitis_uuid) { candidate2.gitis_contact } - allow_any_instance_of(GetIntoTeachingApiClient::SchoolsExperienceApi).to \ - receive(:exchange_access_token_for_schools_experience_sign_up) - .with(code, request2) { candidate2.gitis_contact } - end - - # scenario "completing the Journey" do - # complete_personal_information_step(fill_in_fields: false) - # complete_contact_information_step - # swap_back_to_education_step - # get_bounced_to_contact_information_step - # end - end end def complete_personal_information_step(expected_heading: nil, fill_in_fields: true) From b8ac090050378db63242068709f324fe31e12253 Mon Sep 17 00:00:00 2001 From: MylesJarvis Date: Mon, 22 Apr 2024 10:35:55 +0100 Subject: [PATCH 12/17] Amend copy based on content design feedback --- app/views/candidates/booking_feedbacks/show.html.erb | 11 +++++++++-- app/views/candidates/feedbacks/show.html.erb | 7 +++++-- .../_show_booking_cancelled_by_candidate.html.erb | 5 ++++- .../_show_booking_cancelled_by_school.html.erb | 7 +++++-- ..._placement_request_cancelled_by_candidate.html.erb | 7 +++++-- 5 files changed, 28 insertions(+), 9 deletions(-) diff --git a/app/views/candidates/booking_feedbacks/show.html.erb b/app/views/candidates/booking_feedbacks/show.html.erb index 5f43e9c186..9fda3c6964 100644 --- a/app/views/candidates/booking_feedbacks/show.html.erb +++ b/app/views/candidates/booking_feedbacks/show.html.erb @@ -8,10 +8,17 @@

- Search for more school experience + Get support and advice from a teacher training adviser

+

+ Get free, ongoing one-to-one support from an adviser with years of teaching experience. + They can help you to find a course, explain funding options and guide you step-by-step through the application process. +

- <%= govuk_link_to 'Search for school experience', new_candidates_school_search_path, class: "govuk-!-margin-bottom-0" %> + <%= link_to 'Get a teacher training adviser', 'https://getintoteaching.education.gov.uk/teacher-training-advisers' %>

+

+ You can find more information on how to become a teacher at + <%= link_to 'Get Into Teaching', 'https://getintoteaching.education.gov.uk/' %> diff --git a/app/views/candidates/feedbacks/show.html.erb b/app/views/candidates/feedbacks/show.html.erb index 312094c14a..67e636f2ad 100644 --- a/app/views/candidates/feedbacks/show.html.erb +++ b/app/views/candidates/feedbacks/show.html.erb @@ -8,9 +8,12 @@

- Search for more school experience + Request school experience

-

+

+ To request a placement you can search to find school experience near you. +

+

<%= govuk_link_to 'Search for school experience', new_candidates_school_search_path, class: "govuk-!-margin-bottom-0" %>

diff --git a/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_candidate.html.erb b/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_candidate.html.erb index 4f3042d28a..acfc41ad11 100644 --- a/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_candidate.html.erb +++ b/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_candidate.html.erb @@ -27,8 +27,11 @@ <%= chat_service %>

- Search for more school experience + Request school experience

+

+ To request a different placement you can search to find school experience near you. +

<%= govuk_link_to 'Search for school experience', new_candidates_school_search_path, class: "govuk-!-margin-bottom-0" %>

diff --git a/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_school.html.erb b/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_school.html.erb index b25add4017..df60e6f9c2 100644 --- a/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_school.html.erb +++ b/app/views/candidates/placement_requests/cancellations/_show_booking_cancelled_by_school.html.erb @@ -4,7 +4,7 @@

- Your school experience booking has been cancelled by the school + Your school experience booking has already been cancelled by the school

@@ -22,8 +22,11 @@

- Search for more school experience + Request school experience

+

+ To request a different placement you can search to find school experience near you. +

<%= govuk_link_to 'Search for school experience', new_candidates_school_search_path, class: "govuk-!-margin-bottom-0" %>

diff --git a/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_candidate.html.erb b/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_candidate.html.erb index 0c3d89a0e9..2a10a5b98e 100644 --- a/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_candidate.html.erb +++ b/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_candidate.html.erb @@ -4,7 +4,7 @@

- Your school experience request has been cancelled + You have successfully cancelled your request for school experience

@@ -34,8 +34,11 @@

- Search for more school experience + Request school experience

+

+ To request a different placement you can search to find school experience near you. +

<%= govuk_link_to 'Search for school experience', new_candidates_school_search_path, class: "govuk-!-margin-bottom-0" %>

From d91d4cc4fe7e2373ae8ea097bc8466c50b930fd4 Mon Sep 17 00:00:00 2001 From: MylesJarvis Date: Mon, 22 Apr 2024 11:02:46 +0100 Subject: [PATCH 13/17] revert content change --- .../_show_placement_request_cancelled_by_candidate.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_candidate.html.erb b/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_candidate.html.erb index 2a10a5b98e..d75961575e 100644 --- a/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_candidate.html.erb +++ b/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_candidate.html.erb @@ -4,7 +4,7 @@

- You have successfully cancelled your request for school experience + Your school experience request has been cancelled

From 1a46410ee83f4e99ff3b7164af50666f36295d0a Mon Sep 17 00:00:00 2001 From: MylesJarvis Date: Mon, 22 Apr 2024 11:40:15 +0100 Subject: [PATCH 14/17] Test removal of .text --- app/controllers/pages_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 05f2134582..96e9752876 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -7,7 +7,7 @@ def show end def privacy_policy - @privacy_policy = GetIntoTeachingApiClient::PrivacyPoliciesApi.new.get_latest_privacy_policy.text + @privacy_policy = GetIntoTeachingApiClient::PrivacyPoliciesApi.new.get_latest_privacy_policy end def schools_privacy_policy; end From 097bbd240f46ab51ae73563d24759d66cfd7c934 Mon Sep 17 00:00:00 2001 From: MylesJarvis Date: Mon, 22 Apr 2024 11:40:33 +0100 Subject: [PATCH 15/17] Revert --- app/controllers/pages_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 96e9752876..05f2134582 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -7,7 +7,7 @@ def show end def privacy_policy - @privacy_policy = GetIntoTeachingApiClient::PrivacyPoliciesApi.new.get_latest_privacy_policy + @privacy_policy = GetIntoTeachingApiClient::PrivacyPoliciesApi.new.get_latest_privacy_policy.text end def schools_privacy_policy; end From d8a820e6a76197b0b83cc1488f0b38710ec3ffc5 Mon Sep 17 00:00:00 2001 From: MylesJarvis Date: Mon, 22 Apr 2024 14:56:46 +0100 Subject: [PATCH 16/17] Update page where school rejects and candidate then tries to cancel --- .../_show_placement_request_cancelled_by_school.html.erb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_school.html.erb b/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_school.html.erb index e8eeca343e..9e5b066fea 100644 --- a/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_school.html.erb +++ b/app/views/candidates/placement_requests/cancellations/_show_placement_request_cancelled_by_school.html.erb @@ -17,8 +17,14 @@ <%= rejection_reasons %>

+

+ Request school experience +

- <%= link_to 'Request school experience at other schools', new_candidates_school_search_path %> + To request a different placement you can search to find school experience near you. +

+

+ <%= govuk_link_to 'Search for school experience', new_candidates_school_search_path, class: "govuk-!-margin-bottom-0" %>

From 3e3ffb11767a08b7a4c8ca5e2aae6c0aad6febac Mon Sep 17 00:00:00 2001 From: MylesJarvis Date: Tue, 23 Apr 2024 09:12:55 +0100 Subject: [PATCH 17/17] Add 2 full stops --- app/views/candidates/booking_feedbacks/show.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/candidates/booking_feedbacks/show.html.erb b/app/views/candidates/booking_feedbacks/show.html.erb index 9fda3c6964..bf9275c83f 100644 --- a/app/views/candidates/booking_feedbacks/show.html.erb +++ b/app/views/candidates/booking_feedbacks/show.html.erb @@ -15,10 +15,10 @@ They can help you to find a course, explain funding options and guide you step-by-step through the application process.

- <%= link_to 'Get a teacher training adviser', 'https://getintoteaching.education.gov.uk/teacher-training-advisers' %> + <%= link_to 'Get a teacher training adviser', 'https://getintoteaching.education.gov.uk/teacher-training-advisers' %>.

You can find more information on how to become a teacher at - <%= link_to 'Get Into Teaching', 'https://getintoteaching.education.gov.uk/' %> + <%= link_to 'Get Into Teaching', 'https://getintoteaching.education.gov.uk/' %>.