hof 20.1.5 → 20.1.7
Sign up to get free protection for your applications and to get access to all the features.
- package/config/component-defaults.js +10 -12
- package/controller/controller.js +3 -1
- package/package.json +2 -2
@@ -1,15 +1,13 @@
|
|
1
1
|
|
2
2
|
module.exports = {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
]
|
14
|
-
}
|
3
|
+
homeOfficeCountries: [
|
4
|
+
'nationality',
|
5
|
+
'former-nationality',
|
6
|
+
'dual-nationality',
|
7
|
+
'nominated-nationality',
|
8
|
+
'nationality-error',
|
9
|
+
'country',
|
10
|
+
'country-of-birth',
|
11
|
+
'someone-else-nationality'
|
12
|
+
]
|
15
13
|
};
|
package/controller/controller.js
CHANGED
@@ -103,9 +103,11 @@ module.exports = class Controller extends BaseController {
|
|
103
103
|
const locals = super.locals(req, res);
|
104
104
|
const stepLocals = req.form.options.locals || {};
|
105
105
|
|
106
|
-
|
106
|
+
let fields = _.map(req.form.options.fields, (field, key) =>
|
107
107
|
Object.assign({}, field, { key })
|
108
108
|
);
|
109
|
+
// only include fields that aren't dependents to mitigate duplicate fields on the page
|
110
|
+
fields = fields.filter(field => !req.form.options.fields[field.key].dependent);
|
109
111
|
|
110
112
|
return _.extend({}, locals, {
|
111
113
|
fields,
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "hof",
|
3
3
|
"description": "A bootstrap for HOF projects",
|
4
|
-
"version": "20.1.
|
4
|
+
"version": "20.1.7",
|
5
5
|
"license": "MIT",
|
6
6
|
"main": "index.js",
|
7
7
|
"author": "HomeOffice",
|
@@ -25,7 +25,7 @@
|
|
25
25
|
"unit": "LOG_LEVEL=error nyc _mocha \"test/**/*.spec.js\" \"sandbox/test/**/*.spec.js\"",
|
26
26
|
"unit:nocov": "LOG_LEVEL=error mocha \"test/**/*.spec.js\" \"sandbox/test/**/*.spec.js\"",
|
27
27
|
"test:lint": "eslint . --config ./node_modules/eslint-config-hof/default.js",
|
28
|
-
"test:functional": "funkie mocha ./test/functional-tests --exit",
|
28
|
+
"test:functional": "funkie mocha ./test/functional-tests --timeout 20000 --exit",
|
29
29
|
"test:client": "karma start test/frontend/toolkit/karma.conf.js",
|
30
30
|
"test:cookie-banner": "jest test/frontend/jest",
|
31
31
|
"test:acceptance": "TAGS=\"${TAGS:=@feature}\" yarn run test:cucumber",
|