diff --git a/app/views/support/UnderstandingYourAccountView.scala.html b/app/views/support/UnderstandingYourAccountView.scala.html index 05a7455a2..af8963adf 100644 --- a/app/views/support/UnderstandingYourAccountView.scala.html +++ b/app/views/support/UnderstandingYourAccountView.scala.html @@ -44,22 +44,17 @@ @h1("ptap.support.uya.title") @p(Text(messages("ptap.support.uya.p1"))) - @p(Text(messages("ptap.support.uya.p1.list"))) @h2("ptap.support.uya.p2.header") -

- @messages("ptap.support.uya.p2") - @link(configDecorator.personalAccount, messageKey = "ptap.support.uya.p2.link", id = Some("personalAccountLink"), inParagraph = true) -

+ @p(Text(messages("ptap.support.uya.p2"))) + + @h3("ptap.support.uya.p4.sub") + + @p(Text(messages("ptap.support.uya.p4.tab"))) @h3("ptap.support.uya.p2.sub") @@ -69,9 +64,6 @@ @p(Text(messages("ptap.support.uya.p2.tasks.list.other"))) @@ -82,19 +74,11 @@
  • @messages("ptap.support.uya.list.bta")
  • - @h3("ptap.support.uya.p3.sub") - - @p(Text(messages("ptap.support.uya.p3.recent"))) - - @h3("ptap.support.uya.p4.sub") - - @p(Text(messages("ptap.support.uya.p4.tab"))) - @h3("ptap.support.uya.p5.sub") @p(Text(messages("ptap.support.uya.p5.hs"))) - @h3("ptap.support.uya.p6.sub") + @h3("ptap.support.uya.p6.header") @p(Text(messages("ptap.support.uya.p6.hs"))) -} \ No newline at end of file +} diff --git a/conf/messages b/conf/messages index e19ffd8ae..994ef9640 100644 --- a/conf/messages +++ b/conf/messages @@ -875,28 +875,27 @@ ptap.recent-activity.container.default_text.p.line2.2=Your tasks ptap.recent-activity.container.default_text.p.line2.3=for anything you need to do. ptap.support.uya.title=Understanding your HMRC Online account -ptap.support.uya.p1=Your HMRC Online account lets you manage your taxes and benefits in one place. -ptap.support.uya.p1.list=You can use it to access: +ptap.support.uya.p1=Your HMRC online account gives you access to the following services: -ptap.support.uya.p2.header=How to use your HMRC Online account -ptap.support.uya.p2=Use your HMRC Online account by selecting the following sections within your -ptap.support.uya.p2.link=Personal tax account. +ptap.support.uya.p2.header=How to use your HMRC online account +ptap.support.uya.p2=You can use your account by selecting the different sections on your ''Personal tax account'' page. ptap.support.uya.p2.sub=Your tasks -ptap.support.uya.p2.tasks=Complete tasks, such as claiming a refund or paying a tax bill. -ptap.support.uya.p2.tasks.list=You’ll only see tasks for: -ptap.support.uya.p2.tasks.list.other=You may have other tasks if: +ptap.support.uya.p2.tasks=Access tasks that must be completed, such as claiming refunds or paying tax bills. +ptap.support.uya.p2.tasks.list=Your HMRC Online account only displays your tasks for the following services: +ptap.support.uya.p2.tasks.list.other=You may have other tasks: ptap.support.uya.p3.sub=Recent activity -ptap.support.uya.p3.recent=View recent updates, such as payments from your employer or changes to your tax code. +ptap.support.uya.p3.recent=View recent updates such as payments from your job or tax code changes. ptap.support.uya.p4.sub=Taxes and benefits -ptap.support.uya.p4.tab=Check the taxes and benefits you currently have and find others that may be relevant to you. +ptap.support.uya.p4.tab=Check the taxes and benefits you currently have and find out about others that may be relevant to you. ptap.support.uya.p5.sub=HMRC news -ptap.support.uya.p5.hs=Read the latest updates and announcements from HMRC. +ptap.support.uya.p5.hs=Get the latest updates from HMRC. -ptap.support.uya.p6.sub= Support +ptap.support.uya.p6.sub=Support +ptap.support.uya.p6.header=HMRC support ptap.support.uya.p6.hs=Get technical support and help with taxes and benefits. ptap.support.uya.list.paye=Pay As You Earn (PAYE) @@ -906,9 +905,9 @@ ptap.support.uya.list.ats=Annual Tax Summary ptap.support.uya.list.cb=Child Benefit ptap.support.uya.list.ma=Marriage Allowance -ptap.support.uya.list.uos=you use other HMRC services -ptap.support.uya.list.circumstances.link=your circumstances change (opens in new tab) -ptap.support.uya.list.bta=you have a Business Tax Account +ptap.support.uya.list.uos=if you use other HMRC services (you might use different Government Gateway accounts for these) +ptap.support.uya.list.circumstances.link=if your circumstances change (opens in new tab) +ptap.support.uya.list.bta=if you have a Business Tax Account ptap.support.tab.card.hmrc.online.heading=HMRC Online ptap.support.tab.card.paye.heading=Pay As You Earn (PAYE) @@ -959,4 +958,3 @@ ptap.support.tab.card.insurance.state.pension.link.ni=Find out more about Nation ptap.support.tab.card.insurance.state.pension.link.ni.url=https://www.gov.uk/national-insurance ptap.support.tab.card.insurance.state.pension.link.enquiries=Income Tax general enquiries, including contact details for National Insurance and State Pension ptap.support.tab.card.insurance.state.pension.link.enquiries.url=https://www.gov.uk/find-hmrc-contacts/income-tax-enquiries - diff --git a/conf/messages.cy b/conf/messages.cy index 678b167e9..fdc531b97 100644 --- a/conf/messages.cy +++ b/conf/messages.cy @@ -886,53 +886,52 @@ ptap.recent-activity.container.default_text.p.line1=Mae’r dudalen hon yn dango ptap.recent-activity.container.default_text.p.line2.2=Eich tasgau ptap.recent-activity.container.default_text.p.line2.3=am unrhyw beth arall rydych am ei wybod. -ptap.support.uya.title=TBC -ptap.support.uya.p1=TBC -ptap.support.uya.p1.list=TBC +ptap.support.uya.title=Deall eich cyfrif ar-lein CThEF +ptap.support.uya.p1=Mae eich cyfrif ar-lein CThEF yn rhoi mynediad at y gwasanaethau canlynol: -ptap.support.uya.p2.header=TBC -ptap.support.uya.p2=TBC -ptap.support.uya.p2.link=TBC +ptap.support.uya.p2.header=Sut i ddefnyddio’ch cyfrif ar-lein CThEF +ptap.support.uya.p2=Gallwch ddefnyddio eich cyfrif drwy ddewis y gwahanol adrannau ar eich tudalen ‘Cyfrif Treth Personol’. ptap.support.uya.p2.sub=Eich tasgau -ptap.support.uya.p2.tasks=TBC -ptap.support.uya.p2.tasks.list=TBC -ptap.support.uya.p2.tasks.list.other=TBC +ptap.support.uya.p2.tasks=Cael mynediad at dasgau y mae’n rhaid eu cwblhau, fel hawlio ad-daliadau neu dalu biliau treth. +ptap.support.uya.p2.tasks.list=Dim ond eich tasgau ar gyfer y gwasanaethau canlynol y mae’ch cyfrif ar-lein CThEF yn dangos: +ptap.support.uya.p2.tasks.list.other=Efallai fod gennych dasgau eraill: -ptap.support.uya.p3.sub=TBC -ptap.support.uya.p3.recent=TBC +ptap.support.uya.p3.sub=Gweithgarwch diweddar +ptap.support.uya.p3.recent=Gweld y diweddaraf, megis taliadau o’ch swydd neu newidiadau i’ch cod treth. ptap.support.uya.p4.sub=Trethi a budd-daliadau -ptap.support.uya.p4.tab=TBC - -ptap.support.uya.p5.sub=TBC -ptap.support.uya.p5.hs=TBC - -ptap.support.uya.p6.sub=TBC -ptap.support.uya.p6.hs=TBC - -ptap.support.uya.list.paye=TBC -ptap.support.uya.list.sa=TBC -ptap.support.uya.list.ni=TBC -ptap.support.uya.list.ats=TBC -ptap.support.uya.list.cb=TBC -ptap.support.uya.list.ma=TBC - -ptap.support.uya.list.uos=TBC -ptap.support.uya.list.circumstances.link=TBC -ptap.support.uya.list.bta=TBC - -ptap.support.tab.card.hmrc.online.heading=TBC -ptap.support.tab.card.paye.heading=TBC -ptap.support.tab.card.self.assessment.heading=TBC -ptap.support.tab.card.child.benefit.heading=TBC -ptap.support.tab.card.mariage.allowance.heading=TBC -ptap.support.tab.card.annual.tax.summary.heading=TBC -ptap.support.tab.card.insurance.state.pension.heading=TBC -ptap.support.tab.cards.header=TBC +ptap.support.uya.p4.tab=Gwirio’r trethi a’r budd-daliadau sydd gennych ar hyn o bryd a dysgwch am eraill a allai fod yn berthnasol i chi. + +ptap.support.uya.p5.sub=Newyddion CThEF +ptap.support.uya.p5.hs=Cael y diweddaraf gan CThEF. + +ptap.support.uya.p6.sub=Cymorth +ptap.support.uya.p6.header=Cymorth CThEF +ptap.support.uya.p6.hs=Cael cymorth technegol a cymorth gyda threthi a budd-daliadau. + +ptap.support.uya.list.paye=Talu Wrth Ennill (TWE) +ptap.support.uya.list.sa=Hunanasesiad +ptap.support.uya.list.ni=Yswiriant Gwladol a Phensiwn y Wladwriaeth +ptap.support.uya.list.ats=Crynodeb Treth Blynyddol +ptap.support.uya.list.cb=Budd-dal Plant +ptap.support.uya.list.ma=Lwfans Priodasol + +ptap.support.uya.list.uos=os ydych yn defnyddio gwasanaethau eraill gan CThEF (efallai y byddwch yn defnyddio gwahanol gyfrifon Porth y Llywodraeth ar eu cyfer) +ptap.support.uya.list.circumstances.link=os bydd eich amgylchiadau’n newid (yn agor tab newydd) +ptap.support.uya.list.bta=os oes gennych gyfrif treth busnes + +ptap.support.tab.card.hmrc.online.heading=CThEF ar-lein +ptap.support.tab.card.paye.heading=Talu Wrth Ennill (TWE) +ptap.support.tab.card.self.assessment.heading=Hunanasesiad +ptap.support.tab.card.child.benefit.heading=Budd-dal Plant +ptap.support.tab.card.mariage.allowance.heading=Lwfans Priodasol +ptap.support.tab.card.annual.tax.summary.heading=Crynodeb Treth Blynyddol +ptap.support.tab.card.insurance.state.pension.heading=Yswiriant Gwladol a Phensiwn y Wladwriaeth +ptap.support.tab.cards.header=Cymorth ptap.support.tab.card.hmrc.online.link.understanding.account=Deall eich cyfrif ar-lein CThEF -ptap.support.tab.card.hmrc.online.link.understanding.account.url=https://www.gov.uk/mewngofnodi-cofrestru-gwasanaethau-ar-lein-cthef +ptap.support.tab.card.hmrc.online.link.understanding.account.url=/support/understanding-your-account ptap.support.tab.card.hmrc.online.link.extra.support=Cael help gan CThEF os oes angen cymorth ychwanegol arnoch ptap.support.tab.card.hmrc.online.link.extra.support.url=https://www.gov.uk/cael-help-cthem-cymorth-ychwanegol ptap.support.tab.card.hmrc.online.link.technical.support=Cymorth technegol â gwasanaethau ar-lein CThEF diff --git a/test/views/html/home/options/SupportViewSpec.scala b/test/views/html/home/options/SupportViewSpec.scala index 1297f80db..756c81fdc 100644 --- a/test/views/html/home/options/SupportViewSpec.scala +++ b/test/views/html/home/options/SupportViewSpec.scala @@ -127,6 +127,15 @@ class SupportViewSpec extends ViewSpec { ) } + "use the local Understanding your HMRC Online account URL when rendered in Welsh" in { + val welshDoc = asDocument(page()(welshMessages).toString) + assertContainsLink( + welshDoc, + welshMessages("ptap.support.tab.card.hmrc.online.link.understanding.account"), + welshMessages("ptap.support.tab.card.hmrc.online.link.understanding.account.url") + ) + } + "render PAYE card link text and hrefs" in { assertContainsLink( document, diff --git a/test/views/html/support/UnderstandingYourAccountViewSpec.scala b/test/views/html/support/UnderstandingYourAccountViewSpec.scala index 127b42b52..646dc4dcf 100644 --- a/test/views/html/support/UnderstandingYourAccountViewSpec.scala +++ b/test/views/html/support/UnderstandingYourAccountViewSpec.scala @@ -24,6 +24,7 @@ import org.mockito.ArgumentMatchers.any import org.mockito.Mockito.{reset, when} import play.api import play.api.Application +import play.api.i18n.Messages import play.api.mvc.AnyContentAsEmpty import play.api.test.FakeRequest import repositories.JourneyCacheRepository @@ -56,97 +57,167 @@ class UnderstandingYourAccountViewSpec extends ViewSpec { } "Rendering UnderstandingYourAccountView.scala.html" must { - lazy val document: Document = asDocument(page().toString) + def renderedDocument(implicit messages: Messages): Document = + asDocument(page()(userRequest, mockConfigDecorator, messages).toString) + + lazy val document: Document = renderedDocument(messages) + lazy val welshDocument: Document = renderedDocument(welshMessages) "show the expected title for Understanding your HMRC Online account page" in { document.select("title").asScala.exists(e => e.text contains "Understanding your HMRC Online account") mustBe true } - "show the expected headers for Understanding your HMRC Online account page" in { + "show the expected English headers for Understanding your HMRC Online account page" in { document.select("h1").asScala.exists(e => e.text == "Understanding your HMRC Online account") mustBe true - document.select("h2").asScala.exists(e => e.text == "How to use your HMRC Online account") mustBe true - - val h3s = document.select("h3").asScala - h3s.exists(e => e.text == "Your tasks") - h3s.exists(e => e.text == "Recent activity") - h3s.exists(e => e.text == "Taxes and benefits") - h3s.exists(e => e.text == "HMRC news") - h3s.exists(e => e.text == "HMRC support") + document.select("h2").asScala.exists(e => e.text == "How to use your HMRC online account") mustBe true + + document.select("h3").asScala.map(_.text).toSeq mustBe Seq( + "Taxes and benefits", + "Your tasks", + "HMRC news", + "HMRC support" + ) } - "show the expected paragraphs" in { - val paragraphs = document.select("p").asScala - - paragraphs.exists(e => - e.text contains "Use your HMRC Online account by selecting the following sections within your" - ) mustBe true - paragraphs.exists(e => e.text contains "Personal tax account.") mustBe true - - paragraphs.exists(e => - e.text contains "Complete tasks, such as claiming a refund or paying a tax bill." - ) mustBe true - paragraphs.exists(e => e.text contains "You’ll only see tasks for:") mustBe true - paragraphs.exists(e => e.text contains "You may have other tasks if:") mustBe true - paragraphs.exists(e => - e.text contains "View recent updates, such as payments from your employer or changes to your tax code." - ) mustBe true - paragraphs.exists(e => - e.text contains "Check the taxes and benefits you currently have and find others that may be relevant to you." - ) mustBe true - paragraphs.exists(e => e.text contains "Read the latest updates and announcements from HMRC.") mustBe true - paragraphs.exists(e => e.text contains "Get technical support and help with taxes and benefits.") mustBe true + "show the expected English paragraphs" in { + assertContainsText(document, "Your HMRC online account gives you access to the following services:") + assertContainsText( + document, + "You can use your account by selecting the different sections on your 'Personal tax account' page." + ) + assertContainsText( + document, + "Access tasks that must be completed, such as claiming refunds or paying tax bills." + ) + assertContainsText( + document, + "Your HMRC Online account only displays your tasks for the following services:" + ) + assertContainsText(document, "You may have other tasks:") + assertContainsText( + document, + "Check the taxes and benefits you currently have and find out about others that may be relevant to you." + ) + assertContainsText(document, "Get the latest updates from HMRC.") + assertContainsText(document, "Get technical support and help with taxes and benefits.") } - "show the expected content for the access list" in { - val list = document.select("ul[id*='accessList']").select("li").asScala - list.size mustBe 6 + "show the expected English content and order for the access list" in { + document.select("#accessList li").eachText().asScala.toSeq mustBe Seq( + "Pay As You Earn (PAYE)" + ) + } - list.exists(e => e.text contains "Pay As You Earn (PAYE)") mustBe true - list.exists(e => e.text contains "Self Assessment") mustBe true - list.exists(e => e.text contains "National Insurance and State Pension") mustBe true - list.exists(e => e.text contains "Annual Tax Summary") mustBe true - list.exists(e => e.text contains "Child Benefit") mustBe true - list.exists(e => e.text contains "Marriage Allowance") mustBe true + "show the expected English content and order for the task list" in { + document.select("#taskList li").eachText().asScala.toSeq mustBe Seq( + "Pay As You Earn (PAYE)" + ) } - "show the expected content for the task list" in { - val list = document.select("ul[id*='taskList']").select("li").asScala - list.size mustBe 4 + "show the expected English content for the other list" in { + document.select("#otherList li").eachText().asScala.toSeq mustBe Seq( + "if you use other HMRC services (you might use different Government Gateway accounts for these)", + "if your circumstances change (opens in new tab)", + "if you have a Business Tax Account" + ) + } - list.exists(e => e.text contains "Pay As You Earn (PAYE)") mustBe true - list.exists(e => e.text contains "Self Assessment") mustBe true - list.exists(e => e.text contains "National Insurance and State Pension") mustBe true - list.exists(e => e.text contains "Child Benefit") mustBe true + "not render the old personal account link" in { + document.select("a#personalAccountLink").size mustBe 0 + assertNotContainText(document, "Personal tax account.") } - "show the expected content for the other list" in { - val list = document.select("ul[id*='otherList']").select("li").asScala - list.size mustBe 3 + "show the expected content for the notify change of details link" in { + val link = document.select("a[id*='notifyChangeOfDetailsLink']").asScala - list.exists(e => e.text contains "you use other HMRC services") mustBe true - list.exists(e => e.text contains "your circumstances change (opens in new tab)") mustBe true - list.exists(e => e.text contains "you have a Business Tax Account") mustBe true + link.exists(e => e.attribute("href").getValue == "/notify-changes-of-details") mustBe true + link.exists(e => e.text contains "if your circumstances change (opens in new tab)") mustBe true } - "show the expected content for the personal account link" in { - val link = document.select("a[id*='personalAccountLink']").asScala + "show the expected Welsh content" in { + welshDocument.select("h1").text mustBe "Deall eich cyfrif ar-lein CThEF" + welshDocument.select("h2").first().text mustBe "Sut i ddefnyddio’ch cyfrif ar-lein CThEF" + welshDocument.select("h3").asScala.map(_.text).toSeq mustBe Seq( + "Trethi a budd-daliadau", + "Eich tasgau", + "Newyddion CThEF", + "Cymorth CThEF" + ) + + assertContainsText( + welshDocument, + "Mae eich cyfrif ar-lein CThEF yn rhoi mynediad at y gwasanaethau canlynol:" + ) + assertContainsText( + welshDocument, + "Gallwch ddefnyddio eich cyfrif drwy ddewis y gwahanol adrannau ar eich tudalen ‘Cyfrif Treth Personol’." + ) + assertContainsText( + welshDocument, + "Cael mynediad at dasgau y mae’n rhaid eu cwblhau, fel hawlio ad-daliadau neu dalu biliau treth." + ) + assertContainsText( + welshDocument, + "Dim ond eich tasgau ar gyfer y gwasanaethau canlynol y mae’ch cyfrif ar-lein CThEF yn dangos:" + ) + assertContainsText(welshDocument, "Efallai fod gennych dasgau eraill:") + assertContainsText( + welshDocument, + "Gwirio’r trethi a’r budd-daliadau sydd gennych ar hyn o bryd a dysgwch am eraill a allai fod yn berthnasol i chi." + ) + assertContainsText(welshDocument, "Cael y diweddaraf gan CThEF.") + assertContainsText(welshDocument, "Cael cymorth technegol a cymorth gyda threthi a budd-daliadau.") + } - link.exists(e => e.attribute("href").getValue == "/personal-account") mustBe true - link.exists(e => e.text contains "Personal tax account.") mustBe true + "show the expected Welsh list content and order" in { + welshDocument.select("#accessList li").eachText().asScala.toSeq mustBe Seq( + "Talu Wrth Ennill (TWE)" + ) + welshDocument.select("#taskList li").eachText().asScala.toSeq mustBe Seq( + "Talu Wrth Ennill (TWE)" + ) + welshDocument.select("#otherList li").eachText().asScala.toSeq mustBe Seq( + "os ydych yn defnyddio gwasanaethau eraill gan CThEF (efallai y byddwch yn defnyddio gwahanol gyfrifon Porth y Llywodraeth ar eu cyfer)", + "os bydd eich amgylchiadau’n newid (yn agor tab newydd)", + "os oes gennych gyfrif treth busnes" + ) } - "show the expected content for the notify change of details link" in { - val link = document.select("a[id*='notifyChangeOfDetailsLink']").asScala + "show the expected Welsh notify change of details link" in { + val link = welshDocument.select("a[id*='notifyChangeOfDetailsLink']").asScala link.exists(e => e.attribute("href").getValue == "/notify-changes-of-details") mustBe true - link.exists(e => e.text contains "your circumstances change (opens in new tab)") mustBe true + link.exists(e => e.text contains "os bydd eich amgylchiadau’n newid (yn agor tab newydd)") mustBe true + } + + "not render placeholder content" in { + assertNotContainText(document, "TBC") + assertNotContainText(welshDocument, "TBC") + } + + "not render unavailable private beta content" in { + assertNotContainText(document, "Recent activity") + assertNotContainText(document, "View recent updates such as payments from your job or tax code changes.") + assertNotContainText(document, "Self Assessment") + assertNotContainText(document, "Child Benefit") + assertNotContainText(document, "Marriage Allowance") + assertNotContainText(document, "National Insurance and State Pension") + assertNotContainText(document, "Annual Tax Summary") + assertNotContainText(welshDocument, "Gweithgarwch diweddar") + assertNotContainText( + welshDocument, + "Gweld y diweddaraf, megis taliadau o’ch swydd neu newidiadau i’ch cod treth." + ) + assertNotContainText(welshDocument, "Hunanasesiad") + assertNotContainText(welshDocument, "Budd-dal Plant") + assertNotContainText(welshDocument, "Lwfans Priodasol") + assertNotContainText(welshDocument, "Yswiriant Gwladol a Phensiwn y Wladwriaeth") + assertNotContainText(welshDocument, "Crynodeb Treth Blynyddol") } "show the expected content for the back link" in { val link = document.select("a[id*='menu.back']").asScala - println(link) - link.exists(e => e.attribute("href").getValue == "#") mustBe true link.exists(e => e.text contains "Back") mustBe true }