From 0d1c6745efa22f52bc1719dc3868652abc2b7119 Mon Sep 17 00:00:00 2001 From: David Catt Date: Tue, 16 Jan 2024 16:07:11 +0000 Subject: [PATCH] DLS-9697 fix duplicate ids (#182) Signed-off-by: David Catt --- .../resident/finalSummaryPartial.scala.html | 6 +++--- .../summary/SharesFinalSummaryViewSpec.scala | 4 ++-- test/views/helpers/FinalSummaryPartialViewSpec.scala | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/views/playHelpers/resident/finalSummaryPartial.scala.html b/app/views/playHelpers/resident/finalSummaryPartial.scala.html index 46c8ec2..7fe9356 100644 --- a/app/views/playHelpers/resident/finalSummaryPartial.scala.html +++ b/app/views/playHelpers/resident/finalSummaryPartial.scala.html @@ -59,15 +59,15 @@

@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) diff --git a/test/views/calculation/summary/SharesFinalSummaryViewSpec.scala b/test/views/calculation/summary/SharesFinalSummaryViewSpec.scala index adb100c..c88fda5 100644 --- a/test/views/calculation/summary/SharesFinalSummaryViewSpec.scala +++ b/test/views/calculation/summary/SharesFinalSummaryViewSpec.scala @@ -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" } } diff --git a/test/views/helpers/FinalSummaryPartialViewSpec.scala b/test/views/helpers/FinalSummaryPartialViewSpec.scala index 00233b5..bf19d73 100644 --- a/test/views/helpers/FinalSummaryPartialViewSpec.scala +++ b/test/views/helpers/FinalSummaryPartialViewSpec.scala @@ -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" } } @@ -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" } } @@ -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" } } }