Skip to content

Commit

Permalink
DLS-9697 fix duplicate ids (#182)
Browse files Browse the repository at this point in the history
Signed-off-by: David Catt <david.lewis.catt@digital.hmrc.gov.uk>
  • Loading branch information
goodvibes authored Jan 16, 2024
1 parent ab3a90f commit 0d1c674
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions app/views/playHelpers/resident/finalSummaryPartial.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ <h2 class="govuk-heading-m">@Messages("calc.summary.calculationDetails.heading")
}

@if(gainAnswers.ownerBeforeLegislationStart){
@summaryNumericRowPartial("acquisitionValue", Messages("calc.summary.calculationDetails.acquisitionValueBeforeLegislation"), gainAnswers.valueBeforeLegislationStart.get)
@summaryNumericRowPartial("acquisitionValueBeforeLegislation", Messages("calc.summary.calculationDetails.acquisitionValueBeforeLegislation"), gainAnswers.valueBeforeLegislationStart.get)
}

@{if(gainAnswers.displayWorthWhenBought)
summaryNumericRowPartial("acquisitionValue",Messages("calc.summary.calculationDetails.acquisitionValue"), gainAnswers.acquisitionValue.get)
summaryNumericRowPartial("acquisitionValueWhenBought",Messages("calc.summary.calculationDetails.acquisitionValue"), gainAnswers.acquisitionValue.get)
}

@{if(gainAnswers.displayWorthWhenInherited)
summaryNumericRowPartial("acquisitionValue", Messages("calc.summary.calculationDetails.acquisitionValue"), gainAnswers.worthWhenInherited.get)
summaryNumericRowPartial("acquisitionValueWhenInherited", Messages("calc.summary.calculationDetails.acquisitionValue"), gainAnswers.worthWhenInherited.get)
}

@summaryNumericRowPartial("totalCosts", Messages("calc.summary.calculationDetails.totalCosts"), totalCosts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ class SharesFinalSummaryViewSpec extends CommonPlaySpec with WithCommonFakeAppli

"has a row for acquisition value" which {
s"has the text '${summaryMessages.acquisitionValue}'" in {
div.select("#acquisitionValue-text").text shouldBe summaryMessages.acquisitionValue
div.select("#acquisitionValueWhenBought-text").text shouldBe summaryMessages.acquisitionValue
}

"has the value '£0'" in {
div.select("#acquisitionValue-amount").text shouldBe "£0"
div.select("#acquisitionValueWhenBought-amount").text shouldBe "£0"
}
}

Expand Down
12 changes: 6 additions & 6 deletions test/views/helpers/FinalSummaryPartialViewSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ class FinalSummaryPartialViewSpec extends CommonPlaySpec with WithCommonFakeAppl

"has a row for acquisition value" which {
s"has the text '${summaryMessages.acquisitionValue}'" in {
div.select("#acquisitionValue-text").text shouldBe summaryMessages.acquisitionValue
div.select("#acquisitionValueWhenBought-text").text shouldBe summaryMessages.acquisitionValue
}

"has the value '£0'" in {
div.select("#acquisitionValue-amount").text shouldBe "£0"
div.select("#acquisitionValueWhenBought-amount").text shouldBe "£0"
}
}

Expand Down Expand Up @@ -536,11 +536,11 @@ class FinalSummaryPartialViewSpec extends CommonPlaySpec with WithCommonFakeAppl

"has a row for acquisition value" which {
s"has the text '${summaryMessages.acquisitionValueBeforeLegislation}'" in {
doc.select("#acquisitionValue-text").text shouldBe summaryMessages.acquisitionValueBeforeLegislation
doc.select("#acquisitionValueBeforeLegislation-text").text shouldBe summaryMessages.acquisitionValueBeforeLegislation
}

"has the value '£350,000'" in {
doc.select("#acquisitionValue-amount").text shouldBe "£350,000"
doc.select("#acquisitionValueBeforeLegislation-amount").text shouldBe "£350,000"
}
}

Expand Down Expand Up @@ -588,11 +588,11 @@ class FinalSummaryPartialViewSpec extends CommonPlaySpec with WithCommonFakeAppl

"has a row for acquisition value" which {
s"has the text '${summaryMessages.acquisitionValue}'" in {
doc.select("#acquisitionValue-text").text shouldBe summaryMessages.acquisitionValue
doc.select("#acquisitionValueWhenInherited-text").text shouldBe summaryMessages.acquisitionValue
}

"has the value '£300,000'" in {
doc.select("#acquisitionValue-amount").text shouldBe "£300,000"
doc.select("#acquisitionValueWhenInherited-amount").text shouldBe "£300,000"
}
}
}
Expand Down

0 comments on commit 0d1c674

Please sign in to comment.