@Html(Messages("generic.start-now"))
+ @Html(Messages("generic.back"))
}
diff --git a/conf/messages b/conf/messages
index 805b5285..c21bcc3a 100644
--- a/conf/messages
+++ b/conf/messages
@@ -499,7 +499,7 @@ pages.previousyear.lede=You can apply for Marriage Allowance from when it was fi
pages.previousyear.para=You told us you married or formed a civil partnership with {0} on {1}. This means you can apply for earlier tax years.
#confirm-page
-pages.confirm.lower.earner=Your details(the lower earner)
+pages.confirm.lower.earner=Your details (the lower earner)
pages.confirm.higher.earner=Your partner''s details (the higher earner)
pages.confirm.current.tax=Current tax year: {0} onwards
pages.confirm.current.tax.desc=HMRC will change your and {0} tax codes to save {1} up to £{2}. Marriage Allowance will automatically continue until you or {3} cancel it or are no longer eligible as a couple.
diff --git a/conf/messages.cy b/conf/messages.cy
index db0d8535..a6e039c2 100644
--- a/conf/messages.cy
+++ b/conf/messages.cy
@@ -500,7 +500,7 @@ pages.previousyear.lede=CY_You can apply for Marriage Allowance from when it was
pages.previousyear.para=CY_You told us you married or formed a civil partnership with {0} on {1}. This means you can apply for earlier tax years.
#confirm-page
-pages.confirm.lower.earner=CY_Your details(the lower earner)
+pages.confirm.lower.earner=CY_Your details (the lower earner)
pages.confirm.higher.earner=CY_partner''s details (the higher earner)
pages.confirm.current.tax=CY_Current tax year: {0} onwards
pages.confirm.current.tax.desc=CY_HMRC will change your and {0} tax codes to save {1} up to £{2}. Marriage Allowance will automatically continue until you or {3} cancel it or are no longer eligible as a couple.
diff --git a/test/controllers/ContentTest.scala b/test/controllers/ContentTest.scala
index a13875cf..f27d2a3b 100644
--- a/test/controllers/ContentTest.scala
+++ b/test/controllers/ContentTest.scala
@@ -479,6 +479,10 @@ class ContentTest extends UnitSpec with TestUtility {
val err = field.getElementsByClass("client-error-notification")
err.size() shouldBe 1
+
+ val back = document.getElementsByClass("link-back")
+ back shouldNot be(null)
+ back.attr("href") shouldBe marriageAllowanceUrl("/transfer-allowance")
}
"display form error message (date of marriage is after today's date)" in new WithApplication(fakeApplication) {
@@ -552,7 +556,9 @@ class ContentTest extends UnitSpec with TestUtility {
val document = Jsoup.parse(contentAsString(result))
document.getElementById("firstNameOnly").text() shouldBe "foo"
document.getElementById("marriageDate").text() shouldBe "10 April 2011"
-
+ val back = document.getElementsByClass("link-back")
+ back shouldNot be(null)
+ back.attr("href") shouldBe marriageAllowanceUrl("/eligible-years")
}
"display form error message (no year choice made )" in new WithApplication(fakeApplication) {
@@ -599,6 +605,10 @@ class ContentTest extends UnitSpec with TestUtility {
labelName.getElementsByClass("error-message").first() shouldNot be(null)
labelName.getElementsByClass("error-message").first().text() shouldBe "Tell us your email address."
document.getElementById("transferor-email-error").text() shouldBe "Confirm your email"
+
+ val back = document.getElementsByClass("link-back")
+ back shouldNot be(null)
+ back.attr("href") shouldBe marriageAllowanceUrl("/previous-years")
}
"display form error message (transferor email is empty)" in new WithApplication(fakeApplication) {
diff --git a/test/controllers/MarriageAllowanceControllerTest.scala b/test/controllers/MarriageAllowanceControllerTest.scala
index 115f9ee0..9bf8c6a9 100644
--- a/test/controllers/MarriageAllowanceControllerTest.scala
+++ b/test/controllers/MarriageAllowanceControllerTest.scala
@@ -208,6 +208,9 @@ class MarriageAllowanceControllerTest extends UnitSpec with TestUtility {
status(result) shouldBe OK
val document = Jsoup.parse(contentAsString(result))
+ val back = document.getElementsByClass("link-back")
+ back shouldNot be(null)
+ back.attr("href") shouldBe marriageAllowanceUrl("/date-of-marriage")
}
"show No Tax Years selected page if user is only eligible for current year and chooses no" in new WithApplication(fakeApplication) {
diff --git a/test/controllers/RoutesTest.scala b/test/controllers/RoutesTest.scala
index eedb99d8..b8a6763f 100644
--- a/test/controllers/RoutesTest.scala
+++ b/test/controllers/RoutesTest.scala
@@ -150,6 +150,10 @@ class RoutesTest extends UnitSpec with TestUtility {
continue shouldNot be(null)
continue.text() shouldBe "Start now"
continue.attr("href") shouldBe "/marriage-allowance-application/history"
+
+ val back = document.getElementsByClass("link-back")
+ back shouldNot be(null)
+ back.attr("href") shouldBe marriageAllowanceUrl("/partners-income")
}
}
@@ -337,6 +341,10 @@ class RoutesTest extends UnitSpec with TestUtility {
status(result) shouldBe OK
val document = Jsoup.parse(contentAsString(result))
document.getElementById("create").text() shouldBe "Confirm your application"
+
+ val back = document.getElementsByClass("link-back")
+ back shouldNot be(null)
+ back.attr("href") shouldBe marriageAllowanceUrl("/confirm-your-email")
}
@@ -828,9 +836,13 @@ class RoutesTest extends UnitSpec with TestUtility {
document.getElementById("form-error-message").text() shouldBe TestConstants.ERROR_MANDATORY_DATA_TEXT
document.getElementById("marriage-criteria-error").text() shouldBe "Confirm if you are married or in a legally registered civil partnership"
+
+ val back = document.getElementsByClass("link-back")
+ back shouldNot be(null)
+ back.attr("href") shouldBe ("https://www.gov.uk/apply-marriage-allowance")
}
- "redirect to lower earner page if answer is yes" in new WithApplication(fakeApplication) {
+ "redirect to lower earner page if answer is yes and have back button" in new WithApplication(fakeApplication) {
val request = FakeRequest().withCookies(Cookie("TAMC_JOURNEY", "GDS")).withFormUrlEncodedBody("marriage-criteria" -> "true")
val controllerToTest = makeMultiYearGdsEligibilityController()
val result = controllerToTest.eligibilityCheckAction()(request)
@@ -850,9 +862,6 @@ class RoutesTest extends UnitSpec with TestUtility {
val finish = document.getElementById("button-finished")
finish shouldNot be(null)
finish.attr("href") shouldBe "https://www.gov.uk/marriage-allowance-guide"
- val continue = document.getElementById("back")
- continue shouldNot be(null)
- continue.attr("href") shouldBe marriageAllowanceUrl("/eligibility-check")
}
}
@@ -870,6 +879,10 @@ class RoutesTest extends UnitSpec with TestUtility {
document.getElementById("form-error-message").text() shouldBe TestConstants.ERROR_MANDATORY_DATA_TEXT
document.getElementById("lower-earner-error").text shouldBe "Confirm if you are the lower earner in the relationship"
+
+ val back = document.getElementsByClass("link-back")
+ back shouldNot be(null)
+ back.attr("href") shouldBe marriageAllowanceUrl("/eligibility-check")
}
"redirect to who should transfer page irrespective of selection" in new WithApplication(fakeApplication) {
@@ -896,6 +909,10 @@ class RoutesTest extends UnitSpec with TestUtility {
document.getElementById("form-error-message").text() shouldBe TestConstants.ERROR_MANDATORY_DATA_TEXT
document.getElementsByClass("partners-inc-error").text shouldBe "You're not eligible for Marriage Allowance in this tax year because your partner's income is too high or too low. You can still continue to check your eligibility for previous years."
+
+ val back = document.getElementsByClass("link-back")
+ back shouldNot be(null)
+ back.attr("href") shouldBe marriageAllowanceUrl("/lower-earner")
}
"redirect to verify page irrespective of selection" in new WithApplication(fakeApplication) {