diff --git a/Architecture.png b/Architecture.png new file mode 100644 index 00000000..54614bad Binary files /dev/null and b/Architecture.png differ diff --git a/README.md b/README.md index 90084c0a..01920d27 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ This repository contains the code for the Shared Parental Leave (SPL) and Stauto It is built on top of the [BEIS SPL common](https://github.com/UKGovernmentBEIS/beis-spl-common) baseline project, which in turn is forked from the [GDS Node.js boilerplate](https://github.com/alphagov/gds-nodejs-boilerplate) project. +## Architecture +The application is is purely frontend. There is no backend, no database. An example architecture diagram can be seen in the root folder. + ## Getting started on development ### Installs diff --git a/app/assets/javascripts/components/PrintYourPlan.vue b/app/assets/javascripts/components/PrintYourPlan.vue index 5850cdb3..b6ac0227 100644 --- a/app/assets/javascripts/components/PrintYourPlan.vue +++ b/app/assets/javascripts/components/PrintYourPlan.vue @@ -10,6 +10,7 @@ data-ga-field-event_action="print_page" > print your plan. + Save or print the plan as a PDF by selecting the PDF option in the print view.
diff --git a/app/constants.js b/app/constants.js index 4972cf40..cf56f57f 100644 --- a/app/constants.js +++ b/app/constants.js @@ -1,4 +1,4 @@ module.exports = { SERVICE_NAME: 'Plan shared parental leave and pay', - STATUTORY_MAXIMUM_PAY: 156.66 + STATUTORY_MAXIMUM_PAY: 172.48 } diff --git a/app/filters.js b/app/filters.js index 29bf75dd..1b6896c1 100644 --- a/app/filters.js +++ b/app/filters.js @@ -52,6 +52,11 @@ module.exports = function (env) { return '£' + ((primaryPay || 0) + (secondaryPay || 0)).toFixed(2) } + function numberAsString (block) { + var weekCount = block.end - block.start + 1 + return weekCount.toString() + } + function displayPayBlockTotal (data) { const eligibility = parseEligibilityFromData(data) return eligibility.primary.statutoryPay && // Cannot get exact value for Maternity Allowance. @@ -175,6 +180,7 @@ module.exports = function (env) { startDateName, hasEitherSalary, totalBlockPay, + numberAsString, displayPayBlockTotal, shouldDisplayPrimaryLeaveAndPayForm, shouldDisplayPrimaryCurtailmentForm, diff --git a/app/lib/weeks.js b/app/lib/weeks.js index 9c7bcc61..f106d601 100644 --- a/app/lib/weeks.js +++ b/app/lib/weeks.js @@ -210,7 +210,7 @@ class Weeks { _formatPay (pay) { const payAsFloat = parseFloat(pay) - return isNaN(payAsFloat) ? pay : '£' + payAsFloat.toFixed(2) + return isNaN(payAsFloat) ? pay : ('£' + (+payAsFloat.toFixed(2)).toLocaleString('en-US')) } } diff --git a/app/paths.js b/app/paths.js index 25389a3c..f9de905d 100644 --- a/app/paths.js +++ b/app/paths.js @@ -261,10 +261,6 @@ class Paths { workFlowPage: false, url: '/cookies' }, - 'contact-us': { - workFlowPage: false, - url: '/contact-us' - }, accessibilityStatement: { workFlowPage: false, url: '/accessibility-statement' diff --git a/app/router.js b/app/router.js index 7f576e71..2e75f838 100644 --- a/app/router.js +++ b/app/router.js @@ -334,6 +334,9 @@ router.route(paths.getPath('feedback')) res.render('feedback/feedback', { referrer }) }) .post(function (req, res) { + if (!validate.feedback(req)) { + return res.redirect(req.path) + } const experience = req.body.feedback const moreDetail = req.body['feedback-more-detail'] nodeEmail(experience, moreDetail) @@ -346,12 +349,6 @@ router.route(paths.getPath('cookies')) res.render('privacy/cookies', { referrer }) }) -router.route(paths.getPath('contact-us')) - .get(function (req, res) { - const referrer = req.header('Referrer') - res.render('feedback/contact-us', { referrer }) - }) - router.route(paths.getPath('accessibilityStatement')) .get(function (req, res) { const referrer = req.header('Referrer') diff --git a/app/validate.js b/app/validate.js index 239ea2ba..139036bb 100644 --- a/app/validate.js +++ b/app/validate.js @@ -128,6 +128,25 @@ function startDate (req) { return true } +function feedback (req) { + var valid = true + if (!req.session.data['feedback']) { + addError(req, 'feedback', 'Provide your experience with the service.', '#feedback') + valid = false + } + + var value = req.session.data['spam-filter'].toLowerCase() + if (!value.length) { + addError(req, 'spam-filter', 'Prove you are not a robot.', '#spam-filter') + valid = false + } else if (value !== 'yes' && value !== 'yes.') { + addError(req, 'spam-filter', 'The value you entered was incorrect. Please try again.', '#spam-filter') + valid = false + } + + return valid +} + function addStartDateError (req, message, dateParts) { const href = `#start-date-${dateParts[0]}` addError(req, 'start-date', message, href, { dateParts }) @@ -377,5 +396,6 @@ module.exports = { parentSalaries, planner, paternityLeaveQuestion, - splQuestions + splQuestions, + feedback } diff --git a/app/views/components/get-help.njk b/app/views/components/get-help.njk deleted file mode 100644 index 3f072fea..00000000 --- a/app/views/components/get-help.njk +++ /dev/null @@ -1,10 +0,0 @@ -{% macro getHelp() %} -- Get help with this page -
- - Report an issue or get help using this service - -+ Save or print this summary as a PDF by selecting the PDF option in the 'Print this summary' view. +
{{ govukButton({ text: "Print this summary", type: "button", diff --git a/app/views/eligibility/maternity-allowance.njk b/app/views/eligibility/maternity-allowance.njk index 1aecff12..61f047d3 100644 --- a/app/views/eligibility/maternity-allowance.njk +++ b/app/views/eligibility/maternity-allowance.njk @@ -4,7 +4,6 @@ {% from "hidden-fields/macro.njk" import appendHiddenFields %} {% from "button/macro.njk" import govukButton %} {% from "macro.njk" import pushToGoogleAnalyticsDataLayer %} -{% from "../components/get-help.njk" import getHelp %} {% extends "layout.njk" %} @@ -72,8 +71,6 @@ text: "Continue" }) }} - - {{ getHelp() }} {% endblock %} diff --git a/app/views/eligibility/paternity-leave-and-pay.njk b/app/views/eligibility/paternity-leave-and-pay.njk index bfd734b6..326840d6 100644 --- a/app/views/eligibility/paternity-leave-and-pay.njk +++ b/app/views/eligibility/paternity-leave-and-pay.njk @@ -4,7 +4,6 @@ {% from "hidden-fields/macro.njk" import appendHiddenFields %} {% from "button/macro.njk" import govukButton %} {% from "macro.njk" import pushToGoogleAnalyticsDataLayer %} -{% from "../components/get-help.njk" import getHelp %} {% extends "layout.njk" %} @@ -111,8 +110,6 @@ text: "Continue" }) }} - - {{ getHelp() }} {% endblock %} diff --git a/app/views/eligibility/primary-initial-leave-and-pay.njk b/app/views/eligibility/primary-initial-leave-and-pay.njk index 3e85951e..cc6444d5 100644 --- a/app/views/eligibility/primary-initial-leave-and-pay.njk +++ b/app/views/eligibility/primary-initial-leave-and-pay.njk @@ -4,7 +4,6 @@ {% from "hidden-fields/macro.njk" import appendHiddenFields %} {% from "button/macro.njk" import govukButton %} {% from "macro.njk" import pushToGoogleAnalyticsDataLayer %} -{% from "../components/get-help.njk" import getHelp %} {% extends "layout.njk" %} @@ -113,8 +112,6 @@ text: "Continue" }) }} - - {{ getHelp() }} {% endblock %} diff --git a/app/views/eligibility/primary-shared-parental-leave-and-pay.njk b/app/views/eligibility/primary-shared-parental-leave-and-pay.njk index 04396b59..6b5793bc 100644 --- a/app/views/eligibility/primary-shared-parental-leave-and-pay.njk +++ b/app/views/eligibility/primary-shared-parental-leave-and-pay.njk @@ -4,7 +4,6 @@ {% from "hidden-fields/macro.njk" import appendHiddenFields %} {% from "button/macro.njk" import govukButton %} {% from "macro.njk" import pushToGoogleAnalyticsDataLayer %} -{% from "../components/get-help.njk" import getHelp %} {% extends "layout.njk" %} @@ -107,8 +106,6 @@ text: "Continue" }) }} - - {{ getHelp() }} {% endblock %} diff --git a/app/views/eligibility/secondary-shared-parental-leave-and-pay.njk b/app/views/eligibility/secondary-shared-parental-leave-and-pay.njk index b76c1531..e4e2a1cf 100644 --- a/app/views/eligibility/secondary-shared-parental-leave-and-pay.njk +++ b/app/views/eligibility/secondary-shared-parental-leave-and-pay.njk @@ -4,7 +4,6 @@ {% from "hidden-fields/macro.njk" import appendHiddenFields %} {% from "button/macro.njk" import govukButton %} {% from "macro.njk" import pushToGoogleAnalyticsDataLayer %} -{% from "../components/get-help.njk" import getHelp %} {% extends "layout.njk" %} @@ -107,8 +106,6 @@ text: "Continue" }) }} - - {{ getHelp() }} {% endblock %} diff --git a/app/views/feedback/feedback.njk b/app/views/feedback/feedback.njk index 978be51f..b624943c 100644 --- a/app/views/feedback/feedback.njk +++ b/app/views/feedback/feedback.njk @@ -2,6 +2,9 @@ {% from "radios/macro.njk" import govukRadios %} {% from "character-count/macro.njk" import govukCharacterCount %} {% from "button/macro.njk" import govukButton %} +{% from "input/macro.njk" import govukInput %} +{% from "error-summary/macro.njk" import govukErrorSummary %} +{% from "macro.njk" import pushToGoogleAnalyticsDataLayer %} {% extends "layout.njk" %} @@ -19,6 +22,16 @@ {% endblock %} {% block content %} + {% if errors["spam-filter"] %} + {{ govukErrorSummary({ + titleText: "There is a problem", + errorList: [ + errors["spam-filter"], + errors["feedback"] + ] + }) }} + {{ pushToGoogleAnalyticsDataLayer("error_msg", errors["spam-filter"].text, "Errorshown") }} + {% endif %}We use cookies to collect information about how you use the {{ service_name }} service. We use this information to make the website work as well as possible and improve government services.
- + Set cookie preferences- The forms can be found here. + The forms can be found here.
{{ summaryTabFooter({ diff --git a/app/views/tabs/pay-summary.njk b/app/views/tabs/pay-summary.njk index 1d087a5a..f59fc52d 100644 --- a/app/views/tabs/pay-summary.njk +++ b/app/views/tabs/pay-summary.njk @@ -8,16 +8,20 @@This summary shows the amount of statutory pay you could get while on leave. Your employers will confirm the exact amounts.
{% for block in payBlocks %} + {% set weekCount %} + {{-block | numberAsString}} + {% endset %} + {% set tableCaption %} - {{ data | startDay | startOfWeek | offsetWeeks(block.start) | formatForDisplay }} to {{ data | startDay | endOfWeek | offsetWeeks(block.end) | formatForDisplay }} + {{ data | startDay | startOfWeek | offsetWeeks(block.start) | formatForDisplay }} to {{ data | startDay | endOfWeek | offsetWeeks(block.end) | formatForDisplay }} ({{weekCount}} weeks) {% endset %} {% set primaryPay %} - {{ block["primary"] + " per week" if block["primary"] else "Unpaid" }} + {{ block["primary"] + " per week, for " + weekCount + " weeks" if block["primary"] else "Unpaid" }} {% endset %} {% set secondaryPay %} - {{ block["secondary"] + " per week" if block["secondary"] else "Unpaid" }} + {{ block["secondary"] + " per week, for " + weekCount + " weeks" if block["secondary"] else "Unpaid" }} {% endset %} {{ govukTable({ @@ -43,7 +47,7 @@ ], [ { html: "Total paybefore tax" }, - { html: "" + block | totalBlockPay + " per week" } + { html: "" + block | totalBlockPay + " per week, for " + weekCount + " weeks" } ] if data | displayPayBlockTotal ] }) }} diff --git a/app/views/type-of-adoption.njk b/app/views/type-of-adoption.njk index fa787b93..df50fb18 100644 --- a/app/views/type-of-adoption.njk +++ b/app/views/type-of-adoption.njk @@ -4,7 +4,6 @@ {% from "hidden-fields/macro.njk" import appendHiddenFields %} {% from "button/macro.njk" import govukButton %} {% from "macro.njk" import pushToGoogleAnalyticsDataLayer %} -{% from "../views/components/get-help.njk" import getHelp %} {% extends "layout.njk" %} @@ -76,8 +75,6 @@ } }) }} - - {{ getHelp() }} {% endblock %} diff --git a/common/assets/sass/components/_cookie-message.scss b/common/assets/sass/components/_cookie-message.scss index 184ccea4..5fd0f142 100644 --- a/common/assets/sass/components/_cookie-message.scss +++ b/common/assets/sass/components/_cookie-message.scss @@ -18,7 +18,6 @@ display: none; } - .success-message { border:5px; border-style:solid; diff --git a/common/browsered/index.js b/common/browsered/index.js index 64f5baf4..e603ae6a 100644 --- a/common/browsered/index.js +++ b/common/browsered/index.js @@ -4,7 +4,10 @@ window.GOVUKFrontend.initAll() const cookieManager = require('../../node_modules/@dvsa/cookie-manager/cookie-manager.js') cookieManager.init({ 'cookie-banner-id': 'cookie_banner', - 'cookie-banner-visibility-class': 'accepted', + 'cookie-banner-saved-callback': function () { + const banner = document.querySelector('#cookie_banner') + banner.hidden = true + }, 'cookie-banner-visible-on-page-with-preference-form': false, 'user-preference-configuration-form-id': 'cm_user_preference_form', 'user-preference-saved-callback': function () { diff --git a/common/lib/dataUtils.js b/common/lib/dataUtils.js index 1d4619c7..f7770f3c 100644 --- a/common/lib/dataUtils.js +++ b/common/lib/dataUtils.js @@ -1,6 +1,14 @@ const _ = require('lodash') const delve = require('dlv') +function feedbackExperience (data, optionName) { + if (_.isString(data)) { + return data === optionName + } else { + return data['feedback'] === optionName + } +} + function natureOfParenthood (data) { return data['nature-of-parenthood'] } @@ -136,6 +144,7 @@ function isLeaveTypeShared (leaveType) { } module.exports = { + feedbackExperience, natureOfParenthood, typeOfAdoption, birthOrPlacement, diff --git a/gruntfile.js b/gruntfile.js index 88d39593..98cb6d0a 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -5,7 +5,7 @@ const envify = require('envify/custom') module.exports = function (grunt) { const env = { dev: { - GOOGLE_ANALYTICS_ID: 'GTM-W9CKLBB', + GOOGLE_ANALYTICS_ID: 'G-653ZR7YS40', NODE_ENV: 'development' } } diff --git a/package-lock.json b/package-lock.json index f2ad8aaf..cdce3b15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -66,7 +66,7 @@ "grunt-sass": "^3.1.0", "mocha": "^6.2.3", "nock": "^10.0.6", - "node-sass": "^7.0.1", + "node-sass": "^7.0.3", "nyc": "^15.0.0", "pa11y": "5.3.0", "puppeteer": "2.1.1", @@ -12074,9 +12074,9 @@ "dev": true }, "node_modules/node-sass": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-7.0.1.tgz", - "integrity": "sha512-uMy+Xt29NlqKCFdFRZyXKOTqGt+QaKHexv9STj2WeLottnlqZEEWx6Bj0MXNthmFRRdM/YwyNo/8Tr46TOM0jQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-7.0.3.tgz", + "integrity": "sha512-8MIlsY/4dXUkJDYht9pIWBhMil3uHmE8b/AdJPjmFn1nBx9X9BASzfzmsCy0uCCb8eqI3SYYzVPDswWqSx7gjw==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -12092,7 +12092,7 @@ "node-gyp": "^8.4.1", "npmlog": "^5.0.0", "request": "^2.88.0", - "sass-graph": "4.0.0", + "sass-graph": "^4.0.1", "stdout-stream": "^1.4.0", "true-case-path": "^1.0.2" }, @@ -18161,14 +18161,14 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sass-graph": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-4.0.0.tgz", - "integrity": "sha512-WSO/MfXqKH7/TS8RdkCX3lVkPFQzCgbqdGsmSKq6tlPU+GpGEsa/5aW18JqItnqh+lPtcjifqdZ/VmiILkKckQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-4.0.1.tgz", + "integrity": "sha512-5YCfmGBmxoIRYHnKK2AKzrAkCoQ8ozO+iumT8K4tXJXRVCPf+7s1/9KxTSW3Rbvf+7Y7b4FR3mWyLnQr3PHocA==", "dev": true, "dependencies": { "glob": "^7.0.0", "lodash": "^4.17.11", - "scss-tokenizer": "^0.3.0", + "scss-tokenizer": "^0.4.3", "yargs": "^17.2.1" }, "bin": { @@ -18203,14 +18203,17 @@ } }, "node_modules/sass-graph/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/sass-graph/node_modules/color-convert": { @@ -18299,27 +18302,27 @@ } }, "node_modules/sass-graph/node_modules/yargs": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.0.tgz", - "integrity": "sha512-WJudfrk81yWFSOkZYpAZx4Nt7V4xp7S/uJkX0CnxovMCt1wCE8LNftPpNuF9X/u9gN5nsD7ycYtRcDf2pL3UiA==", + "version": "17.6.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", + "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", "dev": true, "dependencies": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" + "yargs-parser": "^21.1.1" }, "engines": { "node": ">=12" } }, "node_modules/sass-graph/node_modules/yargs-parser": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", - "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, "engines": { "node": ">=12" @@ -18814,19 +18817,19 @@ } }, "node_modules/scss-tokenizer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.3.0.tgz", - "integrity": "sha512-14Zl9GcbBvOT9057ZKjpz5yPOyUWG2ojd9D5io28wHRYsOrs7U95Q+KNL87+32p8rc+LvDpbu/i9ZYjM9Q+FsQ==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.4.3.tgz", + "integrity": "sha512-raKLgf1LI5QMQnG+RxHz6oK0sL3x3I4FN2UDLqgLOGO8hodECNnNh5BXn7fAyBxrA8zVzdQizQ6XjNJQ+uBwMw==", "dev": true, "dependencies": { - "js-base64": "^2.4.3", - "source-map": "^0.7.1" + "js-base64": "^2.4.9", + "source-map": "^0.7.3" } }, "node_modules/scss-tokenizer/node_modules/source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", "dev": true, "engines": { "node": ">= 8" @@ -31259,9 +31262,9 @@ "dev": true }, "node-sass": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-7.0.1.tgz", - "integrity": "sha512-uMy+Xt29NlqKCFdFRZyXKOTqGt+QaKHexv9STj2WeLottnlqZEEWx6Bj0MXNthmFRRdM/YwyNo/8Tr46TOM0jQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-7.0.3.tgz", + "integrity": "sha512-8MIlsY/4dXUkJDYht9pIWBhMil3uHmE8b/AdJPjmFn1nBx9X9BASzfzmsCy0uCCb8eqI3SYYzVPDswWqSx7gjw==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -31276,7 +31279,7 @@ "node-gyp": "^8.4.1", "npmlog": "^5.0.0", "request": "^2.88.0", - "sass-graph": "4.0.0", + "sass-graph": "^4.0.1", "stdout-stream": "^1.4.0", "true-case-path": "^1.0.2" }, @@ -36064,14 +36067,14 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sass-graph": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-4.0.0.tgz", - "integrity": "sha512-WSO/MfXqKH7/TS8RdkCX3lVkPFQzCgbqdGsmSKq6tlPU+GpGEsa/5aW18JqItnqh+lPtcjifqdZ/VmiILkKckQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-4.0.1.tgz", + "integrity": "sha512-5YCfmGBmxoIRYHnKK2AKzrAkCoQ8ozO+iumT8K4tXJXRVCPf+7s1/9KxTSW3Rbvf+7Y7b4FR3mWyLnQr3PHocA==", "dev": true, "requires": { "glob": "^7.0.0", "lodash": "^4.17.11", - "scss-tokenizer": "^0.3.0", + "scss-tokenizer": "^0.4.3", "yargs": "^17.2.1" }, "dependencies": { @@ -36091,13 +36094,13 @@ } }, "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "requires": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, @@ -36166,24 +36169,24 @@ "dev": true }, "yargs": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.0.tgz", - "integrity": "sha512-WJudfrk81yWFSOkZYpAZx4Nt7V4xp7S/uJkX0CnxovMCt1wCE8LNftPpNuF9X/u9gN5nsD7ycYtRcDf2pL3UiA==", + "version": "17.6.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", + "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", "dev": true, "requires": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" + "yargs-parser": "^21.1.1" } }, "yargs-parser": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", - "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true } } @@ -36581,19 +36584,19 @@ } }, "scss-tokenizer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.3.0.tgz", - "integrity": "sha512-14Zl9GcbBvOT9057ZKjpz5yPOyUWG2ojd9D5io28wHRYsOrs7U95Q+KNL87+32p8rc+LvDpbu/i9ZYjM9Q+FsQ==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.4.3.tgz", + "integrity": "sha512-raKLgf1LI5QMQnG+RxHz6oK0sL3x3I4FN2UDLqgLOGO8hodECNnNh5BXn7fAyBxrA8zVzdQizQ6XjNJQ+uBwMw==", "dev": true, "requires": { - "js-base64": "^2.4.3", - "source-map": "^0.7.1" + "js-base64": "^2.4.9", + "source-map": "^0.7.3" }, "dependencies": { "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", "dev": true } } diff --git a/package.json b/package.json index 82ba868a..c173b50a 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "grunt-sass": "^3.1.0", "mocha": "^6.2.3", "nock": "^10.0.6", - "node-sass": "^7.0.1", + "node-sass": "^7.0.3", "nyc": "^15.0.0", "pa11y": "5.3.0", "puppeteer": "2.1.1", @@ -91,5 +91,8 @@ "standard": "^13.0.2", "supertest": "^4.0.2", "vueify": "^9.4.1" + }, + "overrides": { + "grunt": "^1.5.2" } } diff --git a/test/unit/lib/blocks.test.js b/test/unit/lib/blocks.test.js index 0dcced4c..199630a4 100644 --- a/test/unit/lib/blocks.test.js +++ b/test/unit/lib/blocks.test.js @@ -52,10 +52,10 @@ describe('Blocks', () => { } }, payBlocks: [ - { start: 0, end: 1, primary: '£432.69', secondary: '£156.66' }, - { start: 3, end: 4, primary: '£156.66', secondary: '£156.66' }, - { start: 6, end: 7, primary: undefined, secondary: '£156.66' }, - { start: 8, end: 9, primary: '£156.66', secondary: undefined } + { start: 0, end: 1, primary: '£432.69', secondary: '£172.48' }, + { start: 3, end: 4, primary: '£172.48', secondary: '£172.48' }, + { start: 6, end: 7, primary: undefined, secondary: '£172.48' }, + { start: 8, end: 9, primary: '£172.48', secondary: undefined } ] } @@ -105,10 +105,10 @@ describe('Blocks', () => { } }, payBlocks: [ - { start: 0, end: 1, primary: '£432.69', secondary: '£156.66' }, - { start: 3, end: 4, primary: '£156.66', secondary: '£156.66' }, - { start: 6, end: 7, primary: undefined, secondary: '£156.66' }, - { start: 8, end: 9, primary: '£156.66', secondary: undefined } + { start: 0, end: 1, primary: '£432.69', secondary: '£172.48' }, + { start: 3, end: 4, primary: '£172.48', secondary: '£172.48' }, + { start: 6, end: 7, primary: undefined, secondary: '£172.48' }, + { start: 8, end: 9, primary: '£172.48', secondary: undefined } ] }