diff --git a/app/views/candidates/booking_feedbacks/show.html.erb b/app/views/candidates/booking_feedbacks/show.html.erb
index 885970c376..bf9275c83f 100644
--- a/app/views/candidates/booking_feedbacks/show.html.erb
+++ b/app/views/candidates/booking_feedbacks/show.html.erb
@@ -4,14 +4,21 @@
- Thank you for your feedback.
+ Thank you for your feedback
-
- View and request more school experience
-
+
+ Get support and advice from a teacher training adviser
+
- <%= link_to "Your requests and bookings", candidates_dashboard_path %>
+ 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.
+
+ <%= 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 3811ffad10..67e636f2ad 100644
--- a/app/views/candidates/feedbacks/show.html.erb
+++ b/app/views/candidates/feedbacks/show.html.erb
@@ -4,14 +4,17 @@
- Thank you for your feedback.
+ Thank you for your feedback
-
- View and request more school experience
-
+
+ Request school experience
+
- <%= link_to 'Your requests and bookings', candidates_dashboard_path %>
+ 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/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
-
-
-
- -
- <%= link_to candidates_dashboard_path, class: "govuk-!-font-weight-bold" do %>
- Manage your bookings
- <% end %>
-
-
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..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
@@ -26,10 +26,14 @@
You can also chat to Get Into Teaching using our
<%= chat_service %>
-
- View and request more school experience
+
+ Request school experience
+
+
+ To request a different placement you can search to find school experience near you.
+
- <%= link_to 'Your requests and bookings', candidates_dashboard_path %>
+ <%= 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 55b2985346..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
@@ -21,9 +21,15 @@
Extra details from the school <%= extra_details %>
-
View and request more school experience
+
+ Request school experience
+
- <%= link_to 'Your requests and bookings', candidates_dashboard_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" %>
+
+
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..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
@@ -33,9 +33,15 @@
between 8:30am and 5:30pm, Monday to Friday.
-
- View and request more school experience
-
- <%= link_to 'Your requests and bookings', candidates_dashboard_path %>
+
+ 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_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" %>
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
diff --git a/config/routes.rb b/config/routes.rb
index 5190588495..536b168bfa 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'
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/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/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
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 d2fe4739a9..a958ac40fe 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
@@ -80,67 +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
- 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
- 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
- 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
- end
end
def complete_personal_information_step(expected_heading: nil, fill_in_fields: true)
@@ -304,21 +242,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