Skip to content

Commit

Permalink
Merge pull request #69 from ministryofjustice/CBA-128-re-order-the-ad…
Browse files Browse the repository at this point in the history
…d-bail-hearing-information-task

CBA-128: reorder the add bail hearing information task
  • Loading branch information
patrickjfl authored Jan 27, 2025
2 parents 0bd2c01 + 74c4738 commit 194678a
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion e2e-tests/steps/bailInformationSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export const completeBailHearingInformationTask = async (page: Page, name: strin
await taskListPage.clickTask('Add bail hearing information')

await completeBailHearingArrangerPage(page)
await completeCourtNamePage(page, name)
await completeBailHearingDatePage(page, name)
await completeCourtNamePage(page, name)
await completeBailHearingMediumPage(page, name)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('BailHearingArranger', () => {
const application = applicationFactory.build({ person: personFactory.build({ name: 'Roger Smith' }) })

itShouldHavePreviousValue(new BailHearingArranger({}, application), 'taskList')
itShouldHaveNextValue(new BailHearingArranger({ bailHearingArranger: 'applicant' }, application), 'court-name')
itShouldHaveNextValue(new BailHearingArranger({ bailHearingArranger: 'applicant' }, application), 'bail-hearing-date')

describe('items', () => {
it('returns the radio with the expected label text', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class BailHearingArranger implements TaskListPage {
}

next() {
return 'court-name'
return 'bail-hearing-date'
}

items() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { applicationFactory, personFactory } from '../../../../testutils/factori
describe('BailHearingDate', () => {
const application = applicationFactory.build({ person: personFactory.build({ name: 'Roger Smith' }) })

itShouldHavePreviousValue(new BailHearingDate({}, application), 'court-name')
itShouldHaveNextValue(new BailHearingDate({}, application), 'bail-hearing-medium')
itShouldHavePreviousValue(new BailHearingDate({}, application), 'bail-hearing-arranger')
itShouldHaveNextValue(new BailHearingDate({}, application), 'court-name')

describe('response', () => {
describe('when a date is provided', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ export default class BailHearingDate implements TaskListPage {
}

previous() {
return 'court-name'
return 'bail-hearing-arranger'
}

next() {
return 'bail-hearing-medium'
return 'court-name'
}

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

const questions = getQuestions('Roger Smith')['bail-hearing-information']['bail-hearing-medium']

itShouldHavePreviousValue(new BailHearingMedium({}, application), 'bail-hearing-date')
itShouldHavePreviousValue(new BailHearingMedium({}, application), 'court-name')
itShouldHaveNextValue(new BailHearingMedium({}, application), '')

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

previous() {
return 'bail-hearing-date'
return 'court-name'
}

next() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ import { applicationFactory, personFactory } from '../../../../testutils/factori
describe('CourtName', () => {
const application = applicationFactory.build({ person: personFactory.build({ name: 'Roger Smith' }) })

itShouldHavePreviousValue(new CourtName({}, application), 'bail-hearing-arranger')
itShouldHaveNextValue(new CourtName({}, application), 'bail-hearing-date')
itShouldHavePreviousValue(new CourtName({}, application), 'bail-hearing-date')
itShouldHaveNextValue(new CourtName({}, application), 'bail-hearing-medium')
})
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ export default class CourtName implements TaskListPage {
}

previous() {
return 'bail-hearing-arranger'
return 'bail-hearing-date'
}

next() {
return 'bail-hearing-date'
return 'bail-hearing-medium'
}

errors() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ import BailHearingMedium from './bailHearingMedium'
@Task({
name: 'Add bail hearing information',
slug: 'bail-hearing-information',
pages: [BailHearingArranger, CourtName, BailHearingDate, BailHearingMedium],
pages: [BailHearingArranger, BailHearingDate, CourtName, BailHearingMedium],
})
export default class BailHearingInformation {}

0 comments on commit 194678a

Please sign in to comment.