diff --git a/app/components/admin/participants/table_row.html.erb b/app/components/admin/participants/table_row.html.erb
index dcc816d412f..3cc9099021c 100644
--- a/app/components/admin/participants/table_row.html.erb
+++ b/app/components/admin/participants/table_row.html.erb
@@ -1,31 +1,29 @@
-
+ |
Full name
-
- <%= govuk_link_to profile.user.full_name, admin_participant_path(profile) %>
-
+ <%= govuk_link_to profile.user.full_name, admin_participant_path(profile) %>
|
-
- Type
+ |
+ Role
<%= I18n.t(profile.participant_type, scope: "schools.participants.type") %>
|
-
- School
+ |
+ TRN
<%= profile.teacher_profile.trn %>
|
-
- School
+ |
+ School name
<%= school&.name %>
|
-
+ |
School URN
<%= school_urn %>
|
-
+ |
Date added
<%= profile.created_at.to_date.to_fs(:govuk_short) %>
|
-
+ |
Training record state
<%= render StatusTags::AdminParticipantStatusTag.new(participant_profile: profile,
induction_record: profile.latest_current_induction_record) %>
diff --git a/spec/cypress/integration/admin/ParticipantManagment.feature b/spec/cypress/integration/admin/ParticipantManagment.feature
deleted file mode 100644
index 542cfae6b04..00000000000
--- a/spec/cypress/integration/admin/ParticipantManagment.feature
+++ /dev/null
@@ -1,59 +0,0 @@
-Feature: Admin user managing participants
- Admin users should be able to view a list of participants
-
- Background:
- Given I am logged in as an "admin"
- And scenario "admin/school_participants" has been run
- And I am on "admin participants" page
-
- Scenario: Viewing a list of participants
- Then the table should have 7 rows
- And "page body" should contain "Enter the participant’s ID, name, email address or TRN"
- And the page should be accessible
-
- When I type "example" into "search box"
- And I press enter in "search box"
- Then the table should have 0 rows
-
- When I clear "search box"
- And I type "Unrelated" into "search box"
- And I click on "search button"
- Then the table should have 2 rows
-
- Scenario: Validating NPQ participants
- When I click on "link" containing "Natalie Portman Quebec"
- Then I should be on "admin participant" page
- And "page body" should contain "Date of birth"
- And the page should be accessible
-
- When I click on "link" containing "View identity confirmation"
- Then I should be on "admin participant identity" page
- And the page should be accessible
-
- When I click the submit button
- Then "page body" should contain "can't be blank"
-
- When I click on "label" containing "Approved"
- And I type "Look good to me" into field labelled "Decision notes"
- And I click the submit button
- Then I should be on "admin participant" page
- And "page body" should contain "Participant task 'Identity' has been approved"
-
- Scenario: Deleting a participant
- When I click on "link" containing "ECT User 1"
- Then I should be on "admin participant" page
-
- # Move this to ParticipantManagement.feature once the links work
- When I click on "link" containing "Delete participant"
- Then I should be on "admin delete participant" page
- And the page should be accessible
-
- When I click the submit button
- Then "page body" should contain "has been deleted"
- And the page should be accessible
-
- When I click on "link" containing "View participant listing"
- Then I should be on "admin participants" page
- # FIXME: Deleting doesn't actually delete, it removes them from a school
- # but they'll still be visible in the list of participants
- And "page body" should contain "ECT User 1"
diff --git a/spec/cypress/integration/admin/ViewSchoolParticipants.feature b/spec/cypress/integration/admin/ViewSchoolParticipants.feature
deleted file mode 100644
index e86601aa8c5..00000000000
--- a/spec/cypress/integration/admin/ViewSchoolParticipants.feature
+++ /dev/null
@@ -1,20 +0,0 @@
-Feature: Admin users viewing school participants
- As a DfE Admin
- I need to oversee the process of school induction tutors adding participant details
- So that I can view which schools have added their participants and
-
- Background:
- Given I am logged in as an "admin"
- And scenario "admin/school_participants" has been run
- And I am on "admin school participants" page with slug "test-school"
-
- Scenario: Admin school participants page should list school participants
- Then "page body" should contain "ECT User 1"
- And "page body" should not contain "Unrelated user 1"
- Then the page should be accessible
-
- Scenario: Admins should be able to click through to individual participants
- When I click on "link" containing "ECT User 1"
- Then I should be on "admin participant" page
- And "page title" should contain "ECT User 1"
- And the page should be accessible
diff --git a/spec/cypress/integration/lead_providers/PartnershipGuidance.feature b/spec/cypress/integration/lead_providers/PartnershipGuidance.feature
deleted file mode 100644
index 38621cba240..00000000000
--- a/spec/cypress/integration/lead_providers/PartnershipGuidance.feature
+++ /dev/null
@@ -1,10 +0,0 @@
-Feature: Lead Providers Partnership Management
- Scenario: Visiting the Lead Providers landing page
- Given I am on "the Lead Provider landing page" page
- Then the page should be accessible
-
- Scenario: Learning how to manage partnerships
- Given I am on "the Lead Provider landing page" page
- When I click on "link" containing "How to manage ECF partnerships"
- Then I should be on "Partnership guidance" page
- And the page should be accessible
diff --git a/spec/cypress/integration/lead_providers/YourSchools.feature b/spec/cypress/integration/lead_providers/YourSchools.feature
deleted file mode 100644
index b6238100b4f..00000000000
--- a/spec/cypress/integration/lead_providers/YourSchools.feature
+++ /dev/null
@@ -1,88 +0,0 @@
-Feature: Your schools flow
- Background:
- Given cohort was created with start_year "2021"
- And cohort was created with start_year "2022"
- And I am logged in as a "lead_provider"
- And scenario "lead_provider_with_schools" has been run
- And I am on "lead providers your schools" page with query "cohort=2022"
-
- Scenario: Viewing my schools
- Then "page body" should contain "Your schools"
- And "page body" should contain "2022 cohort"
- And "page body" should contain "2021 cohort"
- And "page body" should contain "Download schools for 2022"
- And the table should have 3 rows
- And "page body" should contain "Big School"
- And "page body" should contain "Middle School"
- And "page body" should contain "Small School"
- And the page should be accessible
-
- When I am on "dashboard" page
- And I click on "link" containing "Check your schools"
- Then "page body" should contain "Your schools"
- And "page body" should contain "Download schools for 2022"
- And "schools table" should exist
-
- Scenario: Searching my list of schools
- When I type "900002" into "search box"
- And I press enter in "search box"
- Then "page body" should contain "Middle School"
- And "page body" should contain "900002"
- And "page body" should contain "Ace Delivery Partner"
- And the table should have 1 row
-
- When I clear "search box"
- And I type "small" into "search box"
- And I click on "search button"
- Then "page body" should contain "Small School"
- And "page body" should contain "900003"
- And "page body" should contain "Ace Delivery Partner"
- And the table should have 1 row
-
- When I clear "search box"
- And I type "ace" into "search box"
- And I click on "search button"
- Then "page body" should contain "Big School"
- And "page body" should contain "Middle School"
- And "page body" should contain "Small School"
- And "page body" should contain "900001"
- And "page body" should contain "900002"
- And "page body" should contain "900003"
- And "page body" should contain "Ace Delivery Partner"
- And the table should have 3 rows
-
- When I clear "search box"
- And I type "banana" into "search box"
- And I click on "search button"
- Then "page body" should contain "There are no matching results"
- And "schools table" should not exist
-
- Scenario: Viewing school with pupil premium uplift
- When I click on "link" containing "Big School"
- Then "page body" should contain "Big School"
- And "page body" should contain "2022 participants"
- And "page body" should contain "900001"
- And "page body" should contain "Ace Delivery Partner"
- And "page body" should contain "Pupil premium above 40%"
- And "page body" should contain "induction.tutor_1@example.com"
- And the page should be accessible
-
- Scenario: Viewing school with sparsity uplift
- When I click on "link" containing "Middle School"
- Then "page body" should contain "Middle School"
- And "page body" should contain "2022 participants"
- And "page body" should contain "900002"
- And "page body" should contain "Ace Delivery Partner"
- And "page body" should contain "Remote school"
- And "page body" should contain "induction.tutor_2@example.com"
- And the page should be accessible
-
- Scenario: Viewing school with pupil premium and sparsity uplifts
- When I click on "link" containing "Small School"
- Then "page body" should contain "Small School"
- And "page body" should contain "2022 participants"
- And "page body" should contain "900003"
- And "page body" should contain "Ace Delivery Partner"
- And "page body" should contain "Pupil premium above 40% and Remote school"
- And "page body" should contain "induction.tutor_3@example.com"
- And the page should be accessible
diff --git a/spec/features/admin/participants/participant_steps.rb b/spec/features/admin/participants/participant_steps.rb
index 77a90c6c90d..3d6c2a43662 100644
--- a/spec/features/admin/participants/participant_steps.rb
+++ b/spec/features/admin/participants/participant_steps.rb
@@ -113,6 +113,9 @@ def then_i_should_see_the_mentors_details
def then_i_should_see_a_list_of_participants
expect(page).to have_text("Fip School")
expect(page).to have_text("Sally Teacher")
+ expect(page).to have_text("Billy Mentor")
+ expect(page).to have_text("Early career teacher")
+ expect(page).to have_text("Mentor")
end
def then_i_should_be_in_the_admin_participants_dashboard
diff --git a/spec/features/admin/participants/update_participants_details_spec.rb b/spec/features/admin/participants/participants_details_spec.rb
similarity index 61%
rename from spec/features/admin/participants/update_participants_details_spec.rb
rename to spec/features/admin/participants/participants_details_spec.rb
index 197e3e077aa..ce84f3b506a 100644
--- a/spec/features/admin/participants/update_participants_details_spec.rb
+++ b/spec/features/admin/participants/participants_details_spec.rb
@@ -3,7 +3,7 @@
require "rails_helper"
require_relative "./participant_steps"
-RSpec.feature "Admin should be able to update participants details", js: true, rutabaga: false do
+RSpec.feature "Admin should be able to manage participants details", js: true, rutabaga: false do
include ParticipantSteps
before do
@@ -60,4 +60,36 @@
when_i_click_on_the_participants_name "Billy Mentor"
then_the_participants_email_should_have_updated "billy@mentor-example.com"
end
+
+ scenario "Admin can validate the identity of NPQ participants" do
+ npq = NewSeeds::Scenarios::NPQ.new.build
+
+ when_i_visit_the_details_page_of_the_participant(npq.participant_profile.id)
+ and_i_click_on_the_identity_confirmation(npq.participant_profile.id)
+ and_i_approve_the_identity_confirmation
+ then_i_should_see_the_confirmation_message
+ end
+
+ def when_i_visit_the_details_page_of_the_participant(participant_id)
+ @details_page = Pages::AdminSupportParticipantDetail.load(participant_id:)
+ end
+
+ def and_i_click_on_the_identity_confirmation(participant_id)
+ @details_page.edit_identity_confirmation
+ @identity_confirmation_page = Pages::AdminParticipantIdentityValidation.loaded(participant_id:)
+ end
+
+ def and_i_click_on_the_override_decision
+ @details_page.edit_decision
+ end
+
+ def and_i_approve_the_identity_confirmation
+ @identity_confirmation_page.approved.click
+ @identity_confirmation_page.decision_notes.set "Looks good"
+ @identity_confirmation_page.confirm_button.click
+ end
+
+ def then_i_should_see_the_confirmation_message
+ expect(page).to have_text("Participant task 'Identity' has been approved")
+ end
end
diff --git a/spec/features/admin/participants/participants_spec.rb b/spec/features/admin/participants/participants_spec.rb
new file mode 100644
index 00000000000..c093fed0606
--- /dev/null
+++ b/spec/features/admin/participants/participants_spec.rb
@@ -0,0 +1,53 @@
+# frozen_string_literal: true
+
+require "rails_helper"
+require_relative "./participant_steps"
+
+RSpec.feature "Admin finding participants", js: true, rutabaga: false do
+ include ParticipantSteps
+
+ before do
+ given_there_is_a_school_that_has_chosen_fip_for_2021_and_partnered
+ and_i_am_signed_in_as_an_admin
+ and_i_have_added_an_ect
+ and_i_have_added_a_mentor
+ when_i_visit_admin_participants_dashboard
+ end
+
+ scenario "Viewing a list of participants" do
+ @page = Pages::AdminSupportParticipantList.load
+
+ then_i_should_see_a_list_of_participants
+ end
+
+ scenario "Searching participants" do
+ @page = Pages::AdminSupportParticipantList.load
+
+ then_i_see_the_search_bar
+
+ when_i_search_for_participant "Sally Teacher"
+ then_the_search_results_are_displayed
+
+ when_i_search_for_participant "random keyword"
+ then_the_search_results_are_empty
+ end
+
+ def when_i_search_for_participant(keyword)
+ @page.search_field.send_keys(keyword)
+ @page.search_button.click
+ end
+
+ def then_i_see_the_search_bar
+ expect(@page).to have_search_field
+ expect(@page).to have_search_button
+ end
+
+ def then_the_search_results_are_displayed
+ expect(@page).to have_search_results
+ expect(@page.search_results.first.full_name.text).to eq("Sally Teacher")
+ end
+
+ def then_the_search_results_are_empty
+ expect(@page).to_not have_search_results
+ end
+end
diff --git a/spec/features/admin/schools/view_school_participants_spec.rb b/spec/features/admin/schools/view_school_participants_spec.rb
index f9e1056a38c..901a35ffc59 100644
--- a/spec/features/admin/schools/view_school_participants_spec.rb
+++ b/spec/features/admin/schools/view_school_participants_spec.rb
@@ -9,6 +9,9 @@
when_i_visit the_school_participants_page
then_i_should_see_all_the_current_and_transferring_participants
and_the_page_should_be_accessible
+
+ when_i_click_on_the_participants_name "Charlie Current"
+ then_i_am_taken_to_the_admin_participant_details_page
end
private
@@ -18,7 +21,7 @@ def given_there_is_a_school_with_current_and_transferring_participants
cohort = create(:cohort, start_year: 2021)
school_cohort = create(:school_cohort, :fip, school:, cohort:)
- charlie = create(:ect_participant_profile, school_cohort:, user: create(:user, full_name: "Charlie Current"))
+ @charlie = create(:ect_participant_profile, school_cohort:, user: create(:user, full_name: "Charlie Current"))
theresa = create(:ect_participant_profile, user: create(:user, full_name: "Theresa Transfer-In"))
linda = create(:ect_participant_profile, school_cohort:, user: create(:user, full_name: "Linda Leaving"))
@@ -29,7 +32,7 @@ def given_there_is_a_school_with_current_and_transferring_participants
programme2 = create(:induction_programme, :fip, school_cohort: theresa.school_cohort)
induction_record = Induction::Enrol.call(participant_profile: theresa, induction_programme: programme2, start_date: Date.new(2021, 9, 1))
induction_record.leaving!(2.months.from_now)
- Induction::Enrol.call(participant_profile: charlie, induction_programme: programme, start_date: Date.new(2021, 12, 1))
+ Induction::Enrol.call(participant_profile: @charlie, induction_programme: programme, start_date: Date.new(2021, 12, 1))
Induction::Enrol.call(participant_profile: linda, induction_programme: programme, start_date: Date.new(2021, 9, 1))
Induction::Enrol.call(participant_profile: theresa, induction_programme: programme, start_date: induction_record.end_date, school_transfer: true)
linda.current_induction_record.leaving!(1.week.from_now)
@@ -44,4 +47,12 @@ def then_i_should_see_all_the_current_and_transferring_participants
expect(page).to have_content "Theresa Transfer-In"
expect(page).to have_content "Linda Leaving"
end
+
+ def when_i_click_on_the_participants_name(name)
+ click_on name
+ end
+
+ def then_i_am_taken_to_the_admin_participant_details_page
+ expect(current_path).to eq(admin_participant_details_path(@charlie))
+ end
end
diff --git a/spec/features/lead_providers/dashboard_page_spec.rb b/spec/features/lead_providers/dashboard_page_spec.rb
index ac21541b468..07cd48acf44 100644
--- a/spec/features/lead_providers/dashboard_page_spec.rb
+++ b/spec/features/lead_providers/dashboard_page_spec.rb
@@ -5,6 +5,8 @@
RSpec.feature "Lead Provider Dashboard", type: :feature, js: true, rutabaga: false do
let(:email_address) { "test-lead-provider@example.com" }
let(:lead_provider_name) { "Test Lead Provider" }
+ let(:school_name) { "Fip School 1" }
+ let(:school) { create(:school, name: school_name) }
let!(:cohort) { Cohort.find_by start_year: 2021 }
let!(:cohort_next) { Cohort.find_by start_year: 2022 }
@@ -15,25 +17,18 @@
create :lead_provider_profile, user:, lead_provider: ecf_lead_provider
ecf_lead_provider
end
+ let(:delivery_partner) { create(:delivery_partner, name: "Ace Delivery Partner") }
+ let(:current_cohort) { Cohort.current || create(:cohort, :current) }
def and_i_confirm_lead_provider_name_on_the_lead_provider_dashboard(lead_provider_name)
page.find("h1").has_content? lead_provider_name
end
- def when_i_check_schools_from_the_lead_provider_dashboard
- click_on "Check your schools"
- end
-
def and_i_am_on_the_lead_provider_dashboard
expect(page).to have_current_path "/dashboard"
expect(page).to have_title "Manage training for early career teachers"
end
- def then_i_am_on_the_check_schools_page
- expect(page).to have_current_path "/lead-providers/your-schools?cohort=2023"
- expect(page).to have_title "Your schools - Manage training for early career teachers"
- end
-
def then_i_am_on_the_confirm_schools_wizard
expect(page).to have_current_path "/lead-providers/report-schools/start?cohort=2021"
expect(page).to have_title "Manage training for early career teachers"
@@ -48,6 +43,43 @@ def when_i_confirm_schools_from_the_lead_provider_dashboard
click_on "Confirm your schools for the 2021 to 2022 academic year"
end
+ def and_a_school_has_been_already_confirmed_for_the_current_cohort
+ school_cohort = create(:school_cohort, school:, cohort: current_cohort, induction_programme_choice: "full_induction_programme")
+ partnership = create(:partnership, school:, lead_provider: ecf_lead_provider, delivery_partner:, cohort: current_cohort)
+ induction_programme = create(:induction_programme, :fip, school_cohort:, partnership:)
+ school_cohort.update!(default_induction_programme: induction_programme)
+ end
+
+ def given_lead_provider_with_pupil_premiums_schools
+ start_year = current_cohort.start_year
+ schools = [
+ create(:school, pupil_premiums: [build(:pupil_premium, :uplift, start_year:)], name: "Big School", urn: 700_001),
+ create(:school, pupil_premiums: [build(:pupil_premium, :sparse, start_year:)], name: "Middle School", urn: 700_002),
+ create(:school, pupil_premiums: [build(:pupil_premium, :uplift, :sparse, start_year:)], name: "Small School", urn: 700_003),
+ ]
+
+ schools.each_with_index do |school, index|
+ create(:partnership, school:, lead_provider: ecf_lead_provider, delivery_partner:, cohort: current_cohort)
+ create(:user, :induction_coordinator, schools: [schools[index]], email: "induction.tutor#{index + 1}@example.com")
+ end
+ end
+
+ def then_i_should_see(text)
+ and_i_should_see text
+ end
+
+ def and_i_should_see(text)
+ expect(page).to have_content(text)
+ end
+
+ def and_i_should_not_see_the_table_with_the_results
+ expect(page).to_not have_selector("table th")
+ end
+
+ def and_i_should_see_a_table_with_column_number(number)
+ expect(page).to have_selector("table th", count: number)
+ end
+
scenario "Lead provider dashboard is accessible" do
given_i_sign_in_as_the_user_with_the_email email_address
and_i_confirm_lead_provider_name_on_the_lead_provider_dashboard lead_provider_name
@@ -76,13 +108,95 @@ def when_i_confirm_schools_from_the_lead_provider_dashboard
scenario "Checking schools" do
given_i_sign_in_as_the_user_with_the_email email_address
+ and_a_school_has_been_already_confirmed_for_the_current_cohort
+
+ when_i_visit_the_schools_page
+ then_i_should_see "Your schools"
+ and_i_should_see "Confirm more schools"
+ and_i_should_see "Download schools for"
+ and_i_should_see "2021 cohort"
+ and_i_should_see "2022 cohort"
+ and_i_should_see "School recruited"
+ and_i_should_see_a_table_with_column_number 5
+ and_i_should_see school_name
+ and_the_page_is_accessible
+ end
+
+ scenario "Searching my list of schools" do
+ given_i_sign_in_as_the_user_with_the_email email_address
+ and_a_school_has_been_already_confirmed_for_the_current_cohort
+
+ when_i_visit_the_schools_page
+
+ when_i_type_the_school_urn_in_the_search_bar
+ and_click_search
+ then_i_should_see school_name
+ and_i_should_see school.urn
+ and_i_should_see "Ace Delivery Partner"
+ and_i_should_see_a_table_with_column_number 5
+
+ when_i_type_an_invalid_search_term
+ and_click_search
+ then_i_should_see "There are no matching results"
+ and_i_should_not_see_the_table_with_the_results
+ end
+
+ scenario "Viewing schools with pupil premiums" do
+ given_lead_provider_with_pupil_premiums_schools
+ and_i_sign_in_as_the_user_with_the_email email_address
+
+ when_i_visit_the_schools_page
+ and_i_click_on "Big School"
+ then_i_should_see "Big School"
+ and_i_should_see "2023 participants"
+ and_i_should_see "700001"
+ and_i_should_see "Ace Delivery Partner"
+ and_i_should_see "Pupil premium above 40%"
+ and_i_should_see "induction.tutor1@example.com"
+ and_the_page_is_accessible
+
+ when_i_visit_the_schools_page
+ and_i_click_on "Middle School"
+ then_i_should_see "Middle School"
+ and_i_should_see "2023 participants"
+ and_i_should_see "700002"
+ and_i_should_see "Ace Delivery Partner"
+ and_i_should_see "Remote school"
+ and_i_should_see "induction.tutor2@example.com"
+
+ when_i_visit_the_schools_page
+ and_i_click_on "Small School"
+ then_i_should_see "Small School"
+ and_i_should_see "2023 participants"
+ and_i_should_see "700003"
+ and_i_should_see "Ace Delivery Partner"
+ and_i_should_see "Pupil premium above 40% and Remote school"
+ and_i_should_see "induction.tutor3@example.com"
+ end
- when_i_check_schools_from_the_lead_provider_dashboard
+ def when_i_click_on(string)
+ page.click_on(string)
+ end
+ alias_method :and_i_click_on, :when_i_click_on
- then_i_am_on_the_check_schools_page
+ def when_i_visit_the_schools_page
+ @schools_page = Pages::CheckSchoolsPage.load
+ expect(@schools_page).to be_displayed
end
def and_i_do_not_see_next_cohort_schools_confirmation
expect(page).not_to have_content("Confirm your schools for the 2022 to 2023 academic year")
end
+
+ def when_i_type_the_school_urn_in_the_search_bar
+ when_i_fill_in "query", with: school.urn
+ end
+
+ def and_click_search
+ @schools_page.search
+ end
+
+ def when_i_type_an_invalid_search_term
+ when_i_fill_in "query", with: "invalid"
+ end
end
diff --git a/spec/features/lead_providers/partnership_guidance_spec.rb b/spec/features/lead_providers/partnership_guidance_spec.rb
new file mode 100644
index 00000000000..c57c719ae29
--- /dev/null
+++ b/spec/features/lead_providers/partnership_guidance_spec.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+require "rails_helper"
+
+RSpec.feature "Lead Provider landing pages", type: :feature, js: true do
+ scenario "Learning how to manage partnerships" do
+ given_i_am_on_the_lead_provider_landing_page
+ and_the_page_is_accessible
+ when_i_click_the_link_to_the_guidance_page
+ then_i_am_on_the_lead_providers_partnership_guide_page
+ and_the_page_is_accessible
+ end
+
+private
+
+ def when_i_click_the_link_to_the_guidance_page
+ @lead_providers_page.learn_to_manage_ecf_partnerships
+ end
+
+ def given_i_am_on_the_lead_provider_landing_page
+ @lead_providers_page = Pages::LeadProviderLandingPage.load
+ expect(@lead_providers_page).to be_displayed
+ end
+
+ def then_i_am_on_the_lead_providers_partnership_guide_page
+ @guidance_page = Pages::LeadProviderPartnershipGuidancePage.new
+ expect(@guidance_page).to be_displayed
+ end
+end
diff --git a/spec/support/features/pages/admin_support/admin_participant_identity_validation.rb b/spec/support/features/pages/admin_support/admin_participant_identity_validation.rb
new file mode 100644
index 00000000000..01ad41f2fee
--- /dev/null
+++ b/spec/support/features/pages/admin_support/admin_participant_identity_validation.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+require_relative "../base_page"
+
+module Pages
+ class AdminParticipantIdentityValidation < ::Pages::BasePage
+ set_url "/admin/participants/{participant_id}/validations/identity"
+
+ set_primary_heading("Identity confirmation")
+
+ element :rejected, "label", text: "Rejected"
+ element :approved, "label", text: "Approved"
+ element :decision_notes, "textarea#profile-validation-decision-note-field"
+ element :confirm_button, "button", text: "Confirm decision"
+ end
+end
diff --git a/spec/support/features/pages/admin_support/admin_support_participant_detail.rb b/spec/support/features/pages/admin_support/admin_support_participant_detail.rb
index efe055aa351..8a030dc5a37 100644
--- a/spec/support/features/pages/admin_support/admin_support_participant_detail.rb
+++ b/spec/support/features/pages/admin_support/admin_support_participant_detail.rb
@@ -6,7 +6,7 @@ module Pages
class AdminSupportParticipantDetail < ::Pages::BasePage
set_url "/admin/participants/{participant_id}/details"
# this is a hack as the participants name is the page title
- set_primary_heading(/^(.*) - Details$/)
+ set_primary_heading(/^(.*)Details$/)
def has_training_record_state?(validation_status)
# TODO: get language from language files
@@ -54,5 +54,11 @@ def open_training_tab
Pages::AdminSupportParticipantTraining.loaded
end
+
+ def edit_identity_confirmation
+ click_on "View identity confirmation"
+
+ Pages::AdminParticipantIdentityValidation.loaded
+ end
end
end
diff --git a/spec/support/features/pages/admin_support/admin_support_participant_list.rb b/spec/support/features/pages/admin_support/admin_support_participant_list.rb
index efa4e71a002..190a9fced14 100644
--- a/spec/support/features/pages/admin_support/admin_support_participant_list.rb
+++ b/spec/support/features/pages/admin_support/admin_support_participant_list.rb
@@ -6,7 +6,20 @@ module Pages
class AdminSupportParticipantList < ::Pages::BasePage
set_url "/admin/participants"
# this is a hack as the participants name is the page title
- set_primary_heading(/^.*$/)
+ set_primary_heading("Participants")
+
+ element :search_field, "input#query-field"
+ element :search_button, 'button[data-test="search-button"'
+
+ sections :search_results, 'table[data-test="admin-participants-table"] > tbody > tr' do
+ element :full_name, 'td[data-test="full-name"'
+ element :role, 'td[data-test="role"'
+ element :trn, 'td[data-test="trn"'
+ element :school_name, 'td[data-test="school-name"'
+ element :school_urn, 'td[data-test="school-urn"'
+ element :date_added, 'td[data-test="date-added"'
+ element :training_record_state, 'td[data-test="training-record-state"'
+ end
def view_participant(participant_name)
click_on participant_name
diff --git a/spec/support/features/pages/lead_provider/check_schools_page.rb b/spec/support/features/pages/lead_provider/check_schools_page.rb
index 9ae89c33eaa..de4db6776cb 100644
--- a/spec/support/features/pages/lead_provider/check_schools_page.rb
+++ b/spec/support/features/pages/lead_provider/check_schools_page.rb
@@ -24,5 +24,9 @@ def download_schools_for_2021
def has_schools_recruited?(num_schools)
expect(page).to have_content "#{num_schools} Schools recruited"
end
+
+ def search
+ click_on "Search"
+ end
end
end
diff --git a/spec/support/features/pages/lead_provider/lead_provider_landing_page.rb b/spec/support/features/pages/lead_provider/lead_provider_landing_page.rb
index d0b4e84b32d..e4884f9f2b5 100644
--- a/spec/support/features/pages/lead_provider/lead_provider_landing_page.rb
+++ b/spec/support/features/pages/lead_provider/lead_provider_landing_page.rb
@@ -16,7 +16,7 @@ def get_started
def learn_to_manage_ecf_partnerships
click_on "How to manage ECF partnerships"
- raise "Not yet implemented"
+ Pages::LeadProviderPartnershipGuidancePage.loaded
end
end
end
diff --git a/spec/support/features/pages/lead_provider/lead_provider_partnership_guidance_page.rb b/spec/support/features/pages/lead_provider/lead_provider_partnership_guidance_page.rb
new file mode 100644
index 00000000000..9b030c3d784
--- /dev/null
+++ b/spec/support/features/pages/lead_provider/lead_provider_partnership_guidance_page.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+require_relative "../base_page"
+
+module Pages
+ class LeadProviderPartnershipGuidancePage < ::Pages::BasePage
+ set_url "/lead-providers/partnership-guide"
+ set_primary_heading "Guide for providers to manage their schools on the ECF service"
+ end
+end
|