Skip to content

Commit

Permalink
MMCA-4891-update message files to reflect unqiue references and tests (
Browse files Browse the repository at this point in the history
…#139)

* MMCA-4891-update message files to reflect unqiue references and tests

* MMCA-4891-bugfix-update test names
  • Loading branch information
AdamCoops authored Sep 10, 2024
1 parent d61de27 commit c70aad1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/views/select_transactions.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
form,
messages("cf.cash-account.transactions.request.from"),
legendClasses ="govuk-fieldset__legend--s",
hintText = Some(messages("cf.cash-account.transactions.request.date.hint-start-date")),
hintText = Some(messages("cf.cash-account.transactions.request.date.hint-start-date.v2")),
id = "start",
legendAsPageHeading = false,
legendHiddenContent = Some(s"cf.cash-account.transactions.request.legend.hidden.start")
Expand All @@ -59,7 +59,7 @@
form,
messages("cf.cash-account.transactions.request.to"),
legendClasses ="govuk-fieldset__legend--s",
hintText = Some(messages("cf.cash-account.transactions.request.date.hint-end-date")),
hintText = Some(messages("cf.cash-account.transactions.request.date.hint-end-date.v2")),
id = "end",
legendAsPageHeading = false,
legendHiddenContent = Some(s"cf.cash-account.transactions.request.legend.hidden.end")
Expand Down
4 changes: 2 additions & 2 deletions conf/messages.cy
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ site.continue=Cadarnhau ac anfon

cf.cash-account.transactions.title=Pa drafodion cyfrif arian parod sydd eu hangen arnoch?
cf.cash-account.transactions.heading=Pa drafodion cyfrif arian parod sydd eu hangen arnoch?
cf.cash-account.transactions.request.date.hint-start-date=Mae’n rhaid i’r dyddiad dechrau fod ar ôl Hydref 2019. Er enghraifft, 3 2021.
cf.cash-account.transactions.request.date.hint-end-date=Er enghraifft, 3 2021.
cf.cash-account.transactions.request.date.hint-start-date.v2=Mae’n rhaid i’r dyddiad dechrau fod ar ôl Hydref 2019. Er enghraifft, 3 2021.
cf.cash-account.transactions.request.date.hint-end-date.v2=Er enghraifft, 3 2021.

cf.cash-account.detail.transactions= Trafodion
cf.cash-account.detail.payments-caption=Eich taliadau ar gyfer {0}
Expand Down
4 changes: 2 additions & 2 deletions conf/messages.en
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ error.browser.title.prefix = Error:

cf.cash-account.transactions.title=Which cash account transactions do you need?
cf.cash-account.transactions.heading=Which cash account transactions do you need?
cf.cash-account.transactions.request.date.hint-start-date=Start date must be after October 2019. For example, 3 2021.
cf.cash-account.transactions.request.date.hint-end-date=For example, 3 2021.
cf.cash-account.transactions.request.date.hint-start-date.v2=Start date must be after October 2019. For example, 3 2021.
cf.cash-account.transactions.request.date.hint-end-date.v2=For example, 3 2021.

cf.cash-account.transactions.request.review.heading=Selected cash account transactions
cf.cash-account.transactions.request.review.change=Change
Expand Down
10 changes: 10 additions & 0 deletions test/views/SelectTransactionsViewSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ class SelectTransactionsViewSpec extends ViewTestHelper {
view.getElementById("start").text() mustBe dateText
}

"start hint is displayed" in new Setup {
view.getElementsByClass("govuk-hint").text().contains(
"Start date must be after October 2019. For example, 3 2021.") mustBe true
}

"end hint is displayed" in new Setup {
view.getElementsByClass("govuk-hint").text().contains(
"For example, 3 2021") mustBe true
}

"end field must be Displayed" in new Setup {
view.getElementById("start").text() mustBe dateText
}
Expand Down

0 comments on commit c70aad1

Please sign in to comment.