hof 20.1.5 → 20.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,15 +1,13 @@
1
1
 
2
2
  module.exports = {
3
- componentDefaults: {
4
- homeOfficeCountries: [
5
- 'nationality',
6
- 'former-nationality',
7
- 'dual-nationality',
8
- 'nominated-nationality',
9
- 'nationality-error',
10
- 'country',
11
- 'country-of-birth',
12
- 'someone-else-nationality'
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
  };
@@ -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
- const fields = _.map(req.form.options.fields, (field, key) =>
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.5",
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",