Skip to content

Commit

Permalink
FSR-1356: Add hyphen in 'low-lying land' and full stop to 'One or mor…
Browse files Browse the repository at this point in the history
…e flood alerts may be issued' on station threshold level list
  • Loading branch information
Keyurx11 committed Oct 28, 2024
1 parent 2bcf9af commit f8b429f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions server/models/views/lib/process-imtd-thresholds.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down Expand Up @@ -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
})
Expand All @@ -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
})
Expand Down
2 changes: 1 addition & 1 deletion test/models/lib/process-imtd-thresholds.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions test/models/station.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down Expand Up @@ -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'
}
Expand Down Expand Up @@ -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'
}
Expand Down
4 changes: 2 additions & 2 deletions test/routes/station.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit f8b429f

Please sign in to comment.