-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from DEFRA/601
[601] destination summary page
- Loading branch information
Showing
35 changed files
with
503 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { Page } from '../../common/model/page/page-model.js' | ||
import { ExitPage } from '../../common/model/page/exit-page-model.js' | ||
|
||
export class DestinationExitPage extends Page { | ||
export class DestinationExitPage extends ExitPage { | ||
urlPath = '/destination/can-not-use-service' | ||
} | ||
export const destinationExitPage = new DestinationExitPage() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ExitPage } from '../../common/model/page/exit-page-model.js' | ||
import { destinationExitPage } from './index.js' | ||
|
||
describe('DestinationExitPage', () => { | ||
it('should be an exit page', () => { | ||
expect(destinationExitPage).toBeInstanceOf(ExitPage) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,25 @@ | ||
import SummaryPage from '../../common/model/page/summary-page/SummaryPageModel.js' | ||
import { SummaryPageController } from '../../common/controller/summary-page-controller/SummaryPageController.js' | ||
|
||
import { DestinationSection } from '~/src/server/common/model/section/destination/destination.js' | ||
|
||
export class DestinationSummaryPage extends SummaryPage { | ||
urlPath = '/destination/check-answers' | ||
pageTitle = 'Check your answers before you continue your application' | ||
pageHeading = 'Check your answers before you continue your application' | ||
sectionKey = 'destination' | ||
urlPath = `/${this.sectionKey}/check-answers` | ||
sectionFactory = (data) => DestinationSection.fromState(data) | ||
} | ||
|
||
export const destinationSummaryPage = new DestinationSummaryPage() | ||
|
||
/** | ||
* @satisfies {ServerRegisterPluginObject<void>} | ||
*/ | ||
export const destinationSummary = new SummaryPageController( | ||
new DestinationSummaryPage() | ||
).plugin() | ||
|
||
/** | ||
* @import { ServerRegisterPluginObject } from '@hapi/hapi' | ||
*/ |
Oops, something went wrong.