Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
d2cb364
Added new routing screens for form creators
christophercameron-ixd Mar 13, 2025
a18caee
Updated session data to match latest page data
christophercameron-ixd Mar 13, 2025
9dbd569
Updated check your answers preview to only show the questions someone…
christophercameron-ixd Mar 13, 2025
b62f13d
Joined up routing creation screens, with simple errors
christophercameron-ixd Mar 13, 2025
9a334f8
Updated preview routing to create CYA version of pages and to use new…
christophercameron-ixd Mar 13, 2025
c377e26
Added playback of routes to question list view
christophercameron-ixd Mar 13, 2025
ed25ae5
removed unnecessary file
christophercameron-ixd Mar 13, 2025
e74d7b2
Added new skip to page for testing
christophercameron-ixd Mar 13, 2025
005b097
Fixed issues with comparisons
christophercameron-ixd Mar 13, 2025
a3479d4
Updated summary screen to new content a button/link based journey
christophercameron-ixd Mar 13, 2025
b4dd3a1
New route for new screen added
christophercameron-ixd Mar 13, 2025
2d92fc8
Updated to use nunjucks component and fixed non working data items
christophercameron-ixd Mar 18, 2025
58323ef
Added route for any other answer to choose different skip from questi…
christophercameron-ixd Mar 18, 2025
1879d74
Changed to nunjucks components. Changed data items so users can make …
christophercameron-ixd Mar 18, 2025
8ab1310
Changed dummy questions so it is quicker to test and develop
christophercameron-ixd Mar 18, 2025
4d78b4c
Added new route for any other answer playback. Made it easier to use …
christophercameron-ixd Mar 18, 2025
4733206
Added route for any other answer to question list view. Also added so…
christophercameron-ixd Mar 18, 2025
06acc0f
Added routing to handle multiple routes. (lots of comments to explain…
christophercameron-ixd Mar 18, 2025
b75c4b8
Added route for any other routing to question order in preview
christophercameron-ixd Mar 18, 2025
6f39acd
Added return journey check to add a question route to see if a route …
christophercameron-ixd Mar 18, 2025
2b56580
Changed to use nunjucks component
christophercameron-ixd Mar 18, 2025
698dd32
Fixed bug to allow first question to be the start of a route
christophercameron-ixd Mar 18, 2025
9d8a85d
Updated packages
christophercameron-ixd Mar 18, 2025
31bb274
Updates
christophercameron-ixd Mar 18, 2025
ac9783a
Fixed showing the wrong uqestion numbers and titles
christophercameron-ixd Mar 18, 2025
f9b5d99
Fixed missing word and use of comma instead of full stop
christophercameron-ixd Mar 19, 2025
04e0070
Hide save and preview button for testing
christophercameron-ixd Mar 25, 2025
3d5072d
Added new are you sure question page when deleting route 1 or all routes
christophercameron-ixd Mar 25, 2025
985cc60
Added new are you sure question page when deleting route for any othe…
christophercameron-ixd Mar 25, 2025
9b03c11
Fixed missing inline error
christophercameron-ixd Mar 25, 2025
987a099
Fixed missing inline errors. Hide ‘change’ link if editing existing r…
christophercameron-ixd Mar 25, 2025
30c9eb4
Fixed missing inline error
christophercameron-ixd Mar 25, 2025
05279a4
Fixed missing inline error
christophercameron-ixd Mar 25, 2025
9df51a1
Added action value to delete all routes button to use in routing
christophercameron-ixd Mar 25, 2025
1d2e1ca
Added routing to allow route deletion
christophercameron-ixd Mar 25, 2025
aa64397
Fix inability to update page question text
christophercameron-ixd Mar 25, 2025
61182e8
Added successMessage banners to creation and deletion of routing jour…
christophercameron-ixd Mar 26, 2025
3c11067
Added default username data attribute
christophercameron-ixd Mar 26, 2025
ea661c3
Added dummy form session data for testing
christophercameron-ixd Mar 26, 2025
5f5ef02
Aligned landing screens more closely with build environment
christophercameron-ixd Mar 26, 2025
d9acbc3
Aligned more closely with development environment
christophercameron-ixd Mar 26, 2025
97386f2
Updated back links to align with development
christophercameron-ixd Mar 26, 2025
8cc7f10
Reformatted default session data, removing duplicate items that aren’…
christophercameron-ixd Mar 26, 2025
d19e3fc
Removed unnecessary router.use
christophercameron-ixd Mar 26, 2025
a90d135
Added descriptions to return default session data
christophercameron-ixd Mar 26, 2025
9c26652
Tiny bit of code simplification
christophercameron-ixd Mar 27, 2025
322654c
Update link to default data incase this is easier for testing
christophercameron-ixd Mar 27, 2025
07b8e88
Started outlining default session data for the different sections on …
christophercameron-ixd Mar 27, 2025
14f5ec2
Fix displaying ‘in progress’ when declaration not started
christophercameron-ixd Mar 27, 2025
f6e8256
Added routes section where a route has been added or can be added to …
christophercameron-ixd Mar 27, 2025
f6a986f
Fixed issue with select item being checked due to incorrect value
christophercameron-ixd Mar 27, 2025
a67fcee
Added routing to ‘live’ form questions view
christophercameron-ixd Mar 27, 2025
124a7ca
Fixed declaration displaying in progress before it has been started
christophercameron-ixd Mar 27, 2025
704d147
Updated to add missing content
christophercameron-ixd Mar 27, 2025
c7ec1c6
Removed unused/unnecessary code
christophercameron-ixd Mar 27, 2025
31428b9
Removed unused/unnecessary code
christophercameron-ixd Mar 27, 2025
1ed171b
Updated dummy content to match Mural board for testing
christophercameron-ixd Mar 27, 2025
109c563
Added new questions to dummy form for testing
christophercameron-ixd Mar 28, 2025
d7c4901
Fixed typos and added optional question
christophercameron-ixd Mar 28, 2025
fe0a6bc
Reordering selection options for testing
christophercameron-ixd Apr 2, 2025
7ec3d6a
Commented out a bit of issue code for testing
christophercameron-ixd Apr 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 109 additions & 50 deletions app/data/returning-session-data-defaults-a11y.js
Original file line number Diff line number Diff line change
@@ -1,73 +1,132 @@
/*

Provide default values for user session data. These are automatically added
via the `autoStoreData` middleware. Values will only be added to the
session if a value doesn't already exist. This may be useful for testing
journeys where users are returning or logging in to an existing application.

============================================================================

Example usage:

"full-name": "Sarah Philips",

"options-chosen": [ "foo", "bar" ]

============================================================================
This is the latest version of return data for a dummy form to be used in testing the branching journey:
created 26 March 2025
testing: week commencing 31 March 2025

*/

module.exports = {
highestPageId: 6,
action: 'gogogo',
publish: 'GOV.UK',
authentication: 'email',
payments: 'no',
/* Dummy form settings */
formTitle: 'Tell us about a complaint, concern or error',
status: 'Draft',

// Form tasks
isQuestionsComplete: 'no',
// checkAnswersDeclaration
isDeclarationComplete: 'no',
// confirmationNext
isConfirmationComplete: 'no',
// formsEmail
isSubmissionEmailComplete: 'no',
// confirmationCode
isConfirmationCodeComplete: 'no',
// privacyInformation
isPrivacyInformationComplete: 'no',
// supportDetails - emailSupport, phoneSupport, onlineSupportLink, onlineSupportText
isSupportDetailsComplete: 'no',
// makeFormLive
isFormLive: 'no',

// Form questions
highestPageId: 7,
pages: [
{
'long-title': 'What type of animal is your pet?',
'short-title': 'Animal type',
'hint-text': 'For example a bird, cat, dog.',
type: 'text',
pageIndex: '0'
pageIndex: '0',
type: 'select',
'long-title': 'Which of these do you want to do today?',
'item-list': [
"Report an error",
"Make a complaint",
"Raise a concern"
],
'listSettings': [
"oneOption"
],
'additional-guidance': 'No',
'questionSaved': 'Yes'
},
{
pageIndex: '1',
type: 'select',
'long-title': 'What does your complaint or concern relate to?',
'item-list': [
"Service",
"Access",
"Availability",
"Something else"
],
'listSettings': [
"oneOption"
],
'additional-guidance': 'No',
'questionSaved': 'Yes'
},
{
'long-title': 'What is the name of your pet?',
'short-title': 'Pet name',
pageIndex: '2',
type: 'text',
pageIndex: '1'
input: "multi-line-input",
'long-title': 'Please give full details of your complaint or concern',
'additional-guidance': 'No',
'questionSaved': 'Yes'
},
{
'long-title': 'Where are you travelling to?',
'short-title': 'Destination',
'hint-text': 'For example Lisbon, Portugal',
pageIndex: '3',
type: 'select',
'long-title': 'Have you contacted us about this before?',
'item-list': [
"Yes",
"No"
],
'listSettings': [
"oneOption"
],
'additional-guidance': 'No',
'questionSaved': 'Yes'
},
{
pageIndex: '4',
type: 'text',
pageIndex: '2'
input: "single-line-input",
'long-title': 'What were you trying to do when the error happend?',
'additional-guidance': 'No',
'questionSaved': 'Yes'
},
{
'long-title': 'What date do you travel?',
'short-title': 'Date',
'hint-text': 'For example 27 3 2007',
type: 'date',
pageIndex: '3'
pageIndex: '5',
type: 'text',
input: "multi-line-input",
'long-title': 'Please tell us what happened when the error occurred',
'additional-guidance': 'No',
'questionSaved': 'Yes'
},
{
'long-title': 'How are you travelling?',
'short-title': 'Transport type',
'hint-text': 'For example plane, train, car.',
pageIndex: '6',
type: 'text',
pageIndex: '4'
input: "multi-line-input",
'long-title': 'What did you do, if anything, to work around the error?',
'additional-guidance': 'No',
"questionOptional": [
"questionOptional"
],
'questionSaved': 'Yes'
},
{
'long-title': 'How many pets do you have?',
'short-title': 'Number of pets',
type: 'number',
pageIndex: '5'
pageIndex: '7',
type: 'select',
'long-title': 'How would you rate your overall experience of using the service?',
'item-list': [
"Very poor",
"Poor",
"Neutral",
"Good",
"Very good"
],
'listSettings': [
"oneOption"
],
'additional-guidance': 'No',
'questionSaved': 'Yes'
}
],
status: 'Draft',
confirmationTitle: 'Your form has been submitted',
checkAnswersTitle: 'Check your answers before submitting your form',
formTitle: 'Take your pet abroad',
isQuestionsComplete: 'no'
]
}
32 changes: 8 additions & 24 deletions app/data/returning-session-data-defaults.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
/*

Provide default values for user session data. These are automatically added
via the `autoStoreData` middleware. Values will only be added to the
session if a value doesn't already exist. This may be useful for testing
journeys where users are returning or logging in to an existing application.

============================================================================

Example usage:

"full-name": "Sarah Philips",

"options-chosen": [ "foo", "bar" ]

============================================================================
This data is for a dummy form - it was previously used in earlier rounds of testing
Not all the structure of the questions will work and may cause some errors throughout the prototype

*/

