-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VEOSS-1428 | Create new template for amend registration (#1055)
VEOSS-1428 | Modify content following review recommendations VEOSS-1428 | Change email subject for consistency with rest of template
- Loading branch information
1 parent
c4a9c7d
commit 450af59
Showing
6 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...v/hmrc/hmrcemailrenderer/templates/oss/oss_registration_amendment_confirmation.scala.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@* | ||
* Copyright 2023 HM Revenue & Customs | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*@ | ||
|
||
@(params: Map[String, Any]) | ||
@uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.template_main(params, "One Stop Shop registration details updated") { | ||
@uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.salutation(params) | ||
<p style="margin: 0px 0 30px; font-size: 19px;"> | ||
You successfully updated your One Stop Shop registration details on @params("amendmentDate"). | ||
</p> | ||
<p style="margin: 0px 0 30px; font-size: 19px;"> | ||
From the VAT One Stop Shop team | ||
</p> | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
...ov/hmrc/hmrcemailrenderer/templates/oss/oss_registration_amendment_confirmation.scala.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@(params: Map[String, Any])One Stop Shop registration details updated | ||
|
||
@uk.gov.hmrc.hmrcemailrenderer.templates.helpers.txt.salutation(params) | ||
|
||
You successfully updated your One Stop Shop registration details on @params("amendmentDate"). | ||
|
||
From the VAT One Stop Shop team | ||
|
||
@{uk.gov.hmrc.hmrcemailrenderer.templates.helpers.txt.template_footer()} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
...k/gov/hmrc/hmrcemailrenderer/templates/oss/OSSRegistrationAmendmentConfirmationSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Copyright 2023 HM Revenue & Customs | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package uk.gov.hmrc.hmrcemailrenderer.templates.oss | ||
|
||
import org.scalatest.{ EitherValues, OptionValues } | ||
import org.scalatest.matchers.should.Matchers | ||
import org.scalatest.wordspec.AnyWordSpecLike | ||
import uk.gov.hmrc.hmrcemailrenderer.domain.MessagePriority | ||
import uk.gov.hmrc.hmrcemailrenderer.templates.ServiceIdentifier.OSS | ||
import uk.gov.hmrc.hmrcemailrenderer.templates.{ CommonParamsForSpec, TemplateLoader, TemplateLocator } | ||
|
||
class OSSRegistrationAmendmentConfirmationSpec | ||
extends AnyWordSpecLike with Matchers with OptionValues with EitherValues with TemplateLoader | ||
with CommonParamsForSpec { | ||
|
||
"OSS Registration Amendment Confirmation" should { | ||
|
||
val templateLocator = new TemplateLocator {} | ||
val params = commonParameters ++ Map( | ||
"recipientName_line1" -> "Joe Bloggs", | ||
"amendmentDate" -> "23 May 2023" | ||
) | ||
val template = templateLocator | ||
.templateGroups("OSS") | ||
.find(_.templateId == "oss_registration_amendment_confirmation") | ||
.get | ||
|
||
"render correct meta information" in { | ||
template.templateId shouldBe "oss_registration_amendment_confirmation" | ||
template.service shouldBe OSS | ||
template.fromAddress(Map.empty) shouldBe "VAT One Stop Shop Team <noreply@tax.service.gov.uk>" | ||
template.subject(Map.empty) shouldBe "HMRC: One Stop Shop details updated" | ||
template.priority shouldBe Some(MessagePriority.Background) | ||
} | ||
|
||
"render correct html content" in { | ||
val htmlContent = template.htmlTemplate(params).toString() | ||
|
||
htmlContent should include("Dear Joe Bloggs") | ||
htmlContent should include("One Stop Shop registration details updated") | ||
htmlContent should include("You successfully updated your One Stop Shop registration details on 23 May 2023.") | ||
htmlContent should include("From the VAT One Stop Shop team") | ||
} | ||
|
||
"render correct text content" in { | ||
val txtContent = template.plainTemplate(params).toString() | ||
|
||
txtContent should include("Dear Joe Bloggs") | ||
txtContent should include("One Stop Shop registration details updated") | ||
txtContent should include("You successfully updated your One Stop Shop registration details on 23 May 2023.") | ||
txtContent should include("From the VAT One Stop Shop team") | ||
} | ||
} | ||
} |