diff --git a/app/views/confirm.scala.html b/app/views/confirm.scala.html index e9ffabea..e817fa0d 100644 --- a/app/views/confirm.scala.html +++ b/app/views/confirm.scala.html @@ -129,4 +129,6 @@

@Html(Messages("pages.confirm.html.

} +
+ @Html(Messages("generic.back")) } diff --git a/app/views/date_of_marriage.scala.html b/app/views/date_of_marriage.scala.html index 574d2f33..0d835b08 100644 --- a/app/views/date_of_marriage.scala.html +++ b/app/views/date_of_marriage.scala.html @@ -54,5 +54,7 @@

@Html(Messages("pages.date-of-marriage.heading"))

-} + } +
+ @Html(Messages("generic.back")) } diff --git a/app/views/eligible_years.scala.html b/app/views/eligible_years.scala.html index 853f847e..23860987 100644 --- a/app/views/eligible_years.scala.html +++ b/app/views/eligible_years.scala.html @@ -82,4 +82,6 @@

@Html(Messages("pages.eligibleyear.doyou.want"))

} +
+ @Html(Messages("generic.back")) } diff --git a/app/views/email.scala.html b/app/views/email.scala.html index 34d51115..e0035db6 100644 --- a/app/views/email.scala.html +++ b/app/views/email.scala.html @@ -50,4 +50,6 @@

@Html(Messages("pages.form.field.your-confirmation"))

} -} \ No newline at end of file +
+ @Html(Messages("generic.back")) +} diff --git a/app/views/errors/no_year_selected.scala.html b/app/views/errors/no_year_selected.scala.html index 1398f980..b5eb2ee6 100644 --- a/app/views/errors/no_year_selected.scala.html +++ b/app/views/errors/no_year_selected.scala.html @@ -25,9 +25,10 @@ @templates.tamc_main( title = Messages("title.pattern", Messages("title.other-ways")), mainConfig = views.helpers.MainConfig( - maybeMainDataAttributes = Some(Html("data-journey=marriage-allowance:stage:other-ways")))) { + maybeMainDataAttributes = Some(Html("data-journey=marriage-allowance:stage:other-ways")))) {

You haven't selected any tax years to apply for

Go back if you want to select a year to apply for.

You can find out more about how Marriage Allowance works.

-Back +
+@Html(Messages("generic.back")) } diff --git a/app/views/multi_year_select.scala.html b/app/views/multi_year_select.scala.html index e5fa723f..c24ceb85 100644 --- a/app/views/multi_year_select.scala.html +++ b/app/views/multi_year_select.scala.html @@ -74,5 +74,7 @@

@TextGenerators.taxDateInter

} +
+ @Html(Messages("generic.back")) } diff --git a/app/views/multiyear/gds/eligibility_check.scala.html b/app/views/multiyear/gds/eligibility_check.scala.html index eaa1a74c..8f4472e4 100644 --- a/app/views/multiyear/gds/eligibility_check.scala.html +++ b/app/views/multiyear/gds/eligibility_check.scala.html @@ -26,7 +26,7 @@ @templates.tamc_main( title = Messages("title.pattern", Messages("title.eligibility"))){ @if(ApplicationConfig.isWelshEnabled){ - @templates.lang_button(controllers.routes.LanguageController.switchToEnglishEligibilityCheck.toString(), + @templates.lang_button(controllers.routes.LanguageController.switchToEnglishEligibilityCheck.toString(), controllers.routes.LanguageController.switchToWelshEligibilityCheck.toString()) }

@@ -58,4 +58,5 @@

} + @Html(Messages("generic.back")) } diff --git a/app/views/multiyear/gds/eligibility_non_eligible_finish.scala.html b/app/views/multiyear/gds/eligibility_non_eligible_finish.scala.html index 80bbf905..b44b8d7a 100644 --- a/app/views/multiyear/gds/eligibility_non_eligible_finish.scala.html +++ b/app/views/multiyear/gds/eligibility_non_eligible_finish.scala.html @@ -28,9 +28,5 @@

@Html(Messages("eligibility.check.header"))

@Html(Messages("generic.finish"))

- - @Html(Messages("generic.back")) - + @Html(Messages("generic.back")) } - -click \ No newline at end of file diff --git a/app/views/multiyear/gds/lower_earner.scala.html b/app/views/multiyear/gds/lower_earner.scala.html index dcbf2053..31dc49b2 100644 --- a/app/views/multiyear/gds/lower_earner.scala.html +++ b/app/views/multiyear/gds/lower_earner.scala.html @@ -33,7 +33,7 @@ @if(ApplicationConfig.isWelshEnabled){ @templates.lang_button(controllers.routes.LanguageController.switchToEnglishLowerEarnerCheck.toString(), controllers.routes.LanguageController.switchToWelshLowerEarnerCheck.toString()) - } + }

@Html(Messages("eligibility.check.span.h1"))
@Html(Messages("eligibility.check.lower.earner.h1"))

@@ -67,4 +67,5 @@

} + @Html(Messages("generic.back")) } diff --git a/app/views/multiyear/gds/partners_income_question.scala.html b/app/views/multiyear/gds/partners_income_question.scala.html index 60b7f904..e8bd6102 100644 --- a/app/views/multiyear/gds/partners_income_question.scala.html +++ b/app/views/multiyear/gds/partners_income_question.scala.html @@ -63,4 +63,5 @@

} -} \ No newline at end of file + @Html(Messages("generic.back")) +} diff --git a/app/views/previous_years.scala.html b/app/views/previous_years.scala.html index cccb1741..c0829282 100644 --- a/app/views/previous_years.scala.html +++ b/app/views/previous_years.scala.html @@ -32,11 +32,14 @@ @templates.tamc_main( title = Messages("title.pattern", Messages("title.extra-years"))){ -

@Html(Messages("pages.previousyear.header"))

-

@Html(Messages("pages.previousyear.lede"))

+

@Html(Messages("pages.previousyear.header"))

+

@Html(Messages("pages.previousyear.lede"))

-

@Html(Messages("pages.previousyear.para", input.name, TextGenerators.ukDateTransformer(Some(input.dateOfMarriage))))

- @Html(Messages("generic.continue")) +

@Html(Messages("pages.previousyear.para", input.name, TextGenerators.ukDateTransformer(Some(input.dateOfMarriage))))

+ @Html(Messages("generic.continue")) +
+
+ @Html(Messages("generic.back")) } diff --git a/app/views/verify.scala.html b/app/views/verify.scala.html index 3c238916..3d8610b4 100644 --- a/app/views/verify.scala.html +++ b/app/views/verify.scala.html @@ -37,5 +37,6 @@

@Html(Messages("pages.verify_triage.header"))

@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) {