Skip to content

Commit

Permalink
Merge pull request #424 from hmrc/PLATUI-1138_android-link
Browse files Browse the repository at this point in the history
PLATUI-1138: Adding android specific link.
  • Loading branch information
nataliecarey authored Apr 23, 2021
2 parents 3ff508b + 3d06729 commit 29929f8
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ <h2 class="govuk-heading-l">@{messages("using-service.heading", serviceOrApp)}</
@messages("using-service.service.this-means")
} else {
@messages("using-service.app.this-means")
<a class="govuk-link" href="https://www.apple.com/uk/accessibility/">@messages("using-service.app.accessibility-features")</a>
<a class="govuk-link"
href="@messages(s"using-service.app.accessibility-features.link.${statement.mobilePlatform.getOrElse("")}")"
>@messages("using-service.app.accessibility-features")</a>
@messages("using-service.app.on-your-device")
}
</p>
Expand Down
2 changes: 2 additions & 0 deletions conf/messages
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ using-service.this-service-or-app-is-run=This {0} is run by HM Revenue and Custo
using-service.service.this-means=This means you should be able to:
using-service.app.this-means='This means you can use the built-in '
using-service.app.accessibility-features=accessibility features
using-service.app.accessibility-features.link.android=https://www.android.com/intl/en_uk/accessibility/
using-service.app.accessibility-features.link.ios=https://www.apple.com/uk/accessibility/
using-service.app.on-your-device=' on your device to:'

using-service.bullet1=change colours, contrast levels and fonts
Expand Down
30 changes: 30 additions & 0 deletions test/unit/views/StatementPageSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,36 @@ class StatementPageSpec extends WordSpec with Matchers with GuiceOneAppPerSuite
"""report the accessibility problem</a>."""
)
}

"return HTML including iOS specific link" in new Setup {
val statementPageHtml = statementPage(
fullyAccessibleIosAppStatement,
None,
isWelshTranslationAvailable = false
)

contentAsString(statementPageHtml) should include(
"""href="https://www.apple.com/uk/accessibility/""""
)

contentAsString(statementPageHtml) should not include
"""href="https://www.android.com/intl/en_uk/accessibility/""""
}

"return HTML including Android specific link" in new Setup {
val statementPageHtml = statementPage(
fullyAccessibleAndroidAppStatement,
None,
isWelshTranslationAvailable = false
)

contentAsString(statementPageHtml) should include(
"""href="https://www.android.com/intl/en_uk/accessibility/""""
)

contentAsString(statementPageHtml) should not include
"""href="https://www.apple.com/uk/accessibility/""""
}
}

"Given an Accessibility Statement for a partially compliant app, rendering a Statement Page" should {
Expand Down

0 comments on commit 29929f8

Please sign in to comment.