Skip to content

Commit

Permalink
KIWI-2053 F2F | FE | Removing BRP option, webpages and tests (#546)
Browse files Browse the repository at this point in the history
* update govuk-frontend from v4.8.0 to v4.9.0.

* Removing BRP option, webpages and tests

* Fix test errors & Reset tokenId to a variable

* [KIWI-2053] - Fix failing cucumber tests

* [KIWI-2053] - Remove remaining BRP references

* [KIWI-2053] - Remove remaining BRP references

* [KIWI-2053] - Remove F2F_CRI_VC_ISSUED_03_SCHEMA.json

* Delete line 3 - src/app/f2f/controllers/root.js
  • Loading branch information
MakiniKayiraGDS authored Dec 12, 2024
1 parent ab95d10 commit 43339b1
Show file tree
Hide file tree
Showing 38 changed files with 57 additions and 1,231 deletions.
8 changes: 0 additions & 8 deletions src/app/f2f/controllers/brpDetails.js

This file was deleted.

11 changes: 0 additions & 11 deletions src/app/f2f/controllers/brpDetails.test.js

This file was deleted.

9 changes: 2 additions & 7 deletions src/app/f2f/controllers/checkDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ class CheckDetailsController extends DateController {
req.sessionModel.set("countryCode", "GBR");
break;
}
case APP.PHOTO_ID_OPTIONS.BRP: {
expiryDate = req.form.values.brpExpiryDate;
req.sessionModel.set("countryCode", "GBR");
break;
}
case APP.PHOTO_ID_OPTIONS.UK_PHOTOCARD_DL: {
expiryDate = req.form.values.ukPhotocardDlExpiryDate;
address = req.form.values.ukPhotocardDlAddressCheck;
Expand Down Expand Up @@ -189,7 +184,7 @@ class CheckDetailsController extends DateController {
locals.addressLine3 = req.sessionModel.get("townCity")
locals.addressPostcode = req.sessionModel.get("postalCode")
}

locals.pdfPreferenceText = "By email only"
if (req.sessionModel.get("postOfficeCustomerLetterChoice") == "post") {
locals.pdfPreferenceText = "By email and post"
Expand All @@ -211,7 +206,7 @@ class CheckDetailsController extends DateController {
locals.hasExpiryDate = hasExpiryDate;
locals.postOfficeAddress = postOfficeAddress.split(", ");
locals.postOfficeName = postOfficeName;

callback(err, locals);
});
}
Expand Down
1 change: 0 additions & 1 deletion src/app/f2f/controllers/checkDetails.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ describe("CheckDetails controller", () => {
photoIdChoice: PHOTO_ID_OPTIONS.UK_PASSPORT,
expiryDateKey: "ukPassportExpiryDate",
},
{ photoIdChoice: PHOTO_ID_OPTIONS.BRP, expiryDateKey: "brpExpiryDate" },
{
photoIdChoice: PHOTO_ID_OPTIONS.UK_PHOTOCARD_DL,
expiryDateKey: "ukPhotocardDlExpiryDate",
Expand Down
13 changes: 0 additions & 13 deletions src/app/f2f/controllers/photoIdSelection.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class PhotoIdSelectionController extends BaseController {
logger.info("user submitting photo Id choice", { req, res });
req.sessionModel.set("redirect_url", undefined);
req.sessionModel.set(APP.PHOTO_ID_OPTIONS.UK_PASSPORT, undefined);
req.sessionModel.set(APP.PHOTO_ID_OPTIONS.BRP, undefined);
req.sessionModel.set(APP.PHOTO_ID_OPTIONS.UK_PHOTOCARD_DL, undefined);
req.sessionModel.set(APP.PHOTO_ID_OPTIONS.NON_UK_PASSPORT, undefined);
req.sessionModel.set(APP.PHOTO_ID_OPTIONS.EU_PHOTOCARD_DL, undefined);
Expand All @@ -28,18 +27,6 @@ class PhotoIdSelectionController extends BaseController {
req.sessionModel.set("changeUrl", "uk-passport-expire");
return next();
}
case APP.PHOTO_ID_OPTIONS.BRP: {
logger.info(
"photo-id-selection: user has selected BRP - redirecting to BRP page",
{ req, res }
);
req.sessionModel.set(APP.PHOTO_ID_OPTIONS.BRP, true);
req.sessionModel.set(
"changeUrl",
"biometric-residence-permit-expire"
);
return next();
}
case APP.PHOTO_ID_OPTIONS.UK_PHOTOCARD_DL: {
logger.info(
"photo-id-selection: user has selected UK DL - redirecting to driving license details page",
Expand Down
12 changes: 0 additions & 12 deletions src/app/f2f/controllers/photoIdSelection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,6 @@ describe("PhotoIdSelectionController", () => {
expect(changeUrl).to.equal("uk-passport-expire");
});

it("should save values to sessionModel according to selected document type - BRP", async () => {
req.form.values.photoIdChoice = APP.PHOTO_ID_OPTIONS.BRP;

await photoIdSelectionController.saveValues(req, res, next);
const photoIdChoice = req.sessionModel.get("photoIdChoice");
const changeUrl = req.sessionModel.get("changeUrl");

expect(next).to.have.been.calledOnce;
expect(photoIdChoice).to.equal(APP.PHOTO_ID_OPTIONS.BRP);
expect(changeUrl).to.equal("biometric-residence-permit-expire");
});

it("should save values to sessionModel according to selected document type - UK Driving Licence", async () => {
req.form.values.photoIdChoice = APP.PHOTO_ID_OPTIONS.UK_PHOTOCARD_DL;

Expand Down
3 changes: 1 addition & 2 deletions src/app/f2f/controllers/root.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const { Controller: BaseController } = require("hmpo-form-wizard");
const { API } = require("../../../lib/config");
// const logger = require("hmpo-logger").get();
// const NodeRSA = require("node-rsa");
const {
createPersonalDataHeaders,
Expand All @@ -11,7 +10,7 @@ class RootController extends BaseController {

const sharedClaims = req.session?.shared_claims;

// try {
// try {
// const encryptedJSON = await this.getAddressInfo(req.axios, req);
// const key = await this.getDecryptKey(req.axios, req);
// const decryptKey = new NodeRSA(key)
Expand Down
13 changes: 0 additions & 13 deletions src/app/f2f/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module.exports = {
{ value: APP.PHOTO_ID_OPTIONS.UK_PASSPORT },
{ value: APP.PHOTO_ID_OPTIONS.NON_UK_PASSPORT },
{ value: APP.PHOTO_ID_OPTIONS.UK_PHOTOCARD_DL },
{ value: APP.PHOTO_ID_OPTIONS.BRP },
{ value: APP.PHOTO_ID_OPTIONS.EU_PHOTOCARD_DL },
{ value: APP.PHOTO_ID_OPTIONS.EEA_IDENTITY_CARD },
{ divider: "or" },
Expand Down Expand Up @@ -91,18 +90,6 @@ module.exports = {
},
],
},
brpExpiryDate: {
type: "date",
journeyKey: "brpExpiryDate",
validate: [
"required",
"date",
{
type: "before",
arguments: ["2033-01-01"],
},
],
},
euPhotocardDlExpiryDate: {
type: "date",
journeyKey: "euPhotocardDlDate",
Expand Down
28 changes: 0 additions & 28 deletions src/app/f2f/steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const resultsController = require("./controllers/results");
const ukPassportDetails = require("./controllers/ukPassportDetails");
const ukPhotocardDlDetails = require("./controllers/ukPhotocardDl");
const photoIdSelectThinFile = require("./controllers/photoIdSelectionThinFile");
const brpDetails = require("./controllers/brpDetails");
const nonUKPassportDetails = require("./controllers/nonUKPassportDetails");
const eeaIdentityCardDetails = require("./controllers/eeaIdentityCardDetails");
const euPhotocardDlDetails = require("./controllers/euPhotocardDlDetails");
Expand Down Expand Up @@ -49,7 +48,6 @@ module.exports = {
"ukPassportExpiryDate",
"nonUKPassportExpiryDate",
"ukPhotocardDlExpiryDate",
"brpExpiryDate",
"eeaIdCardExpiryDate",
"euPhotocardDlExpiryDate",
"photoIdExpiryChoice",
Expand All @@ -60,11 +58,6 @@ module.exports = {
value: APP.PHOTO_ID_OPTIONS.UK_PASSPORT,
next: APP.PATHS.UK_PASSPORT_DETAILS,
},
{
field: "photoIdChoice",
value: APP.PHOTO_ID_OPTIONS.BRP,
next: APP.PATHS.BRP_DETAILS,
},
{
field: "photoIdChoice",
value: APP.PHOTO_ID_OPTIONS.UK_PHOTOCARD_DL,
Expand Down Expand Up @@ -101,7 +94,6 @@ module.exports = {
"ukPassportExpiryDate",
"nonUKPassportExpiryDate",
"ukPhotocardDlExpiryDate",
"brpExpiryDate",
"eeaIdCardExpiryDate",
"euPhotocardDlExpiryDate",
"photoIdExpiryChoice",
Expand Down Expand Up @@ -181,21 +173,6 @@ module.exports = {
APP.PATHS.UK_PHOTOCARD_DL_ADDRESS_CHECK,
],
},
[`${APP.PATHS.BRP_DETAILS}`]: {
fields: ["brpExpiryDate"],
controller: brpDetails,
editable: true,
editBackStep: APP.PATHS.CHECK_DETAILS,
next: [
{
field: "brpExpiryDate",
op: "before",
value: "today",
next: APP.PATHS.EXPIRED_ID,
},
APP.PATHS.FIND_POST_OFFICE,
],
},
[`${APP.PATHS.EU_PHOTOCARD_DL_DETAILS}`]: {
fields: ["euPhotocardDlExpiryDate"],
controller: euPhotocardDlDetails,
Expand Down Expand Up @@ -317,11 +294,6 @@ module.exports = {
value: APP.PHOTO_ID_OPTIONS.UK_PASSPORT,
next: APP.PATHS.UK_PASSPORT_DETAILS,
},
{
field: "photoIdChoice",
value: APP.PHOTO_ID_OPTIONS.BRP,
next: APP.PATHS.BRP_DETAILS,
},
{
field: "photoIdChoice",
value: APP.PHOTO_ID_OPTIONS.UK_PHOTOCARD_DL,
Expand Down
2 changes: 0 additions & 2 deletions src/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ module.exports = {
UK_PHOTOCARD_DL_ADDRESS_CHECK: "/uk-driving-licence-current-address",
EU_DRIVING_LICENCE_ADDRESS_CHECK: "/eu-driving-licence-current-address",
EU_DRIVING_LICENCE_COUNTRY_SELECTOR: "/select-country-eu-driving-licence",
BRP_DETAILS: "/biometric-residence-permit-expire",
EU_PHOTOCARD_DL_DETAILS: "/eu-driving-licence-expire",
EEA_IDENTITY_CARD_DETAILS: "/national-identity-card-expire",
EEA_IDENTITY_CARD_ADDRESS_CHECK:
Expand All @@ -66,7 +65,6 @@ module.exports = {
UK_PASSPORT: "ukPassport",
NON_UK_PASSPORT: "nonUkPassport",
UK_PHOTOCARD_DL: "ukPhotocardDl",
BRP: "brp",
EU_PHOTOCARD_DL: "euPhotocardDl",
EEA_IDENTITY_CARD: "eeaIdentityCard",
NO_PHOTO_ID: "noPhotoId",
Expand Down
28 changes: 4 additions & 24 deletions src/locales/cy/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ photoIdChoice:
label: Trwydded yrru gyda llun y DU
hint: Rhaid i'r cyfeiriad ar eich trwydded yrru fod yr un fath â'ch cyfeiriad presennol.
reveal: ""
brp:
label: Trwydded breswylio biometrig y DU (BRP)
hint: Efallai y bydd gennych BRP os oes gennych fisa am fwy na 6 mis neu ganiatâd amhenodol i aros. Ni allwch ddefnyddio Trwydded Gweithwyr Ffiniol y DU (FWP) na cherdyn preswylio biometrig y DU (BRC), a elwir hefyd yn gerdyn preswylio yn y DU.
reveal: ""
nonUkPassport:
label: Pasbort o'r tu allan i'r DU
hint: ""
Expand Down Expand Up @@ -114,22 +110,6 @@ nonUKPassportExpiryDate:
"required-month": "Rhowch y dyddiad dod i ben yn llawn"
"required-year": "Rhowch y dyddiad dod i ben yn llawn"

brpExpiryDate:
legend: ""
label: ""
hint: "Er enghraifft, 31 3 2025"
validation:
default: "Rhowch y dyddiad dod i ben yn llawn"
before: "Rhowch ddyddiad dod i ben dilys"
"numeric-day": "Mae'n rhaid i'r dyddiad dod i ben gynnwys diwrnod sy'n cynnwys rhifau yn unig"
"numeric-month": "Mae'n rhaid i'r dyddiad dod i ben gynnwys mis sy'n cynnwys rhifau yn unig"
"numeric-year": "Mae'n rhaid i'r dyddiad dod i ben gynnwys blwyddyn sy'n cynnwys rhifau yn unig"
"date-day": "Rhowch ddyddiad dod i ben dilys"
"date-month": "Mae'n rhaid i'r dyddiad dod i ben gynnwys mis sy'n rhif rhwng 1 a 12"
"required-day": "Rhowch y dyddiad dod i ben yn llawn"
"required-month": "Rhowch y dyddiad dod i ben yn llawn"
"required-year": "Rhowch y dyddiad dod i ben yn llawn"

euPhotocardDlExpiryDate:
legend: ""
label: ""
Expand Down Expand Up @@ -180,11 +160,11 @@ idHasExpiryDate:
validation:
required: "Dewiswch os oes gan eich ID gyda llun ddyddiad dod i ben"
items:
yes:
yes:
label: "Oes"
hint: ""
reveal: ""
no:
no:
label: "Na"
hint: ""
reveal: ""
Expand Down Expand Up @@ -352,7 +332,7 @@ countries:
XXK: "Kosovo"
KWT: "Kuwait"
KGZ: "Kyrgyzstan"
LAO: "Laos"
LAO: "Laos"
LVA: "Latvia"
LBN: "Lebanon"
LSO: "Lesotho"
Expand Down Expand Up @@ -397,7 +377,7 @@ countries:
PNG: "Papua New Guinea"
PRY: "Paraguay"
PER: "Peru"
PHL: "Philippines"
PHL: "Philippines"
POL: "Gwlad Pwyl"
PRT: "Portiwgal"
QAT: "Qatar"
Expand Down
5 changes: 0 additions & 5 deletions src/locales/cy/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ ukPhotocardDl:
photocardDlInformationContext: "Rydym angen y wybodaeth hon i wirio bod eich ID gyda llun yn ddilys."
hintText: "Er enghraifft, 31 3 2025"

brp:
title: "Pryd mae eich trwydded preswylio biometrig (BRP) yn dod i ben?"
brpInformationContext: "Rydym angen y wybodaeth hon i wirio bod eich ID gyda llun yn ddilys."
hintText: "Er enghraifft, 31 3 2025"

euPhotocardDl:
title: "Pryd mae eich trwydded yrru yn dod i ben?"
euPhotocardDlInformationContext: "Rydym angen y wybodaeth hon i wirio bod eich ID gyda llun yn ddilys."
Expand Down
32 changes: 6 additions & 26 deletions src/locales/en/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ photoIdChoice:
label: UK photocard driving licence
hint: The address on your driving licence must be the same as your current address.
reveal: ""
brp:
label: UK biometric residence permit (BRP)
hint: You might have a BRP if you have a visa for longer than 6 months or indefinite leave to remain. You cannot use a UK Frontier Worker permit (FWP) or a UK biometric residence card (BRC), also called a UK residence card.
reveal: ""
nonUkPassport:
label: Non-UK passport
hint: ""
Expand Down Expand Up @@ -101,22 +97,6 @@ nonUKPassportExpiryDate:
"required-month": "Enter the full expiry date"
"required-year": "Enter the full expiry date"

brpExpiryDate:
legend: ""
label: ""
hint: "For example, 31 3 2025"
validation:
default: "Enter the full expiry date"
before: "Enter a valid expiry date"
"numeric-day": "The expiry date must include a day that contains numbers only"
"numeric-month": "The expiry date must include a month that contains numbers only"
"numeric-year": "The expiry date must include a year that contains numbers only"
"date-day": "Enter a valid expiry date"
"date-month": "The expiry date must include a month that is a number between 1 and 12"
"required-day": "Enter the full expiry date"
"required-month": "Enter the full expiry date"
"required-year": "Enter the full expiry date"

euPhotocardDlExpiryDate:
legend: ""
label: ""
Expand Down Expand Up @@ -153,11 +133,11 @@ idHasExpiryDate:
validation:
required: "Select if your photo ID has an expiry date"
items:
yes:
yes:
label: "Yes"
hint: ""
reveal: ""
no:
no:
label: "No"
hint: ""
reveal: ""
Expand Down Expand Up @@ -208,7 +188,7 @@ eeaIdentityCardAddressCheck:
label: "My national identity card does not have my address on it"
hint: ""
reveal: ""

postcode:
label: Enter a UK postcode
hint: "For example, SW1A 2AA"
Expand Down Expand Up @@ -366,7 +346,7 @@ countries:
XXK: "Kosovo"
KWT: "Kuwait"
KGZ: "Kyrgyzstan"
LAO: "Laos"
LAO: "Laos"
LVA: "Latvia"
LBN: "Lebanon"
LSO: "Lesotho"
Expand Down Expand Up @@ -411,7 +391,7 @@ countries:
PNG: "Papua New Guinea"
PRY: "Paraguay"
PER: "Peru"
PHL: "Philippines"
PHL: "Philippines"
POL: "Poland"
PRT: "Portugal"
QAT: "Qatar"
Expand Down Expand Up @@ -493,4 +473,4 @@ postOfficeCustomerLetterChoice:
label: Post and email
hint: "It can take up to 6 working days to get your letter by post."
reveal: ""

Loading

0 comments on commit 43339b1

Please sign in to comment.