module.exports = {
/* Dummy form settings */
formTitle: 'Amendment form: redundancy claim for holiday pay',
status: 'Draft',

// Form questions
highestPageId: 6,
action: 'gogogo',
publish: 'GOV.UK',
authentication: 'email',
payments: 'no',
pages: [
{
intro: 'This is the intro',
Expand Down Expand Up @@ -80,10 +69,5 @@ module.exports = {
type: 'number',
pageIndex: '7'
}
],
status: 'Draft',
confirmationTitle: 'Your form has been submitted',
checkAnswersTitle: 'Check your answers before submitting your form',
formTitle: 'Amendment form: redundancy claim for holiday pay',
isQuestionsComplete: 'no'
]
}
45 changes: 38 additions & 7 deletions app/data/session-data-defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,55 +19,86 @@ Example usage:

module.exports = {

// Insert values here
// Account settings
defaultUser: 'Firstname Ipsum',

highestPageId: 0,
action: '',
publish: 'GOV.UK',
// Group settings
defaultGroup: 'Departmental contact forms',

// Default form data and settings
authentication: 'email',
payments: 'no',
publish: 'GOV.UK',

// Placeholders to avoid errors
// Form questions
highestPageId: 0,
pages: [],
// Form status
status: 'Draft',
confirmationTitle: 'Your form has been submitted',
// Button actions value - used for ‘continue’, ‘save’, ‘delete’ or any other secondary grey button action
action: '',

/* STATIC CONTENT
================= */

// Check your answers page
checkAnswersTitle: 'Check your answers before submitting your form',
// Confirmation page
confirmationTitle: 'Your form has been submitted',

/* Answer type hints and input type content */

// Person name
personNameQuestionHint: 'Ask the question the way you would in person. For example, ‘What’s your name?’',
personNameHintHint: 'You can add a short hint to help people answer the question. For example, you might need to ask people to enter their name as it’s written on an official document such as a passport or driving licence.',
personNameInputTypeTitle: 'Name fields',

// Company name
companyNameQuestionHint: 'Ask the question the way you would in person. For example, ‘What’s the name of the organisation?’',
companyNameHintHint: 'You can add a short hint to help people answer the question. For example, you might need to ask people to enter the registered name of their company.',

// Email
emailQuestionHint: 'Ask the question the way you would in person. For example, ‘What’s your email address?’',
emailHintHint: 'You could use hint text to tell people how you’ll use their email address. For example, ‘We’ll only use your email address to contact you about your application.’',

// Telephone
phoneQuestionHint: 'Ask the question the way you would in person. For example, ‘What’s your phone number?’',
phoneHintHint: 'You can add a short hint to help people answer the question. For example, ‘You can provide either a home or mobile phone number.’',

// National Insurance number (NINo)
ninoQuestionHint: 'Ask the question the way you would in person. For example, ‘What’s your National Insurance number?’',
ninoHintHint: 'You can add a short hint to help people answer the question. For example, ‘It’s on your National Insurance card, benefit letter, payslip or P60. For example, QQ 12 34 56 C.’',

// Address
addressQuestionHint: 'Ask the question the way you would in person. For example, ‘What’s your address?’',
addressHintHint: 'You could use hint text to tell people how you’ll use their address. For example, ‘We’ll send your licence to this address.’',
addressInputTypeTitle: 'Address type',

dobQuestionHint: 'Ask the question the way you would in person. For example, ‘What’s your date of birth?’',
dobHintHint: 'You can add a short hint to help people answer the question. For a date of birth question you could use ‘For example, 27 3 1998’.',
// Date
dateQuestionHint: 'Ask the question the way you would in person. For example, ‘What date was your passport issued?’',
dateHintHint: 'You can add a short hint to help people answer the question. For a date question you could use ‘For example, 27 3 2007’.',

// Date of birth (DOB)
dobQuestionHint: 'Ask the question the way you would in person. For example, ‘What’s your date of birth?’',
dobHintHint: 'You can add a short hint to help people answer the question. For a date of birth question you could use ‘For example, 27 3 1998’.',
dateOfBirthInputTypeTitle: 'Date of birth',

// Selection - radio, checkbox or autocomplete (build only)
selectionOneOptionQuestionHint: 'Ask the question the way you would in person. For example, ‘What country do you live in?’',
selectionOneOptionHintHint: 'You can add a short hint to help people answer the question. For a question where people can only select one answer you might want to use ‘Select one option’.',
selectionMultipleOptionsQuestionHint: 'Ask the question the way you would in person. For example, ‘Which of these countries have you lived in?’',
selectionMultipleOptionsHintHint: 'You can add a short hint to help people answer the question. For a question where people can select more than one answer you might want to use ‘Select all that apply’.',

// Number
numberQuestionHint: 'Ask the question the way you would in person. For example, ‘How many holiday days do you get a year?’',
numberHintHint: 'You can add a short hint to help people answer the question. For example, ‘Do not include bank holidays’.',

// Text - single line
textSingleLineQuestionHint: 'Ask the question the way you would in person. For example, ‘What’s your reference number?’',
textSingleLineHintHint: 'You can add a short hint to help people answer the question. For example, you could say what format the answer should be in or where to find it.',

// Textarea - multiple line
textMultipleLinesQuestionHint: 'Ask the question the way you would in person. For example, ‘Why do you want to apply for this role?’',
textMultipleLinesHintHint: 'You can add a short hint to help people answer the question. For example, you could give a bit more detail about the information you need.',
textLengthInputTypeTitle: 'Length'
Expand Down
Loading