hof 21.1.1 → 21.2.0-postcode-lookup-beta.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ {"parent":null,"pid":95186,"argv":["/Users/user/.nvm/versions/node/v20.9.0/bin/node","/Users/user/Documents/HO/HOF/hof/node_modules/.bin/_mocha","test/**/*.spec.js","sandbox/test/**/*.spec.js"],"execArgv":[],"cwd":"/Users/user/Documents/HO/HOF/hof","time":1724417191044,"ppid":95182,"coverageFilename":"/Users/user/Documents/HO/HOF/hof/.nyc_output/82018659-6ed5-4c90-89e1-5ba35c4091cf.json","externalId":"","uuid":"82018659-6ed5-4c90-89e1-5ba35c4091cf","files":["/Users/user/Documents/HO/HOF/hof/model/index.js","/Users/user/Documents/HO/HOF/hof/model/apis/axios-settings.js","/Users/user/Documents/HO/HOF/hof/components/index.js","/Users/user/Documents/HO/HOF/hof/components/address-lookup/index.js","/Users/user/Documents/HO/HOF/hof/components/address-lookup/default-model.js","/Users/user/Documents/HO/HOF/hof/components/address-lookup/defaults.js","/Users/user/Documents/HO/HOF/hof/components/clear-session/index.js","/Users/user/Documents/HO/HOF/hof/components/combine-and-loop-fields/index.js","/Users/user/Documents/HO/HOF/hof/components/date/index.js","/Users/user/Documents/HO/HOF/hof/components/date/fields.js","/Users/user/Documents/HO/HOF/hof/components/emailer/index.js","/Users/user/Documents/HO/HOF/hof/components/emailer/email-service.js","/Users/user/Documents/HO/HOF/hof/components/emailer/emailer.js","/Users/user/Documents/HO/HOF/hof/components/emailer/transports/index.js","/Users/user/Documents/HO/HOF/hof/components/emailer/transports/smtp.js","/Users/user/Documents/HO/HOF/hof/components/emailer/transports/ses.js","/Users/user/Documents/HO/HOF/hof/components/emailer/transports/stub.js","/Users/user/Documents/HO/HOF/hof/components/emailer/transports/debug.js","/Users/user/Documents/HO/HOF/hof/components/homeoffice-countries/index.js","/Users/user/Documents/HO/HOF/hof/config/component-defaults.js","/Users/user/Documents/HO/HOF/hof/components/notify/index.js","/Users/user/Documents/HO/HOF/hof/components/notify/notify.js","/Users/user/Documents/HO/HOF/hof/components/summary/index.js","/Users/user/Documents/HO/HOF/hof/config/rate-limits.js","/Users/user/Documents/HO/HOF/hof/middleware/rate-limiter.js","/Users/user/Documents/HO/HOF/hof/config/hof-defaults.js","/Users/user/Documents/HO/HOF/hof/components/session-timeout-warning/index.js","/Users/user/Documents/HO/HOF/hof/lib/logger.js","/Users/user/Documents/HO/HOF/hof/controller/base-controller.js","/Users/user/Documents/HO/HOF/hof/controller/formatting/index.js","/Users/user/Documents/HO/HOF/hof/controller/validation/index.js","/Users/user/Documents/HO/HOF/hof/controller/validation/validators.js","/Users/user/Documents/HO/HOF/hof/controller/validation/email.js","/Users/user/Documents/HO/HOF/hof/controller/validation-error.js","/Users/user/Documents/HO/HOF/hof/utilities/index.js","/Users/user/Documents/HO/HOF/hof/utilities/autofill/index.js","/Users/user/Documents/HO/HOF/hof/utilities/autofill/inputs.js","/Users/user/Documents/HO/HOF/hof/utilities/test-data/index.js","/Users/user/Documents/HO/HOF/hof/utilities/countries.js","/Users/user/Documents/HO/HOF/hof/utilities/helpers/index.js","/Users/user/Documents/HO/HOF/hof/utilities/reqres/index.js","/Users/user/Documents/HO/HOF/hof/config/sanitisation-rules.js","/Users/user/Documents/HO/HOF/hof/controller/formatting/formatters.js","/Users/user/Documents/HO/HOF/hof/controller/index.js","/Users/user/Documents/HO/HOF/hof/controller/behaviour-session.js","/Users/user/Documents/HO/HOF/hof/controller/behaviour-hooks.js","/Users/user/Documents/HO/HOF/hof/controller/controller.js","/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/behaviours/country-select.js","/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/index.js","/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/template-mixins.js","/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/render.js","/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/helpers.js","/Users/user/Documents/HO/HOF/hof/index.js","/Users/user/Documents/HO/HOF/hof/frontend/index.js","/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/index.js","/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/build/index.js","/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/build/config.js","/Users/user/Documents/HO/HOF/hof/frontend/template-partials/index.js","/Users/user/Documents/HO/HOF/hof/frontend/template-partials/translations/index.js","/Users/user/Documents/HO/HOF/hof/frontend/themes/index.js","/Users/user/Documents/HO/HOF/hof/frontend/themes/gov-uk/index.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/index.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/helpers.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/form-focus.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/progressive-reveal.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/validation.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/character-count.js","/Users/user/Documents/HO/HOF/hof/middleware/index.js","/Users/user/Documents/HO/HOF/hof/middleware/cookies.js","/Users/user/Documents/HO/HOF/hof/middleware/errors.js","/Users/user/Documents/HO/HOF/hof/middleware/not-found.js","/Users/user/Documents/HO/HOF/hof/middleware/deep-translate.js","/Users/user/Documents/HO/HOF/hof/lib/markdown.js","/Users/user/Documents/HO/HOF/hof/lib/router.js","/Users/user/Documents/HO/HOF/hof/wizard/index.js","/Users/user/Documents/HO/HOF/hof/wizard/behaviours/index.js","/Users/user/Documents/HO/HOF/hof/wizard/behaviours/complete.js","/Users/user/Documents/HO/HOF/hof/wizard/util/constants.js","/Users/user/Documents/HO/HOF/hof/lib/helpers.js","/Users/user/Documents/HO/HOF/hof/lib/health.js","/Users/user/Documents/HO/HOF/hof/lib/serve-static.js","/Users/user/Documents/HO/HOF/hof/lib/ga-tag.js","/Users/user/Documents/HO/HOF/hof/lib/sessions.js","/Users/user/Documents/HO/HOF/hof/lib/settings.js","/Users/user/Documents/HO/HOF/hof/build/index.js","/Users/user/Documents/HO/HOF/hof/config/builder-defaults.js","/Users/user/Documents/HO/HOF/hof/transpiler/index.js","/Users/user/Documents/HO/HOF/hof/transpiler/lib/compile.js","/Users/user/Documents/HO/HOF/hof/transpiler/lib/build.js","/Users/user/Documents/HO/HOF/hof/transpiler/lib/expand-dirs.js","/Users/user/Documents/HO/HOF/hof/transpiler/lib/aggregate.js","/Users/user/Documents/HO/HOF/hof/transpiler/lib/write-files.js","/Users/user/Documents/HO/HOF/hof/model/apis/index.js","/Users/user/Documents/HO/HOF/hof/model/apis/html-to-pdf-converter.js","/Users/user/Documents/HO/HOF/hof/wizard/model.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/back-links.js","/Users/user/Documents/HO/HOF/hof/wizard/util/helpers.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-complete.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-progress.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-session.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/csrf.js","/Users/user/Documents/HO/HOF/hof/sandbox/test/_unit/example_app/sections/summary-data-sections.spec.js","/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/sections/summary-data-sections.js","/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/lib/staticAppealStages.js","/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/fields.js","/Users/user/Documents/HO/HOF/hof/sandbox/test/helpers/utilities.js","/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/behaviours/international-number.js","/Users/user/Documents/HO/HOF/hof/lib/encryption.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/session.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/session-model.js"]}
@@ -0,0 +1 @@
1
+ {"processes":{"82018659-6ed5-4c90-89e1-5ba35c4091cf":{"parent":null,"children":[]}},"files":{"/Users/user/Documents/HO/HOF/hof/model/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/model/apis/axios-settings.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/address-lookup/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/address-lookup/default-model.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/address-lookup/defaults.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/clear-session/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/combine-and-loop-fields/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/date/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/date/fields.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/emailer/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/emailer/email-service.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/emailer/emailer.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/smtp.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/ses.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/stub.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/debug.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/homeoffice-countries/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/config/component-defaults.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/notify/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/notify/notify.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/summary/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/config/rate-limits.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/middleware/rate-limiter.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/config/hof-defaults.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/components/session-timeout-warning/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/lib/logger.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/controller/base-controller.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/controller/formatting/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/controller/validation/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/controller/validation/validators.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/controller/validation/email.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/controller/validation-error.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/utilities/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/utilities/autofill/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/utilities/autofill/inputs.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/utilities/test-data/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/utilities/countries.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/utilities/helpers/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/utilities/reqres/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/config/sanitisation-rules.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/controller/formatting/formatters.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/controller/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/controller/behaviour-session.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/controller/behaviour-hooks.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/controller/controller.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/behaviours/country-select.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/template-mixins.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/render.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/helpers.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/build/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/build/config.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/template-partials/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/template-partials/translations/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/themes/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/themes/gov-uk/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/helpers.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/form-focus.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/progressive-reveal.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/validation.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/character-count.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/middleware/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/middleware/cookies.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/middleware/errors.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/middleware/not-found.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/middleware/deep-translate.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/lib/markdown.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/lib/router.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/wizard/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/wizard/behaviours/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/wizard/behaviours/complete.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/wizard/util/constants.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/lib/helpers.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/lib/health.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/lib/serve-static.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/lib/ga-tag.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/lib/sessions.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/lib/settings.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/build/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/config/builder-defaults.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/transpiler/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/compile.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/build.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/expand-dirs.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/aggregate.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/write-files.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/model/apis/index.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/model/apis/html-to-pdf-converter.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/wizard/model.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/back-links.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/wizard/util/helpers.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-complete.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-progress.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-session.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/csrf.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/sandbox/test/_unit/example_app/sections/summary-data-sections.spec.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/sections/summary-data-sections.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/lib/staticAppealStages.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/fields.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/sandbox/test/helpers/utilities.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/behaviours/international-number.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/lib/encryption.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/session.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/session-model.js":["82018659-6ed5-4c90-89e1-5ba35c4091cf"]},"externalIds":{}}
@@ -0,0 +1,2 @@
1
+ {
2
+ }
@@ -2,6 +2,7 @@
2
2
 
