Skip to content

Commit d5a163a

Browse files
authored
fix: add title casing for phaseTag (#1324)
* fix: add title casing for phaseTag * update unit test to check for title case phase tags
1 parent 6bd75f8 commit d5a163a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

runner/src/server/views/layout.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,14 @@
135135
{% if feedbackLink %}
136136
{{ govukPhaseBanner({
137137
tag: {
138-
text: phaseTag
138+
text: phaseTag | title
139139
},
140140
html: 'This is a new service – your <a class="govuk-link" href=' + feedbackLink + '>feedback</a> will help us to improve it.'
141141
}) }}
142142
{% else %}
143143
{{ govukPhaseBanner({
144144
tag: {
145-
text: phaseTag
145+
text: phaseTag | title
146146
}
147147
}) }}
148148
{% endif %}

runner/test/cases/server/phase-banner.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ suite(`Phase banner`, () => {
3232
const $ = cheerio.load(response.payload);
3333

3434
expect($(".govuk-phase-banner__content__tag").text().trim()).to.equal(
35-
"beta"
35+
"Beta"
3636
);
3737
});
3838

@@ -54,7 +54,7 @@ suite(`Phase banner`, () => {
5454
const $ = cheerio.load(response.payload);
5555

5656
expect($(".govuk-phase-banner__content__tag").text().trim()).to.equal(
57-
"alpha"
57+
"Alpha"
5858
);
5959
});
6060

0 commit comments

Comments
 (0)