Skip to content

Commit 323b1e0

Browse files
authored
Merge pull request #229 from hmrc/DL-18141
DL-18141 - adds service name to page titles
2 parents e3c42a1 + ce5aea8 commit 323b1e0

16 files changed

+28
-27
lines changed

app/views/details_not_found.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
}
3939
}
4040

41-
@bcMain(title = titleBuilder(messages("bc.details-not-found.header")), service = service, backlink=Some(backLinkHtml)) {
41+
@bcMain(title = titleBuilder(messages("bc.details-not-found.header"), None, Some(service)), service = service, backlink=Some(backLinkHtml)) {
4242

4343
@if(isAgent) {
4444
<span class="govuk-caption-xl hmrc-caption-xl" id="business-verification-agent-text">@messages("bc.business-verification.agent.text", service.toUpperCase)</span>

app/views/nonUkReg/nrl_question.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
}
3939
}
4040

41-
@bcMain(title = titleBuilder(messages("bc.nrl.title"), Some(nrlQuestionForm)), service = service, backlink=Some(backLinkHtml)) {
41+
@bcMain(title = titleBuilder(messages("bc.nrl.title"), Some(nrlQuestionForm), Some(service)), service = service, backlink=Some(backLinkHtml)) {
4242

4343
@if(nrlQuestionForm.errors.nonEmpty) {
4444
@govukErrorSummary(ErrorSummary().withFormErrorsAsText(nrlQuestionForm))

app/views/nonUkReg/paySAQuestion.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
}
4141
}
4242

43-
@bcMain(title = titleBuilder(messages("bc.nonuk.paySA.title"), Some(paySAQuestionForm)), service = service,
43+
@bcMain(title = titleBuilder(messages("bc.nonuk.paySA.title"), Some(paySAQuestionForm), Some(service)), service = service,
4444
backlink=Some(backLinkHtml)) {
4545

4646
@if(paySAQuestionForm.errors.nonEmpty) {

app/views/nonUkReg/update_business_registration.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
}
6565
}
6666

67-
@bcMain(title = titleBuilder(messages(displayDetails.businessRegHeader), Some(businessRegistrationForm)),
67+
@bcMain(title = titleBuilder(messages(displayDetails.businessRegHeader), Some(businessRegistrationForm), Some(service)),
6868
service = service, pageScripts = Some(pageScripts), backlink=Some(backLinkHtml)) {
6969

7070
@if(businessRegistrationForm.errors.nonEmpty) {

app/views/nonUkReg/update_overseas_company_registration.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
}
112112
}
113113

114-
@bcMain(title = titleBuilder(messages(displayDetails.title), Some(overseasCompanyForm)), service = service,
114+
@bcMain(title = titleBuilder(messages(displayDetails.title), Some(overseasCompanyForm), Some(service)), service = service,
115115
pageScripts = Some(pageScripts), backlink=Some(backLinkHtml)) {
116116

117117
@if(overseasCompanyForm.errors.nonEmpty) {

app/views/review_details.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
}
8787
}
8888

89-
@bcMain(title = titleBuilder(headingText), service = service, backlink=Some(backLinkHtml)) {
89+
@bcMain(title = titleBuilder(headingText, None, Some(service)), service = service, backlink=Some(backLinkHtml)) {
9090

9191
<header>
9292
<h1 class="govuk-heading-xl">

app/views/review_details_non_uk_agent.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
}
3838
}
3939

40-
@bcMain(title = titleBuilder(messages("business-review.agent-editable.title", service, Some(service))), service = service,
40+
@bcMain(title = titleBuilder(messages("business-review.agent-editable.title", service), None, Some(service)), service = service,
4141
backlink=Some(backLinkHtml)) {
4242

4343
<header>

conf/messages

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ bc.screen-reader.section = This section is:
88
bc.screen-reader.name = this is for:
99

1010
bc.ated.serviceName = Register for ATED
11+
bc.ATED.serviceName = Register for ATED
1112
bc.awrs.serviceName = Register as an alcohol wholesaler or producer
1213
bc.amls.serviceName = Anti Money Laundering Supervision
1314
bc.fhdds.serviceName = Apply for the Fulfilment House Due Diligence Scheme

test/controllers/BusinessVerificationControllerSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class BusinessVerificationControllerSpec
185185
businessVerificationWithAuthorisedUser(controller) { result =>
186186
val document = Jsoup.parse(contentAsString(result))
187187

188-
document.title() must be("What is your business type? - GOV.UK")
188+
document.title() must be("What is your business type? - Register for ATED - GOV.UK")
189189
document.getElementsByClass("govuk-caption-xl").text() must be(
190190
"This section is ATED registration"
191191
)
@@ -283,7 +283,7 @@ class BusinessVerificationControllerSpec
283283
val document = Jsoup.parse(contentAsString(result))
284284

285285
document.title() must be(
286-
"What is the business type for your agency? - GOV.UK"
286+
"What is the business type for your agency? - Register for ATED - GOV.UK"
287287
)
288288
document.getElementsByClass("govuk-caption-xl").text() must be(
289289
"This section is ATED agency set up"

test/controllers/nonUKReg/AgentRegisterNonUKClientControllerSpec.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class AgentRegisterNonUKClientControllerSpec extends PlaySpec with GuiceOneServe
9595
status(result) must be(OK)
9696
val document = Jsoup.parse(contentAsString(result))
9797

98-
document.title() must be("What is your client’s overseas registered business name and address? - GOV.UK")
98+
document.title() must be("What is your client’s overseas registered business name and address? - Register for ATED - GOV.UK")
9999
document.getElementsByClass("govuk-caption-xl").text() must be("This section is: Add a client")
100100
document.getElementsByTag("h1").text() must include("What is your client’s overseas registered business name and address?")
101101
document.getElementsByAttributeValue("for", "businessName").text() must be("Business name")
@@ -119,7 +119,7 @@ class AgentRegisterNonUKClientControllerSpec extends PlaySpec with GuiceOneServe
119119
status(result) must be(OK)
120120
val document = Jsoup.parse(contentAsString(result))
121121

122-
document.title() must be("What is your client’s overseas registered business name and address? - GOV.UK")
122+
document.title() must be("What is your client’s overseas registered business name and address? - Register for ATED - GOV.UK")
123123
document.getElementsByClass("govuk-caption-xl").text() must be("This section is: Add a client")
124124
document.getElementsByTag("h1").text() must include("What is your client’s overseas registered business name and address?")
125125
document.getElementsByAttributeValue("for", "businessName").text() must be("Business name")
@@ -146,7 +146,7 @@ class AgentRegisterNonUKClientControllerSpec extends PlaySpec with GuiceOneServe
146146
verify(mockBackLinkCache, times(1)).
147147
saveBackLink(ArgumentMatchers.any(), ArgumentMatchers.any())(ArgumentMatchers.any(), ArgumentMatchers.any())
148148

149-
document.title() must be("What is your client’s overseas registered business name and address? - GOV.UK")
149+
document.title() must be("What is your client’s overseas registered business name and address? - Register for ATED - GOV.UK")
150150
document.getElementsByClass("govuk-caption-xl").text() must be("This section is: Add a client")
151151
document.getElementsByTag("h1").text() must include("What is your client’s overseas registered business name and address?")
152152
document.getElementsByAttributeValue("for", "businessName").text() must be("Business name")
@@ -169,7 +169,7 @@ class AgentRegisterNonUKClientControllerSpec extends PlaySpec with GuiceOneServe
169169
status(result) must be(OK)
170170
val document = Jsoup.parse(contentAsString(result))
171171

172-
document.title() must be("What is your client’s overseas registered business name and address? - GOV.UK")
172+
document.title() must be("What is your client’s overseas registered business name and address? - Register for ATED - GOV.UK")
173173
document.getElementsByClass("govuk-caption-xl").text() must be("This section is: Add a client")
174174
document.getElementsByTag("h1").text() must include("What is your client’s overseas registered business name and address?")
175175
document.getElementsByAttributeValue("for", "businessName").text() must be("Business name")
@@ -195,7 +195,7 @@ class AgentRegisterNonUKClientControllerSpec extends PlaySpec with GuiceOneServe
195195
status(result) must be(OK)
196196
val document = Jsoup.parse(contentAsString(result))
197197

198-
document.title() must be("What is your client’s overseas registered business name and address? - GOV.UK")
198+
document.title() must be("What is your client’s overseas registered business name and address? - Register for ATED - GOV.UK")
199199
document.getElementsByClass("govuk-caption-xl").text() must be("This section is: Add a client")
200200
document.getElementsByTag("h1").text() must include("What is your client’s overseas registered business name and address?")
201201
document.getElementById("businessName").`val`() must be("ACME")

0 commit comments

Comments
 (0)