Skip to content

Commit

Permalink
Move Liaison and Diversion page to top of health needs task
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Fleming committed Jan 14, 2025
1 parent 7a1f3a4 commit 268b877
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion e2e-tests/steps/risksAndNeedsSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ export const completeHealthNeedsTask = async (page: Page, name: string) => {
await taskListPage.clickTask('Add health needs')

await reviewGuidancePage(page, name)
await completeLiaisonAndDiversionPage(page, name)
await completeSubstanceMisusePage(page, name)
await completePhysicalHealthPage(page, name)
await completeMentalHealthPage(page, name)
await completeCommunicationAndLanguagePage(page, name)
await completeLearningDifficultiesPage(page, name)
await completeBrainInjuryPage(page, name)
await completeLiaisonAndDiversionPage(page, name)
await completeOtherHealthPage(page, name)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('BrainInjury', () => {
})
})

itShouldHaveNextValue(new BrainInjury({}, application), 'liaison-and-diversion')
itShouldHaveNextValue(new BrainInjury({}, application), 'other-health')
itShouldHavePreviousValue(new BrainInjury({}, application), 'learning-difficulties')

describe('errors', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class BrainInjury implements TaskListPage {
}

next() {
return 'liaison-and-diversion'
return 'other-health'
}

errors() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Guidance', () => {
})
})

itShouldHaveNextValue(new Guidance({}, application), 'substance-misuse')
itShouldHaveNextValue(new Guidance({}, application), 'liaison-and-diversion')
itShouldHavePreviousValue(new Guidance({}, application), 'taskList')

describe('errors', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class Guidance implements TaskListPage {
}

next() {
return 'substance-misuse'
return 'liaison-and-diversion'
}

errors() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ describe('LiaisonAndDiversion', () => {
})
})

itShouldHaveNextValue(new LiaisonAndDiversion({}, application), 'other-health')
itShouldHavePreviousValue(new LiaisonAndDiversion({}, application), 'brain-injury')
itShouldHaveNextValue(new LiaisonAndDiversion({}, application), 'substance-misuse')
itShouldHavePreviousValue(new LiaisonAndDiversion({}, application), 'taskList')

describe('errors', () => {
describe('when top-level questions are unanswered', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ export default class LiaisonAndDiversion implements TaskListPage {
}

previous() {
return 'brain-injury'
return 'taskList'
}

next() {
return 'other-health'
return 'substance-misuse'
}

errors() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('SubstanceMisuse', () => {
})

itShouldHaveNextValue(new SubstanceMisuse({}, application), 'physical-health')
itShouldHavePreviousValue(new SubstanceMisuse({}, application), 'taskList')
itShouldHavePreviousValue(new SubstanceMisuse({}, application), 'liaison-and-diversion')

describe('errors', () => {
describe('when top-level questions are unanswered', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class SubstanceMisuse implements TaskListPage {
}

previous() {
return 'taskList'
return 'liaison-and-diversion'
}

next() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
{{ mojSideNavigation({
label: 'Health needs navigation',
items: [{
text: 'Liaison & Diversion',
href: paths.applications.pages.show({ id: applicationId, task: 'health-needs', page: 'liaison-and-diversion' }),
active: (pageName === 'liaison-and-diversion')
}, {
text: 'Substance misuse',
href: paths.applications.pages.show({ id: applicationId, task: 'health-needs', page: 'substance-misuse' }),
active: (pageName === 'substance-misuse')
Expand All @@ -46,10 +50,6 @@
text: 'Brain injury',
href: paths.applications.pages.show({ id: applicationId, task: 'health-needs', page: 'brain-injury' }),
active: (pageName === 'brain-injury')
}, {
text: 'Liaison & Diversion',
href: paths.applications.pages.show({ id: applicationId, task: 'health-needs', page: 'liaison-and-diversion' }),
active: (pageName === 'liaison-and-diversion')
}, {
text: 'Other health',
href: paths.applications.pages.show({ id: applicationId, task: 'health-needs', page: 'other-health' }),
Expand Down
2 changes: 1 addition & 1 deletion server/views/applications/pages/health-needs/guidance.njk
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
href: paths.applications.pages.show({
id: page.application.id,
task: 'health-needs',
page: 'substance-misuse'
page: 'liaison-and-diversion'
})
}) }}
</div>
Expand Down

0 comments on commit 268b877

Please sign in to comment.