Skip to content

Commit

Permalink
MCSC-1120, Comma Separated Numerical Values for Submission journey pa…
Browse files Browse the repository at this point in the history
…ges (#390)
  • Loading branch information
TJSarno authored Dec 16, 2024
1 parent f9c7115 commit 235e0b1
Show file tree
Hide file tree
Showing 23 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions app/utils/CurrencyFormatter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package utils
import utils.CurrencyFormatter.formatNumberString

trait CurrencyFormatter {
def currencyFormat(amt: BigInt): String = f"£$amt"
def currencyFormat(amt: Int): String = f"£$amt"
def currencyFormat(amt: BigInt): String = formatNumberString(amt.toString)
def currencyFormat(amt: Int): String = formatNumberString(amt.toString)
def currencyFormat(string: String): String = formatNumberString(string)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class PIAPreRemedySummarySpec extends AnyFreeSpec with Matchers {
Some(
SummaryListRowViewModel(
key = "pIAPreRemedy.checkYourAnswersLabel.2011",
value = ValueViewModel(HtmlContent("£123")),
value = ValueViewModel(HtmlContent("£123")),
actions = Seq(
ActionItemViewModel("site.change", routes.PIAPreRemedyController.onPageLoad(CheckMode, Period._2011).url)
.withVisuallyHiddenText("pIAPreRemedy.change.hidden")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class AdjustedIncomeSummarySpec extends AnyFreeSpec with Matchers {
AdjustedIncomeSummary.row(userAnswers, period) shouldBe Some(
SummaryListRowViewModel(
key = "adjustedIncome.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class AmountClaimedOnOverseasPensionSummarySpec extends AnyFreeSpec with Matcher
AmountClaimedOnOverseasPensionSummary.row(userAnswers, period) shouldBe Some(
SummaryListRowViewModel(
key = "amountClaimedOnOverseasPension.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class AmountOfGiftAidSummarySpec extends AnyFreeSpec with Matchers {
AmountOfGiftAidSummary.row(userAnswers, period) shouldBe Some(
SummaryListRowViewModel(
key = "amountOfGiftAid.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class BlindPersonsAllowanceAmountSummarySpec extends AnyFreeSpec with Matchers {
BlindPersonsAllowanceAmountSummary.row(userAnswers, period) shouldBe Some(
SummaryListRowViewModel(
key = "blindPersonsAllowanceAmount.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£2325")),
value = ValueViewModel(HtmlContent("£2,325")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class DefinedBenefitAmountSummarySpec extends AnyFreeSpec with Matchers {
DefinedBenefitAmountSummary.row(userAnswers, period) shouldBe Some(
SummaryListRowViewModel(
key = "definedBenefitAmount.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class DefinedContributionAmountSummarySpec extends AnyFreeSpec with Matchers {
DefinedContributionAmountSummary.row(userAnswers, period) shouldBe Some(
SummaryListRowViewModel(
key = "definedContributionAmount.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down Expand Up @@ -80,7 +80,7 @@ class DefinedContributionAmountSummarySpec extends AnyFreeSpec with Matchers {
DefinedContributionAmountSummary.row(userAnswers, period) shouldBe Some(
SummaryListRowViewModel(
key = "definedContributionAmount.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class FlexiAccessDefinedContributionAmountSummarySpec extends AnyFreeSpec with M
FlexiAccessDefinedContributionAmountSummary.row(userAnswers, period) shouldBe Some(
SummaryListRowViewModel(
key = "flexiAccessDefinedContributionAmount.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down Expand Up @@ -80,7 +80,7 @@ class FlexiAccessDefinedContributionAmountSummarySpec extends AnyFreeSpec with M
FlexiAccessDefinedContributionAmountSummary.row(userAnswers, period) shouldBe Some(
SummaryListRowViewModel(
key = "flexiAccessDefinedContributionAmount.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class HowMuchAAChargeSchemePaidSummarySpec extends AnyFreeSpec with Matchers {
HowMuchAAChargeSchemePaidSummary.row(userAnswers, period, schemeIndex) shouldBe Some(
SummaryListRowViewModel(
key = "howMuchAAChargeSchemePaid.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class HowMuchAAChargeYouPaidSummarySpec extends AnyFreeSpec with Matchers {
HowMuchAAChargeYouPaidSummary.row(userAnswers, period, schemeIndex) shouldBe Some(
SummaryListRowViewModel(
key = "howMuchAAChargeYouPaid.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class HowMuchTaxReliefPensionSummarySpec extends AnyFreeSpec with Matchers {
HowMuchTaxReliefPensionSummary.row(userAnswers, period) shouldBe Some(
SummaryListRowViewModel(
key = "howMuchTaxReliefPension.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class PensionSchemeIncomeAmountsSummarySpec extends AnyFreeSpec with Matchers {
PensionSchemeInputAmountsSummary.row(userAnswers, period, schemeIndex) shouldBe Some(
SummaryListRowViewModel(
key = "pensionSchemeInputAmounts.checkYourAnswersLabelRevised",
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down Expand Up @@ -79,7 +79,7 @@ class PensionSchemeIncomeAmountsSummarySpec extends AnyFreeSpec with Matchers {
PensionSchemeInputAmountsSummary.row(userAnswers, period, schemeIndex) shouldBe Some(
SummaryListRowViewModel(
key = "pensionSchemeInputAmounts.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class PensionSchemeInput2016postAmountsSummarySpec extends AnyFreeSpec with Matc
PensionSchemeInput2016postAmountsSummary.row(userAnswers, period, schemeIndex) shouldBe Some(
SummaryListRowViewModel(
key = messages("pensionSchemeInputAmounts.2016-post.checkYourAnswersLabel", "SomeScheme"),
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class PensionSchemeInput2016preAmountsSummarySpec extends AnyFreeSpec with Match
PensionSchemeInput2016preAmountsSummary.row(userAnswers, period, schemeIndex) shouldBe Some(
SummaryListRowViewModel(
key = messages("pensionSchemeInputAmounts.2016-pre.checkYourAnswersLabel", "SomeScheme"),
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class PersonalAllowanceSummarySpec extends AnyFreeSpec with Matchers {
PersonalAllowanceSummary.row(userAnswers, period) shouldBe Some(
SummaryListRowViewModel(
key = "personalAllowance.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class RASContributionAmountSummarySpec extends AnyFreeSpec with Matchers {
RASContributionAmountSummary.row(userAnswers, period) shouldBe Some(
SummaryListRowViewModel(
key = "rASContributionAmount.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class TaxReliefSummarySpec extends AnyFreeSpec with Matchers {
TaxReliefSummary.row(userAnswers, period) shouldBe Some(
SummaryListRowViewModel(
key = "taxRelief.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class TotalIncomeSummarySpec extends AnyFreeSpec with Matchers {
TotalIncomeSummary.row(userAnswers, period) shouldBe Some(
SummaryListRowViewModel(
key = "totalIncome.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£100")),
value = ValueViewModel(HtmlContent("£100")),
actions = Seq(
ActionItemViewModel(
"site.change",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class AnnualPaymentValueSummarySpec extends AnyFreeSpec with Matchers {
AnnualPaymentValueSummary.row(userAnswers, true) shouldBe Some(
SummaryListRowViewModel(
key = "annualPaymentValue.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£999")),
value = ValueViewModel(HtmlContent("£999")),
actions = Seq(
ActionItemViewModel("site.change", routes.AnnualPaymentValueController.onPageLoad(CheckMode).url)
.withVisuallyHiddenText("annualPaymentValue.change.hidden")
Expand All @@ -62,7 +62,7 @@ class AnnualPaymentValueSummarySpec extends AnyFreeSpec with Matchers {
AnnualPaymentValueSummary.row(userAnswers, false) shouldBe Some(
SummaryListRowViewModel(
key = KeyViewModel(s"annualPaymentValue.checkYourAnswersLabel").withCssClass(keyCssClass),
value = ValueViewModel(HtmlContent("£999"))
value = ValueViewModel(HtmlContent("£999"))
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class LumpSumValueSummarySpec extends AnyFreeSpec with Matchers {
LumpSumValueSummary.row(userAnswers, true) shouldBe Some(
SummaryListRowViewModel(
key = "lumpSumValue.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£999")),
value = ValueViewModel(HtmlContent("£999")),
actions = Seq(
ActionItemViewModel("site.change", routes.LumpSumValueController.onPageLoad(CheckMode).url)
.withVisuallyHiddenText("lumpSumValue.change.hidden")
Expand All @@ -62,7 +62,7 @@ class LumpSumValueSummarySpec extends AnyFreeSpec with Matchers {
LumpSumValueSummary.row(userAnswers, false) shouldBe Some(
SummaryListRowViewModel(
key = KeyViewModel(s"lumpSumValue.checkYourAnswersLabel").withCssClass(keyCssClass),
value = ValueViewModel(HtmlContent("£999"))
value = ValueViewModel(HtmlContent("£999"))
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class NewAnnualPaymentValueSummarySpec extends AnyFreeSpec with Matchers {
NewAnnualPaymentValueSummary.row(userAnswers, true) shouldBe Some(
SummaryListRowViewModel(
key = "newAnnualPaymentValue.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£999")),
value = ValueViewModel(HtmlContent("£999")),
actions = Seq(
ActionItemViewModel("site.change", routes.NewAnnualPaymentValueController.onPageLoad(CheckMode).url)
.withVisuallyHiddenText("newAnnualPaymentValue.change.hidden")
Expand All @@ -62,7 +62,7 @@ class NewAnnualPaymentValueSummarySpec extends AnyFreeSpec with Matchers {
NewAnnualPaymentValueSummary.row(userAnswers, false) shouldBe Some(
SummaryListRowViewModel(
key = KeyViewModel(s"newAnnualPaymentValue.checkYourAnswersLabel").withCssClass(keyCssClass),
value = ValueViewModel(HtmlContent("£999"))
value = ValueViewModel(HtmlContent("£999"))
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class NewLumpSumValueSummarySpec extends AnyFreeSpec with Matchers {
NewLumpSumValueSummary.row(userAnswers, true) shouldBe Some(
SummaryListRowViewModel(
key = "newLumpSumValue.checkYourAnswersLabel",
value = ValueViewModel(HtmlContent("£999")),
value = ValueViewModel(HtmlContent("£999")),
actions = Seq(
ActionItemViewModel("site.change", routes.NewLumpSumValueController.onPageLoad(CheckMode).url)
.withVisuallyHiddenText("newLumpSumValue.change.hidden")
Expand All @@ -62,7 +62,7 @@ class NewLumpSumValueSummarySpec extends AnyFreeSpec with Matchers {
NewLumpSumValueSummary.row(userAnswers, false) shouldBe Some(
SummaryListRowViewModel(
key = KeyViewModel(s"newLumpSumValue.checkYourAnswersLabel").withCssClass(keyCssClass),
value = ValueViewModel(HtmlContent("£999"))
value = ValueViewModel(HtmlContent("£999"))
)
)
}
Expand Down

0 comments on commit 235e0b1

Please sign in to comment.