3
3
  module.exports = {
4
4
  addressLookup: require('./address-lookup'),
5
+ postcodeLookup: require('./postcode-lookup'),
5
6
  clearSession: require('./clear-session'),
6
7
  combineAndLoopFields: require('./combine-and-loop-fields'),
7
8
  date: require('./date'),
@@ -0,0 +1,31 @@
1
+ /* eslint max-len: 0, no-process-env: 0 */
2
+
3
+ 'use strict';
4
+
5
+ module.exports = {
6
+ CANT_FIND: 'I cannot find the correct address',
7
+ CHANGE: 'Change postcode',
8
+ SEARCH_BY_POSTCODE: 'Search address by postcode',
9
+ POSTCODE_HEADING: 'What is your UK postcode?',
10
+ POSTCODE_LABEL: 'Postcode',
11
+ POSTCODE_HINT: 'Enter a full UK postcode, for example AA3 1AB',
12
+ ADDRESS_LOOKUP_HEADING: 'Select the main applicant’s address',
13
+ MANUAL_ADDRESS_HEADING: 'Enter the main applicant’s address',
14
+ MANUAL_ADDRESS_PARAGRAPH: 'This must match the applicant’s address in Home Office records.',
15
+ SEARCH_ERROR_HEADING: 'Sorry, there is a problem with the postcode search',
16
+ SELECT_LABEL: 'Select the address',
17
+ ADDRESS_LINE_1_LABEL: 'Address line 1',
18
+ ADDRESS_LINE_2_LABEL: 'Address line 2 (optional)',
19
+ TOWN_OR_CITY_LABEL: 'Town or city',
20
+ POSTCODE_MANUAL_LABEL: 'Postcode',
21
+ POSTCODE_ERROR: {
22
+ 'error-heading': 'Sorry, there is a problem with the postcode search',
23
+ 'lookup-problem-title': 'Address lookup problem - GOV.UK'
24
+ },
25
+ NO_ADDRESS_HEADING: 'No address found',
26
+ ENTER_MANUALLY: 'Enter address manually',
27
+ ADDRESS_LOOKUP_SEARCH_TITLE: 'Postcode lookup search - GOV.UK',
28
+ ADDRESS_LOOKUP_TITLE: 'Address lookup - GOV.UK',
29
+ ADDRESS_DETAILS_TITLE: 'Address details - GOV.UK',
30
+ ADDRESS_LOOKUP_PROBLEM_TITLE: 'Address lookup problem - GOV.UK'
31
+ };
@@ -0,0 +1,373 @@
1
+ /* eslint-disable func-names */
2
+ 'use strict';
3
+
4
+ const path = require('path');
5
+ const querystring = require('querystring');
6
+ const _ = require('lodash');
7
+ const { createLogger, format, transports } = require('winston');
8
+ const { combine, timestamp, json } = format;
9
+
10
+ const defaults = require('./defaults');
11
+
12
+ const PostcodeLookup = require('./postcode-lookup');
13
+
14
+ const logger = createLogger({
15
+ format: combine(timestamp(), json()),
16
+ transports: [new transports.Console({level: 'info', handleExceptions: true})]
17
+ });
18
+
19
+ const conditionalTranslate = (key, customFormTranslation) => {
20
+ let result = customFormTranslation(key);
21
+ if (result === key) {
22
+ result = null;
23
+ }
24
+ return result;
25
+ };
26
+
27
+ const getFields = (fieldPrefix, customFormTranslation, requiredValidate, req) => ({
28
+ [`${fieldPrefix}-postcode`]: {
29
+ label: conditionalTranslate(`fields.${fieldPrefix}-postcode.label`, customFormTranslation) ||
30
+ defaults.POSTCODE_LABEL,
31
+ labelClassName: 'visuallyhidden',
32
+ hint: conditionalTranslate(`fields.${fieldPrefix}-postcode.hint`, customFormTranslation) || defaults.POSTCODE_HINT,
33
+ mixin: 'input-text',
34
+ validate: requiredValidate ? ['required', 'postcodeValidation'] : 'postcodeValidation',
35
+ formatter: 'uppercase',
36
+ className: ['govuk-input', 'govuk-input--width-10']
37
+ },
38
+ [`${fieldPrefix}-select`]: {
39
+ label: conditionalTranslate(`fields.${fieldPrefix}-select.label`, customFormTranslation) || defaults.SELECT_LABEL,
40
+ mixin: 'radio-group',
41
+ validate: 'required',
42
+ options: req.sessionModel.get('addressesOptions')
43
+ },
44
+ [fieldPrefix]: {
45
+ label: conditionalTranslate(`fields.${fieldPrefix}.label`, customFormTranslation) || defaults.ADDRESS_LINE_1_LABEL,
46
+ mixin: 'input-text',
47
+ validate: 'required',
48
+ labelClassName: 'bold'
49
+ },
50
+ [`${fieldPrefix}-address-line-2`]: {
51
+ label: conditionalTranslate(`fields.${fieldPrefix}-address-line-2.label`, customFormTranslation) ||
52
+ defaults.ADDRESS_LINE_2_LABEL,
53
+ mixin: 'input-text',
54
+ 'ignore-defaults': true,
55
+ labelClassName: 'bold'
56
+ },
57
+ [`${fieldPrefix}-town-or-city`]: {
58
+ label: conditionalTranslate(`fields${fieldPrefix}-town-or-city.label`, customFormTranslation) ||
59
+ defaults.TOWN_OR_CITY_LABEL,
60
+ mixin: 'input-text',
61
+ validate: 'required',
62
+ 'ignore-defaults': true,
63
+ labelClassName: 'bold'
64
+ },
65
+ [`${fieldPrefix}-postcode-manual`]: {
66
+ label: conditionalTranslate(`fields.${fieldPrefix}-postcode-manual.label`, customFormTranslation) ||
67
+ defaults.POSTCODE_MANUAL_LABEL,
68
+ mixin: 'input-text',
69
+ validate: requiredValidate ? ['required', 'postcodeValidation'] : 'postcodeValidation',
70
+ formatter: 'uppercase',
71
+ className: ['govuk-input', 'govuk-input--width-10'],
72
+ labelClassName: 'bold'
73
+ }
74
+ });
75
+
76
+ const getConfig = fieldNamePrefix => ({
77
+ postcode: {
78
+ fields: [`${fieldNamePrefix}-postcode`],
79
+ template: 'postcode'
80
+ },
81
+ lookup: {
82
+ fields: [`${fieldNamePrefix}-select`],
83
+ template: 'address-lookup'
84
+ },
85
+ manual: {
86
+ fields: [`${fieldNamePrefix}`, `${fieldNamePrefix}-address-line-2`, `${fieldNamePrefix}-town-or-city`,
87
+ `${fieldNamePrefix}-postcode-manual`],
88
+ template: 'address'
89
+ },
90
+ postcodeSearchIssue: {
91
+ fields: [],
92
+ template: 'postcode-search-problem'
93
+ }
94
+ });
95
+
96
+ module.exports = config => {
97
+ let postcode = '';
98
+ let apiKey;
99
+ let apiURL;
100
+ let required;
101
+ let addressFieldNamePrefix;
102
+
103
+ if (config !== undefined) {
104
+ apiKey = config.apiKey;
105
+ apiURL = config.apiURL;
106
+ required = config.required;
107
+ addressFieldNamePrefix = config.addressFieldNamePrefix;
108
+ }
109
+
110
+ return superclass => class extends superclass {
111
+ configure(req, res, callback) {
112
+ req.query.step = req.query.step || 'postcode';
113
+ const subSteps = getConfig(addressFieldNamePrefix);
114
+ const step = subSteps[req.query.step];
115
+ _.merge(req.form.options, {
116
+ subSteps,
117
+ addressKey: addressFieldNamePrefix,
118
+ fields: _.pick(getFields(addressFieldNamePrefix, req.translate, required, req), step.fields),
119
+ apiError: null
120
+ });
121
+ if (step.template) {
122
+ req.form.options.template = path.resolve(__dirname, `./templates/${step.template}.html`);
123
+ }
124
+ super.configure(req, res, callback);
125
+ }
126
+
127
+ getNextStep(req, res, callback) {
128
+ const step = super.getNextStep(req, res, callback);
129
+
130
+ if (req.query.step === 'postcode' && req.form.values[`${addressFieldNamePrefix}-postcode`]) {
131
+ let nextSubStep = '';
132
+ // Go to manual entry page with pre-populated fields
133
+ nextSubStep = req.sessionModel.get(`${addressFieldNamePrefix}-addresses`) ? 'lookup' : 'address';
134
+ const qs = querystring.stringify(_.merge({}, req.query, {
135
+ step: nextSubStep
136
+ }));
137
+ return `?${qs}`;
138
+ } else if (req.query.step === 'lookup' && req.sessionModel.get(`${addressFieldNamePrefix}-select`) !== '') {
139
+ req.form.values[`${addressFieldNamePrefix}-select`] =
140
+ req.form.options.fields[`${addressFieldNamePrefix}-select`].apiAddress;
141
+ let nextSubStep = '';
142
+ nextSubStep = 'manual';
143
+ req.query.step = 'manual';
144
+ req.form.values.address = '';
145
+ const qs = querystring.stringify(_.merge({}, req.query, {
146
+ step: nextSubStep
147
+ }));
148
+ return `?${qs}`;
149
+ }
150
+ return step;
151
+ }
152
+
153
+ constructAddressLineValues(addressAttributes) {
154
+ const addressLines = {
155
+ addressLine1: '',
156
+ addressLine2: ''
157
+ };
158
+
159
+ if (addressAttributes.ORGANISATION_NAME !== undefined && addressAttributes.BUILDING_NAME !== undefined &&
160
+ addressAttributes.BUILDING_NUMBER !== undefined) {
161
+ addressLines.addressLine1 = addressAttributes.ORGANISATION_NAME + ', ' + addressAttributes.BUILDING_NAME;
162
+ addressLines.addressLine2 = addressAttributes.BUILDING_NUMBER + ' ' + addressAttributes.THOROUGHFARE_NAME;
163
+ } else if (addressAttributes.ORGANISATION_NAME !== undefined && addressAttributes.BUILDING_NAME !== undefined) {
164
+ addressLines.addressLine1 = addressAttributes.ORGANISATION_NAME + ', ' + addressAttributes.BUILDING_NAME;
165
+ addressLines.addressLine2 = addressAttributes.THOROUGHFARE_NAME;
166
+ } else if (addressAttributes.ORGANISATION_NAME !== undefined && addressAttributes.BUILDING_NUMBER !== undefined) {
167
+ addressLines.addressLine1 = addressAttributes.ORGANISATION_NAME;
168
+ addressLines.addressLine2 = addressAttributes.BUILDING_NUMBER + ' ' + addressAttributes.THOROUGHFARE_NAME;
169
+ } else if (addressAttributes.SUB_BUILDING_NAME !== undefined && addressAttributes.BUILDING_NUMBER !== undefined &&
170
+ addressAttributes.THOROUGHFARE_NAME !== undefined) {
171
+ addressLines.addressLine1 = addressAttributes.SUB_BUILDING_NAME + ', ' + addressAttributes.BUILDING_NUMBER +
172
+ ' ' + addressAttributes.THOROUGHFARE_NAME;
173
+ } else if (addressAttributes.BUILDING_NAME !== undefined && addressAttributes.THOROUGHFARE_NAME !== undefined) {
174
+ addressLines.addressLine1 = addressAttributes.BUILDING_NAME + ' ' + addressAttributes.THOROUGHFARE_NAME;
175
+ } else {
176
+ addressLines.addressLine1 = addressAttributes.BUILDING_NUMBER + ' ' + addressAttributes.THOROUGHFARE_NAME;
177
+ }
178
+
179
+ return addressLines;
180
+ }
181
+
182
+ buildAddressOptions(req, addresses) {
183
+ req.sessionModel.set('addressesOptions', addresses.map(obj => {
184
+ const addressLines = this.constructAddressLineValues(obj);
185
+ const addressValue = obj.ADDRESS;
186
+ const townOrCity = obj.POST_TOWN;
187
+ // Get element ID to be used in determining if radio button is checked in the saveValues section
188
+ const radioButtonId = `${addressFieldNamePrefix}-select-${obj.ADDRESS}`;
189
+ return {
190
+ elementId: radioButtonId,
191
+ label: addressValue,
192
+ value: addressValue,
193
+ addressLine1: addressLines.addressLine1,
194
+ addressLine2: addressLines.addressLine2,
195
+ townOrCity: townOrCity
196
+ };
197
+ }));
198
+ }
199
+
200
+ createRadioGroupField(req, addresses) {
201
+ req.form.options.fields[`${addressFieldNamePrefix}-select`] = {
202
+ mixin: 'radio-group',
203
+ legend: {
204
+ className: 'visuallyhidden'
205
+ },
206
+ className: 'govuk-radios--inline',
207
+ validate: ['required'],
208
+ options: req.sessionModel.get('addressesOptions')
209
+ };
210
+ req.sessionModel.set('addressCount', addresses.length);
211
+ }
212
+
213
+ getValues(req, res, callback) {
214
+ if (req.query.step === 'lookup') {
215
+ const addresses = req.sessionModel.get(`${addressFieldNamePrefix}-addresses`);
216
+ this.buildAddressOptions(req, addresses);
217
+ this.createRadioGroupField(req, addresses);
218
+ }
219
+ super.getValues(req, res, callback);
220
+ }
221
+
222
+ locals(req, res, callback) {
223
+ const isManualStep = req.query.step === 'manual';
224
+ const locals = super.locals(req, res, callback);
225
+ const sessionPostcode = req.sessionModel.get(`${addressFieldNamePrefix}-postcode`)?.replace(/[^\w]+/g, "").replace(/^(.*)(\d)/, "$1 $2");
226
+ const section = this.options.route.replace(/^\//, '');
227
+ const editLink = conditionalTranslate('pages.address-lookup.edit', req.translate) || defaults.CHANGE;
228
+ const searchByPostcodeLink = conditionalTranslate('pages.address.searchByPostcode', req.translate) ||
229
+ defaults.SEARCH_BY_POSTCODE;
230
+ const cantFind = conditionalTranslate('pages.address-lookup.cantfind', req.translate) || defaults.CANT_FIND;
231
+
232
+ if (isManualStep) {
233
+ req.form.values['postcode-manual'] = sessionPostcode;
234
+ }
235
+
236
+ let addressCount = '';
237
+ if (req.sessionModel.get('addressCount') === 1) {
238
+ addressCount = '1 address for ';
239
+ } else {
240
+ addressCount = req.sessionModel.get('addressCount') + ' addresses for ';
241
+ }
242
+
243
+ return _.merge({}, locals, {
244
+ enterManually: conditionalTranslate('pages.address.lookup.enter-manually', req.translate) ||
245
+ defaults.ENTER_MANUALLY,
246
+ postcodeHeading: conditionalTranslate('pages.postcode.postcode-heading', req.translate) ||
247
+ defaults.POSTCODE_HEADING,
248
+ addressLookupHeading: conditionalTranslate('pages.address-lookup.address-lookup-heading', req.translate) ||
249
+ defaults.ADDRESS_LOOKUP_HEADING,
250
+ manualAddressHeading: conditionalTranslate('pages.address-lookup.manual-address-heading', req.translate) ||
251
+ defaults.MANUAL_ADDRESS_HEADING,
252
+ manualAddressParagraph: conditionalTranslate('pages.address-lookup.manual-address-paragraph', req.translate) ||
253
+ defaults.MANUAL_ADDRESS_PARAGRAPH,
254
+ searchErrorHeading: conditionalTranslate('pages.postcode-search-problem.searchErrorHeading', req.translate) ||
255
+ defaults.POSTCODE_ERROR['error-heading'],
256
+ postcodeEntered: sessionPostcode,
257
+ addressesExist: (req.sessionModel.get(`${addressFieldNamePrefix}-addresses`) !== undefined &&
258
+ req.sessionModel.get(`${addressFieldNamePrefix}-addresses`).length > 0) ? true : false,
259
+ noAddressHeading: conditionalTranslate('pages.postcode-search-problem.noAddressHeading', req.translate) ||
260
+ defaults.NO_ADDRESS_HEADING,
261
+ addressCount: addressCount,
262
+ postcodeSearchTitle: conditionalTranslate('pages.postcode-search.title', req.translate) ||
263
+ defaults.ADDRESS_LOOKUP_SEARCH_TITLE,
264
+ addressLookupTitle: conditionalTranslate('pages.address-lookup.title', req.translate) ||
265
+ defaults.ADDRESS_LOOKUP_TITLE,
266
+ addressDetailsTitle: conditionalTranslate('pages.address-details.title', req.translate) ||
267
+ defaults.ADDRESS_DETAILS_TITLE,
268
+ lookupProblemTitle: conditionalTranslate('pages.address-lookup-problem.title', req.translate) ||
269
+ defaults.POSTCODE_ERROR['lookup-problem-title'],
270
+ route: this.options.route,
271
+ editLink,
272
+ cantFind,
273
+ searchByPostcodeLink,
274
+ section
275
+ });
276
+ }
277
+
278
+ async postcode(req, res, callback) {
279
+ // Clear the value stored in the addresses radio button group
280
+ req.sessionModel.set(`${addressFieldNamePrefix}-select`, '');
281
+ // Replace punctuation in postcode and call OS Places API to return list of addresses
282
+ const enteredPostcode = req.sessionModel.get(`${addressFieldNamePrefix}-postcode`)?.replace(/[^\w]+/g, "").replace(/^(.*)(\d)/, "$1 $2");
283
+
284
+ await PostcodeLookup(enteredPostcode, apiURL, apiKey)
285
+ .then(function (response) {
286
+ if(response.data) {
287
+ const addressList = [];
288
+ _.forOwn(response.data.results, function (value) {
289
+ addressList.push(value.DPA);
290
+ });
291
+
292
+ req.sessionModel.set(`${addressFieldNamePrefix}-addresses`, addressList);
293
+ return callback();
294
+ }
295
+ throw new Error('Unexpected postcode response data structure');
296
+ }).catch(error => {
297
+ return callback(error);
298
+ });
299
+ }
300
+
301
+ setupRadioButton(req, addresses) {
302
+ req.form.options.fields[`${addressFieldNamePrefix}-addresses`] = {
303
+ mixin: 'radio-group',
304
+ isPageHeading: true,
305
+ validate: ['required'],
306
+ options: addresses.map(obj => {
307
+ const addressValue = obj.ADDRESS;
308
+ return {
309
+ label: addressValue,
310
+ value: addressValue
311
+ };
312
+ })
313
+ };
314
+ }
315
+
316
+ clearAddressFieldValues(req) {
317
+ req.form.values[`${addressFieldNamePrefix}`] = '';
318
+ req.form.values[`${addressFieldNamePrefix}-address-line-2`] = '';
319
+ req.form.values[`${addressFieldNamePrefix}-town-or-city`] = '';
320
+ req.form.values[`${addressFieldNamePrefix}-postcode-manual`] = '';
321
+ }
322
+
323
+ setFieldValuesInManualEntryPage(req) {
324
+ const addressResult = req.form.options.fields[`${addressFieldNamePrefix}-select`].options.filter(obj => {
325
+ return obj.value === req.form.values[`${addressFieldNamePrefix}-select`].replace(/[!?<>{}]/g, '');
326
+ });
327
+ const addressLine1 = addressResult[0].addressLine1;
328
+ const addressLine2 = addressResult[0].addressLine2;
329
+ const townOrCity = addressResult[0].townOrCity;
330
+ req.form.values[`${addressFieldNamePrefix}`] = addressLine1;
331
+ req.form.values[`${addressFieldNamePrefix}-address-line-2`] = addressLine2;
332
+ req.form.values[`${addressFieldNamePrefix}-town-or-city`] = townOrCity;
333
+ req.form.values[`${addressFieldNamePrefix}-postcode-manual`] = postcode;
334
+ req.sessionModel.set('lookup-postcode', postcode);
335
+ req.sessionModel.set('lookup-address-line-1', addressLine1);
336
+ req.sessionModel.set('lookup-address-line-2', addressLine2);
337
+ req.sessionModel.set('lookup-town-or-city', townOrCity);
338
+
339
+ req.form.values[`${addressFieldNamePrefix}-select`] =
340
+ req.form.options.fields[`${addressFieldNamePrefix}-select`].apiAddress;
341
+ }
342
+
343
+ saveValues(req, res, callback) {
344
+ const step = req.query.step;
345
+ if (step === 'postcode') {
346
+ postcode = req.form.values[`${addressFieldNamePrefix}-postcode`]?.replace(/[^\w]+/g, "").replace(/^(.*)(\d)/, "$1 $2");
347
+ this.clearAddressFieldValues(req);
348
+ return this.postcode(req, res, err => {
349
+ if (err) {
350
+ logger.log({
351
+ level: 'info',
352
+ message: `Error returned by postcode API: ${err}`
353
+ });
354
+ req.sessionModel.set('addresses', []);
355
+ return res.redirect(req.baseUrl + '/postcode?step=postcodeSearchIssue');
356
+ }
357
+ return super.saveValues(req, res, callback);
358
+ });
359
+ } else if (step === 'lookup') {
360
+ this.setFieldValuesInManualEntryPage(req);
361
+ }
362
+ return super.saveValues(req, res, callback);
363
+ }
364
+
365
+ getBackLink(req, res) {
366
+ let backLink = super.getBackLink(req, res);
367
+ if (_.includes(['manual', 'address', 'lookup'], req.query.step)) {
368
+ backLink = req.baseUrl + req.path;
369
+ }
370
+ return backLink;
371
+ }
372
+ };
373
+ };
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+
3
+ const axios = require('axios');
4
+
5
+ const getAddresses = async (enteredPostcode, apiURL, apiKey) => {
6
+ try {
7
+ let addressesResult;
8
+ if (process.env.NODE_ENV === 'test') {
9
+ if (enteredPostcode === '') {
10
+ addressesResult = {};
11
+ } else {
12
+ addressesResult = {
13
+ data: {
14
+ results: [
15
+ {
16
+ DPA: {
17
+ ADDRESS: 'abc',
18
+ NUMBER: '1',
19
+ STREET_NAME: 'Test Lane',
20
+ TOWN: 'LONDON',
21
+ POSTCODE: 'ABC 123'
22
+ }
23
+ }
24
+ ]
25
+ }
26
+ };
27
+ }
28
+ return addressesResult;
29
+ }
30
+ addressesResult = await axios.get(apiURL + '?postcode=' + enteredPostcode + '&key=' + apiKey);
31
+ return addressesResult;
32
+ } catch (err) {
33
+ throw err;
34
+ }
35
+ };
36
+
37
+ module.exports = getAddresses;
@@ -0,0 +1,30 @@
1
+ {{<partials-page}}
2
+ {{$pageTitle}}{{addressLookupTitle}}{{/pageTitle}}
3
+ {{$page-content}}
4
+ {{#addressesExist}}
5
+ <h1 class="govuk-heading-l">{{addressLookupHeading}}</h1>
6
+ {{/addressesExist}}
7
+ {{^addressesExist}}
8
+ <h1 class="govuk-heading-l">{{noAddressHeading}}</h1>
9
+ {{/addressesExist}}
10
+ <div id="addressCountSection">
11
+ <label>{{addressCount}}</label>
12
+ <strong><span class="postcode">{{postcodeEntered}}</span></strong>
13
+ <span class="changePostcodeButton">
14
+ <a class="change-postcode govuk-button govuk-button--secondary" href="{{#qs}}step=postcode{{/qs}}">{{editLink}}</a>
15
+ </span>
16
+ </div>
17
+ {{#fields}}
18
+ {{#renderField}}{{/renderField}}
19
+ {{/fields}}
20
+ {{#addressesExist}}
21
+ {{#input-submit}}continue{{/input-submit}}
22
+ {{/addressesExist}}
23
+ {{#addressesExist}}
24
+ <p><span class="link"><a class="cant-find" href="{{#qs}}step=manual{{/qs}}">{{cantFind}}</a></span></p>
25
+ {{/addressesExist}}
26
+ {{^addressesExist}}
27
+ <p><span class="link"><a href="{{#qs}}step=manual{{/qs}}">{{enterManually}}</a></span></p>
28
+ {{/addressesExist}}
29
+ {{/page-content}}
30
+ {{/partials-page}}
@@ -0,0 +1,27 @@
1
+ {{<partials-page}}
2
+ {{$pageTitle}}{{addressDetailsTitle}}{{/pageTitle}}
3
+ {{$page-content}}
4
+ {{#postcode}}
5
+ <p class="govuk-body">
6
+ <label>{{postcodeEntered}}</label>
7
+ <strong><span class="postcode">{{postcode}}</span></strong>
8
+ <strong><span class="link"><a class="change-postcode" href="{{#qs}}step=postcode{{/qs}}">{{editLink}}</a></span></strong>
9
+ </p>
10
+ {{/postcode}}
11
+ {{#postcodeError}}
12
+ <div class="alert-info">
13
+ <span class="info-message">
14
+ {{postcodeError}}
15
+ </span>
16
+ </div>
17
+ {{/postcodeError}}
18
+ <h1 class="govuk-heading-l">{{manualAddressHeading}}</h1>
19
+ <p class="govuk-body">{{manualAddressParagraph}}</p>
20
+ {{#fields}}
21
+ {{#renderField}}{{/renderField}}
22
+ {{/fields}}
23
+ {{#input-submit}}continue{{/input-submit}}
24
+ <br />
25
+ <span class="link"><a class="change-postcode" href="{{#qs}}step=postcode{{/qs}}">{{searchByPostcodeLink}}</a></span>
26
+ {{/page-content}}
27
+ {{/partials-page}}
@@ -0,0 +1,7 @@
1
+ {{<partials-page}}
2
+ {{$pageTitle}}{{lookupProblemTitle}}{{/pageTitle}}
3
+ {{$page-content}}
4
+ <h1 class="govuk-heading-l">{{searchErrorHeading}}</h1>
5
+ <p><span class="link"><a class="govuk-button" href="{{#qs}}step=manual{{/qs}}">{{enterManually}}</a></span></p>
6
+ {{/page-content}}
7
+ {{/partials-page}}
@@ -0,0 +1,13 @@
1
+ {{<partials-page}}
2
+ {{$pageTitle}}{{postcodeSearchTitle}}{{/pageTitle}}
3
+ {{$page-content}}
4
+ <h1 class="govuk-heading-l">{{postcodeHeading}}</h1>
5
+ {{#fields}}
6
+ {{#hint}}
7
+ <span id="{{key}}-hint" class="govuk-hint">{{hint}}</span>
8
+ {{/hint}}
9
+ {{#renderField}}{{/renderField}}{{#input-submit}}find-address{{/input-submit}}
10
+ {{/fields}}
11
+ <p><span class="link"><a href="{{#qs}}step=manual{{/qs}}">{{enterManually}}</a></span></p>
12
+ {{/page-content}}
13
+ {{/partials-page}}
@@ -176,6 +176,11 @@ module.exports = Validators = {
176
176
  postcode(value) {
177
177
  // eslint-disable-next-line max-len
178
178
  return value === '' || Validators.regex(value, /^(([GIR] ?0[A]{2})|((([A-Z][0-9]{1,2})|(([A-Z][A-HJ-Y][0-9]{1,2})|(([A-Z][0-9][A-Z])|([A-Z][A-HJ-Y][0-9]?[A-Z])))) ?[0-9][A-Z]{2}))$/i);
179
+ },
180
+
181
+ postcodeValidation(value) {
182
+ // eslint-disable-next-line max-len
183
+ return Validators.regex(value, /^(([GIRgir] ?[ ]*0[ ]*[Aa]{2}[ ]*)|((([A-Za-z][ ]*[0-9]{1,2}[ ]*)|(([A-Za-z][ ]*[A-Ha-hJ-Yj-y][ ]*[0-9][ ]*[0-9]?)[ ]*|(([A-Za-z][ ]*[0-9][ ]*[A-Za-z][ ]*)|([A-Za-z][ ]*[A-Ha-hJ-Yj-y][ ]*[0-9]?[ ]*[A-Za-z][ ]*))))[^\w]+?[ ]*[0-9][ ]*[A-Za-z][ ]*[A-Za-z][ ]*))$/);
179
184
  }
180
185
 
181
186
  };