Skip to content

Commit

Permalink
Move head teacher question
Browse files Browse the repository at this point in the history
Previously this question was in the personal details section of the
journey. We want to move this question to come after the confirm school
page after feedback from the IRP demo.
  • Loading branch information
rjlynch committed Jul 9, 2024
1 parent 781e72a commit 7a7185d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ def eligibility_answers
a << application_route
a << state_funded_secondary_school
a << current_school
a << school_headteacher_name
a << contract_details
a << start_date_details
a << subject_details
Expand All @@ -23,12 +24,6 @@ def identity_answers
end
end

def employment_answers
[].tap do |a|
a << school_headteacher_name
end
end

private

def show_trn?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class SlugSequence
"application-route",
"state-funded-secondary-school",
"current-school",
"headteacher-details",
"contract-details",
"start-date",
"subject",
Expand All @@ -16,7 +17,6 @@ class SlugSequence
PERSONAL_DETAILS_SLUGS = [
"nationality",
"passport-number",
"headteacher-details",
"personal-details",
"postcode-search",
"select-home-address",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@
}
) %>

<%= render(
partial: "claims/check_your_answers_section",
locals: {
heading: "Employment information",
answers: journey.answers_for_claim(@form.journey_session).employment_answers
}
) %>

<%= render(
partial: "claims/check_your_answers_section",
locals: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,15 @@
bank_account_number { rand(10000000..99999999) }
end

trait :with_employment_details do
trait :with_headteacher_details do
school_headteacher_name { "Seymour Skinner" }
end

trait :eligible_teacher do
with_teacher_application_route
with_state_funded_secondary_school
with_current_school
with_headteacher_details
with_one_year_contract
with_start_date
with_visa
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
:with_teacher_application_route,
:with_state_funded_secondary_school,
:with_current_school,
:with_headteacher_details,
:with_one_year_contract,
:with_start_date,
:with_subject,
Expand All @@ -32,15 +33,20 @@
"I am employed as a teacher in a school in England",
"application-route"
],
[
"Are you employed by an English state secondary school?",
"Yes",
"state-funded-secondary-school"
],
[
"Which school are you currently employed to teach at?",
answers.current_school.name,
"current-school"
],
[
"Are you employed by an English state secondary school?",
"Yes",
"state-funded-secondary-school"
"Enter the name of the headteacher of the school where you are employed as a teacher",
"Seymour Skinner",
"headteacher-details"
],
[
"Are you employed on a contract lasting at least one year?",
Expand Down Expand Up @@ -97,25 +103,4 @@
)
end
end

describe "#employment_answers" do
subject { presenter.employment_answers }

let(:answers) do
build(
:get_a_teacher_relocation_payment_answers,
:with_employment_details
)
end

it do
is_expected.to include(
[
"Enter the name of the headteacher of the school where you are employed as a teacher",
"Seymour Skinner",
"headteacher-details"
]
)
end
end
end

0 comments on commit 7a7185d

Please sign in to comment.