From 64efc2fcaeb59c5a6d0335302693a506c1d23334 Mon Sep 17 00:00:00 2001 From: keyurx11 Date: Mon, 28 Oct 2024 14:53:21 +0000 Subject: [PATCH] FSR-1356: Add hyphen in 'low-lying land' and full stop to 'One or more flood alerts may be issued' on station threshold level list --- server/models/views/lib/process-imtd-thresholds.js | 6 +++--- test/models/lib/process-imtd-thresholds.js | 2 +- test/models/station.js | 6 +++--- test/routes/station.js | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/server/models/views/lib/process-imtd-thresholds.js b/server/models/views/lib/process-imtd-thresholds.js index cb2cc284b..71123a1b6 100644 --- a/server/models/views/lib/process-imtd-thresholds.js +++ b/server/models/views/lib/process-imtd-thresholds.js @@ -19,7 +19,7 @@ function processImtdThresholds (imtdThresholds, stationStageDatum, stationSubtra } else if (pc5) { thresholds.push({ id: 'pc5', - description: 'Top of normal range. Low lying land flooding possible above this level', + description: 'Top of normal range. Low-lying land flooding possible above this level', shortname: TOP_OF_NORMAL_RANGE, value: pc5 }) @@ -51,7 +51,7 @@ function calculateAlertThreshold (imtdThresholds, stationStageDatum, stationSubt if (Number(imtdThresholdAlert) !== Number(pc5)) { imtdThresholdAlerts.push({ id: 'alertThreshold', - description: 'Low lying land flooding possible above this level. One or more flood alerts may be issued', + description: 'Low-lying land flooding possible above this level. One or more flood alerts may be issued.', shortname: 'Possible flood alerts', value: imtdThresholdAlert }) @@ -60,7 +60,7 @@ function calculateAlertThreshold (imtdThresholds, stationStageDatum, stationSubt if (Number(imtdThresholdAlert) === Number(pc5)) { imtdThresholdAlerts.push({ id: 'alertThreshold', - description: 'Top of normal range. Low lying land flooding possible above this level. One or more flood alerts may be issued', + description: 'Top of normal range. Low-lying land flooding possible above this level. One or more flood alerts may be issued.', shortname: TOP_OF_NORMAL_RANGE, value: imtdThresholdAlert }) diff --git a/test/models/lib/process-imtd-thresholds.js b/test/models/lib/process-imtd-thresholds.js index 797bb9605..c70aca0c3 100644 --- a/test/models/lib/process-imtd-thresholds.js +++ b/test/models/lib/process-imtd-thresholds.js @@ -4,7 +4,7 @@ const data = require('../../data') const lab = exports.lab = Lab.script() const processImtdThresholds = require('../../../server/models/views/lib/process-imtd-thresholds') -const alertExpectedText = { id: 'alertThreshold', description: 'Top of normal range. Low lying land flooding possible above this level. One or more flood alerts may be issued', shortname: 'Top of normal range' } +const alertExpectedText = { id: 'alertThreshold', description: 'Top of normal range. Low-lying land flooding possible above this level. One or more flood alerts may be issued.', shortname: 'Top of normal range' } const warningExpectedText = { id: 'warningThreshold', description: 'Property flooding is possible above this level', shortname: 'Possible flood warnings' } function expectThresholds (thresholds, warningThreshold, alertThreshold) { diff --git a/test/models/station.js b/test/models/station.js index 793a23ce1..477ec84b8 100644 --- a/test/models/station.js +++ b/test/models/station.js @@ -45,7 +45,7 @@ lab.experiment('Station model test', () => { Code.expect(Result.thresholds[2].values).to.equal([ { id: 'alertThreshold', - description: 'Low lying land flooding possible above this level. One or more flood alerts may be issued', + description: 'Low-lying land flooding possible above this level. One or more flood alerts may be issued.', shortname: 'Possible flood alerts', value: '3.22' } @@ -75,7 +75,7 @@ lab.experiment('Station model test', () => { Code.expect(Result.thresholds[2].values).to.equal([ { id: 'alertThreshold', - description: 'Top of normal range. Low lying land flooding possible above this level. One or more flood alerts may be issued', + description: 'Top of normal range. Low-lying land flooding possible above this level. One or more flood alerts may be issued.', shortname: 'Top of normal range', value: '2.84' } @@ -229,7 +229,7 @@ lab.experiment('Station model test', () => { [ { id: 'alertThreshold', - description: 'Low lying land flooding possible above this level. One or more flood alerts may be issued', + description: 'Low-lying land flooding possible above this level. One or more flood alerts may be issued.', shortname: 'Possible flood alerts', value: '3.88' } diff --git a/test/routes/station.js b/test/routes/station.js index 3af2d32d2..dcbeb0488 100644 --- a/test/routes/station.js +++ b/test/routes/station.js @@ -2028,8 +2028,8 @@ lab.experiment('Test - /station/{id}', () => { const response = await server.inject(options) Code.expect(response.statusCode).to.equal(200) - Code.expect(response.payload).to.not.contain('Low lying land flooding is possible above this level. One or more flood alerts may be issued') - Code.expect(response.payload).to.not.contain('Property flooding is possible above this level. One or more flood warnings may be issued') + Code.expect(response.payload).to.not.contain('Low-lying land flooding is possible above this level. One or more flood alerts may be issued.') + Code.expect(response.payload).to.not.contain('Property flooding is possible above this level. One or more flood warnings may be issued.') }) lab.test('GET station/5146 with missing percentile ', async () => { const floodService = require('../../server/services/flood')