Skip to content

Commit

Permalink
Merge pull request #290 from hmrc/NOJIRA-optimizely-config
Browse files Browse the repository at this point in the history
NOJIRA add default entry for optimizely config
  • Loading branch information
oscarduignan committed Mar 22, 2024
2 parents d6834c0 + 05df13c commit 7221814
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
For compatibility information see `govukFrontendVersion` and `hmrcFrontendVersion` in
[LibDependencies](project/LibDependencies.scala)

## [9.2.0] - 2024-03-22

### Changed

- Added default config entries for optimizely to show that our library supports it, and avoid services using it
getting "NotOverriding" config warnings

### Compatible with

- [hmrc/hmrc-frontend v6.4.0](https://github.com/hmrc/hmrc-frontend/releases/tag/v6.4.0)
- [alphagov/govuk-frontend v5.2.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.2.0)

## [9.1.0] - 2024-03-19

### Changed
Expand Down
4 changes: 4 additions & 0 deletions play-frontend-hmrc-play-30/src/main/resources/reference.conf
Expand Up @@ -81,3 +81,7 @@ pta-account-menu {
}

language.fallback.url = "https://www.gov.uk/government/organisations/hm-revenue-customs"

# used to enable A/B testing experiments from the experimentation team
optimizely.url = "https://cdn.optimizely.com/js/"
optimizely.projectId = null
Expand Up @@ -50,9 +50,21 @@ class TrackingConsentConfigSpec extends AnyWordSpec with Matchers {
config.optimizelyUrl should equal(None)
}

"return None if optimizely.projectId is null" in {
implicit val application: Application = buildApp(
Map(
"optimizely.url" -> "http://optimizely.com/",
"optimizely.projectId" -> null
)
)
val config = application.injector.instanceOf[TrackingConsentConfig]
config.optimizelyUrl should equal(None)
}

"return None if optimizely.url is not defined" in {
implicit val application: Application = buildApp(
Map(
"optimizely.url" -> null,
"optimizely.projectId" -> "1234567"
)
)
Expand Down

0 comments on commit 7221814

Please sign in to comment.