From ee5ee7facc6a528e2c59e929afcfd624f67e792b Mon Sep 17 00:00:00 2001 From: David Ellam Date: Wed, 24 Apr 2024 15:42:19 +0100 Subject: [PATCH] PLATUI 2972 METATEST (#300) * add meta-tests that check all components have unit / integration tests * exclude test fixtures for GovukPasswordInput (not yet implemented) and HMRC accessible-autocomplete helper * add missing integration tests for GovukHeader, HmrcFooter, HmrcReportTechnicalIssue * remove redundant assets config --- CHANGELOG.md | 12 ++++ docs/maintainers/upgrading.md | 11 +-- .../support/TemplateIntegrationMetaSpec.scala | 25 +++++++ .../GovukHeaderIntegrationSpec.scala | 25 +++++++ ...MessagesAwareTemplateIntegrationSpec.scala | 55 +++++++++++++++ .../support/TemplateIntegrationMetaSpec.scala | 22 ++++++ .../HmrcCharacterCountIntegrationSpec.scala | 24 +------ .../HmrcFooterIntegrationSpec.scala | 24 +++++++ ...cReportTechnicalIssueIntegrationSpec.scala | 26 +++++++ .../TemplateIntegrationBaseMetaSpec.scala | 66 ++++++++++++++++++ .../hmrcfrontend/config/AssetsConfig.scala | 10 ++- .../views/viewmodels/footer/Footer.scala | 2 +- .../HmrcReportTechnicalIssue.scala.html | 7 +- .../password-input-attributes/README.md | 1 + .../password-input-attributes/component.json | 0 .../password-input-attributes/input.json | 0 .../password-input-attributes/output.txt | 0 .../password-input-classes/README.md | 1 + .../password-input-classes/component.json | 0 .../password-input-classes/input.json | 0 .../password-input-classes/output.txt | 0 .../password-input-default/README.md | 1 + .../password-input-default/component.json | 0 .../password-input-default/input.json | 0 .../password-input-default/output.txt | 0 .../password-input-value/README.md | 1 + .../password-input-value/component.json | 0 .../password-input-value/input.json | 0 .../password-input-value/output.txt | 0 .../password-input-with-describedBy/README.md | 1 + .../component.json | 0 .../input.json | 0 .../output.txt | 0 .../README.md | 1 + .../component.json | 0 .../input.json | 0 .../output.txt | 0 .../password-input-with-hint-text/README.md | 1 + .../component.json | 0 .../password-input-with-hint-text/input.json | 0 .../password-input-with-hint-text/output.txt | 0 .../README.md | 1 + .../component.json | 0 .../input.json | 0 .../output.txt | 0 .../README.md | 1 + .../component.json | 0 .../input.json | 0 .../output.txt | 0 .../README.md | 1 + .../component.json | 0 .../input.json | 0 .../output.txt | 0 .../accessible-autocomplete-default/README.md | 3 + .../component.json | 0 .../input.json | 0 .../output.txt | 0 .../README.md | 3 + .../component.json | 0 .../input.json | 0 .../output.txt | 0 .../README.md | 3 + .../component.json | 0 .../input.json | 0 .../output.txt | 0 .../README.md | 3 + .../component.json | 0 .../input.json | 0 .../output.txt | 0 .../README.md | 3 + .../component.json | 0 .../input.json | 0 .../output.txt | 0 .../README.md | 3 + .../component.json | 0 .../input.json | 0 .../output.txt | 0 .../README.md | 3 + .../component.json | 0 .../input.json | 0 .../output.txt | 0 .../README.md | 3 + .../component.json | 0 .../input.json | 0 .../output.txt | 0 .../README.md | 3 + .../component.json | 0 .../input.json | 0 .../output.txt | 0 .../README.md | 3 + .../component.json | 0 .../input.json | 0 .../output.txt | 0 .../README.md | 3 + .../component.json | 0 .../input.json | 0 .../output.txt | 0 .../views/TemplateUnitMetaSpec.scala | 21 ++++++ .../views/viewmodels/header/Generators.scala | 4 +- .../views/TemplateUnitBaseMetaSpec.scala | 68 +++++++++++++++++++ .../views/TemplateUnitMetaSpec.scala | 21 ++++++ .../viewmodels/footer/FooterItemSpec.scala | 22 ++++++ .../footer/FooterNavigationSpec.scala | 22 ++++++ .../views/viewmodels/footer/FooterSpec.scala | 22 ++++++ .../views/viewmodels/footer/Generators.scala | 67 ++++++++++++++++++ .../views/viewmodels/footer/MetaSpec.scala | 22 ++++++ .../reporttechnicalissue/Generators.scala | 6 +- 107 files changed, 588 insertions(+), 39 deletions(-) create mode 100644 it-play-30/src/test/scala/uk/gov/hmrc/govukfrontend/support/TemplateIntegrationMetaSpec.scala create mode 100644 it-play-30/src/test/scala/uk/gov/hmrc/govukfrontend/views/components/GovukHeaderIntegrationSpec.scala create mode 100644 it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/support/MessagesAwareTemplateIntegrationSpec.scala create mode 100644 it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/support/TemplateIntegrationMetaSpec.scala create mode 100644 it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/components/HmrcFooterIntegrationSpec.scala create mode 100644 it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/components/HmrcReportTechnicalIssueIntegrationSpec.scala create mode 100644 it-play-30/src/test/scala/uk/gov/hmrc/support/TemplateIntegrationBaseMetaSpec.scala create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-attributes/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-attributes/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-attributes/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-attributes/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-classes/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-classes/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-classes/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-classes/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-default/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-default/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-default/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-default/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-value/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-value/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-value/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-value/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-describedBy/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-describedBy/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-describedBy/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-describedBy/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-error-message/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-error-message/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-error-message/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-error-message/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-hint-text/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-hint-text/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-hint-text/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-hint-text/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-label-as-page-heading/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-label-as-page-heading/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-label-as-page-heading/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-label-as-page-heading/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-new-password-autocomplete/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-new-password-autocomplete/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-new-password-autocomplete/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-new-password-autocomplete/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-translations/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-translations/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-translations/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/{test-fixtures => excluded-fixtures}/password-input-with-translations/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-default/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-default/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-default/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-default/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-autoselect-on/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-autoselect-on/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-autoselect-on/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-autoselect-on/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-default-value/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-default-value/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-default-value/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-default-value/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-empty-default-value/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-empty-default-value/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-empty-default-value/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-empty-default-value/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint-and-error/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-label-and-hint-and-error/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-label-and-hint-and-error/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-label-and-hint-and-error/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-label-and-hint/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-label-and-hint/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-label-and-hint/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-show-all-values/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-show-all-values/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-show-all-values/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-show-all-values/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-autoselect-on/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-welsh-language-and-autoselect-on/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-welsh-language-and-autoselect-on/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-welsh-language-and-autoselect-on/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-min-length/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-welsh-language-and-min-length/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-welsh-language-and-min-length/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-welsh-language-and-min-length/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-welsh-language/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-welsh-language/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-with-welsh-language/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-without-optional-data-attributes/README.md rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-without-optional-data-attributes/component.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-without-optional-data-attributes/input.json (100%) rename play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/{test-fixtures => excluded-fixtures}/accessible-autocomplete-without-optional-data-attributes/output.txt (100%) create mode 100644 play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/govukfrontend/views/TemplateUnitMetaSpec.scala create mode 100644 play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/helpers/views/TemplateUnitBaseMetaSpec.scala create mode 100644 play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/TemplateUnitMetaSpec.scala create mode 100644 play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/FooterItemSpec.scala create mode 100644 play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/FooterNavigationSpec.scala create mode 100644 play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/FooterSpec.scala create mode 100644 play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/Generators.scala create mode 100644 play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/MetaSpec.scala diff --git a/CHANGELOG.md b/CHANGELOG.md index c203d8a66..59417e49e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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.10.0] - 2024-04-24 + +### Changed + +- Added meta-tests to ensure fixture-driven unit tests and Scalacheck-driven integration tests cover all components +- Fixed up existing gaps in coverage highlighted by these new tests + +### Compatible with + +- [hmrc/hmrc-frontend v6.17.0](https://github.com/hmrc/hmrc-frontend/releases/tag/v6.17.0) +- [alphagov/govuk-frontend v5.3.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.3.0) + ## [9.9.0] - 2024-04-24 ### Changed diff --git a/docs/maintainers/upgrading.md b/docs/maintainers/upgrading.md index 4da376ec0..10de1c1ed 100644 --- a/docs/maintainers/upgrading.md +++ b/docs/maintainers/upgrading.md @@ -126,14 +126,15 @@ index 51d2d346..713db75d 100644 ### Comparing forked components in other repos As noted above, some of our `play-frontend-hmrc` components are not direct ports, but are manually created and need to be kept manually aligned with `govuk-frontend` in particular. -For example, if there are changs to the `GovukCookieBanner` template or styles, these should be compared against the cookie banner in `tracking-consent-frontend` (see [banner.ts](https://github.com/hmrc/tracking-consent-frontend/blob/main/js/src/ui/banner.ts)). +For example, if there are changes to the `GovukCookieBanner` template or styles, these should be compared against the cookie banner in `tracking-consent-frontend` (see [banner.ts](https://github.com/hmrc/tracking-consent-frontend/blob/main/js/src/ui/banner.ts)). #### Adding New Components -When running the above steps, there will be test failures if existing components have changed. However, there will be no -failures for new components which have been added to `hmrc-frontend` or `govuk-frontend` but which have not yet been implemented in -`play-frontend-hmrc`. +When running the above steps, there will be test failures if existing components have changed. +Any new components which have been added to `hmrc-frontend` or `govuk-frontend` but which have not yet been implemented in +`play-frontend-hmrc` should also get flagged by the [TemplateUnitBaseMetaSpec](/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/helpers/views/TemplateUnitBaseMetaSpec.scala)- +and [TemplateIntegrationBaseMetaSpec](/it-play-30/src/test/scala/uk/gov/hmrc/support/TemplateIntegrationBaseMetaSpec.scala)-derived meta-tests for each underlying library. -Therefore, it is important to look at the diffs between versions of `govuk-frontend`, and read the CHANGELOG. +That said, it is still important to look at the diffs between versions of `govuk-frontend`, and read the CHANGELOG. To add a new component: - Add the view model as a Scala case class in the folder: `src/main/scala/uk/gov/hmrc/(hmrc|govuk)frontend/views/viewmodels` diff --git a/it-play-30/src/test/scala/uk/gov/hmrc/govukfrontend/support/TemplateIntegrationMetaSpec.scala b/it-play-30/src/test/scala/uk/gov/hmrc/govukfrontend/support/TemplateIntegrationMetaSpec.scala new file mode 100644 index 000000000..b4ffbfd73 --- /dev/null +++ b/it-play-30/src/test/scala/uk/gov/hmrc/govukfrontend/support/TemplateIntegrationMetaSpec.scala @@ -0,0 +1,25 @@ +/* + * Copyright 2023 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.govukfrontend.support + +import uk.gov.hmrc.support.TemplateIntegrationBaseMetaSpec + +class TemplateIntegrationMetaSpec + extends TemplateIntegrationBaseMetaSpec( + libraryName = "govuk-frontend", + ignoredHelpers = Seq("govukTemplate", "govukLayout") + ) diff --git a/it-play-30/src/test/scala/uk/gov/hmrc/govukfrontend/views/components/GovukHeaderIntegrationSpec.scala b/it-play-30/src/test/scala/uk/gov/hmrc/govukfrontend/views/components/GovukHeaderIntegrationSpec.scala new file mode 100644 index 000000000..bbca91e04 --- /dev/null +++ b/it-play-30/src/test/scala/uk/gov/hmrc/govukfrontend/views/components/GovukHeaderIntegrationSpec.scala @@ -0,0 +1,25 @@ +/* + * Copyright 2019 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.govukfrontend.views.components + +import uk.gov.hmrc.govukfrontend.support.TemplateIntegrationSpec +import uk.gov.hmrc.govukfrontend.views.html.components._ +import uk.gov.hmrc.govukfrontend.views.viewmodels.header.Header +import uk.gov.hmrc.govukfrontend.views.viewmodels.header.Generators._ + +object GovukHeaderIntegrationSpec + extends TemplateIntegrationSpec[Header, GovukHeader](govukComponentName = "govukHeader") diff --git a/it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/support/MessagesAwareTemplateIntegrationSpec.scala b/it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/support/MessagesAwareTemplateIntegrationSpec.scala new file mode 100644 index 000000000..b0b0f6e5a --- /dev/null +++ b/it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/support/MessagesAwareTemplateIntegrationSpec.scala @@ -0,0 +1,55 @@ +/* + * Copyright 2023 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.hmrcfrontend.support + +import org.scalacheck.Arbitrary +import play.api.i18n.Messages +import play.api.libs.json.OWrites +import play.twirl.api.{HtmlFormat, Template2} +import uk.gov.hmrc.hmrcfrontend.views.HmrcFrontendDependency.hmrcFrontendVersion +import uk.gov.hmrc.helpers.MessagesSupport +import uk.gov.hmrc.support.TemplateIntegrationBaseSpec + +import scala.reflect.ClassTag +import scala.util.Try + +/** + * Base class for integration testing a Twirl template against the Nunjucks template rendering service, + * where the template takes a viewmodel plus an implicit Messages API + * + * @tparam T Type representing the input parameters of the Twirl template + */ +abstract class MessagesAwareTemplateIntegrationSpec[T: OWrites: Arbitrary, C <: Template2[ + T, + Messages, + HtmlFormat.Appendable +]: ClassTag]( + hmrcComponentName: String, + seed: Option[String] = None +) extends TemplateIntegrationBaseSpec[T](hmrcComponentName, seed) + with MessagesSupport { + + protected val libraryName: String = "hmrc" + + protected val libraryVersion: String = hmrcFrontendVersion + + private val component: C = app.injector.instanceOf[C] + + def render(templateParams: T): Try[HtmlFormat.Appendable] = + Try(component.render(templateParams, implicitly)) + +} diff --git a/it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/support/TemplateIntegrationMetaSpec.scala b/it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/support/TemplateIntegrationMetaSpec.scala new file mode 100644 index 000000000..20f172c3c --- /dev/null +++ b/it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/support/TemplateIntegrationMetaSpec.scala @@ -0,0 +1,22 @@ +/* + * Copyright 2023 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.hmrcfrontend.support + +import uk.gov.hmrc.support.TemplateIntegrationBaseMetaSpec + + +class TemplateIntegrationMetaSpec extends TemplateIntegrationBaseMetaSpec("hmrc-frontend") diff --git a/it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/components/HmrcCharacterCountIntegrationSpec.scala b/it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/components/HmrcCharacterCountIntegrationSpec.scala index 9a663b739..ff0a68519 100644 --- a/it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/components/HmrcCharacterCountIntegrationSpec.scala +++ b/it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/components/HmrcCharacterCountIntegrationSpec.scala @@ -16,29 +16,11 @@ package uk.gov.hmrc.hmrcfrontend.views.components -import play.twirl.api.HtmlFormat -import uk.gov.hmrc.helpers.MessagesSupport -import uk.gov.hmrc.hmrcfrontend.views.HmrcFrontendDependency.hmrcFrontendVersion +import uk.gov.hmrc.hmrcfrontend.support.MessagesAwareTemplateIntegrationSpec import uk.gov.hmrc.hmrcfrontend.views.html.components._ import uk.gov.hmrc.hmrcfrontend.views.viewmodels.charactercount.Generators._ -import uk.gov.hmrc.support.TemplateIntegrationBaseSpec - -import scala.util.Try object HmrcCharacterCountIntegrationSpec - extends TemplateIntegrationBaseSpec[CharacterCount]( - componentName = "hmrcCharacterCount", - seed = None + extends MessagesAwareTemplateIntegrationSpec[CharacterCount, HmrcCharacterCount]( + hmrcComponentName = "hmrcCharacterCount" ) - with MessagesSupport { - - protected val libraryName: String = "hmrc" - - protected val libraryVersion: String = hmrcFrontendVersion - - private val component = app.injector.instanceOf[HmrcCharacterCount] - - override def render(characterCount: CharacterCount): Try[HtmlFormat.Appendable] = - Try(component(characterCount)) - -} diff --git a/it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/components/HmrcFooterIntegrationSpec.scala b/it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/components/HmrcFooterIntegrationSpec.scala new file mode 100644 index 000000000..5727f78d1 --- /dev/null +++ b/it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/components/HmrcFooterIntegrationSpec.scala @@ -0,0 +1,24 @@ +/* + * Copyright 2019 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.hmrcfrontend.views.components + +import uk.gov.hmrc.hmrcfrontend.support.MessagesAwareTemplateIntegrationSpec +import uk.gov.hmrc.hmrcfrontend.views.html.components._ +import uk.gov.hmrc.hmrcfrontend.views.viewmodels.footer.Generators._ + +object HmrcFooterIntegrationSpec + extends MessagesAwareTemplateIntegrationSpec[Footer, HmrcFooter](hmrcComponentName = "hmrcFooter") diff --git a/it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/components/HmrcReportTechnicalIssueIntegrationSpec.scala b/it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/components/HmrcReportTechnicalIssueIntegrationSpec.scala new file mode 100644 index 000000000..4db847377 --- /dev/null +++ b/it-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/components/HmrcReportTechnicalIssueIntegrationSpec.scala @@ -0,0 +1,26 @@ +/* + * Copyright 2023 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.hmrcfrontend.views.components + +import uk.gov.hmrc.hmrcfrontend.support.TemplateIntegrationSpec +import uk.gov.hmrc.hmrcfrontend.views.html.components._ +import uk.gov.hmrc.hmrcfrontend.views.viewmodels.reporttechnicalissue.Generators._ + +object HmrcReportTechnicalIssueIntegrationSpec + extends TemplateIntegrationSpec[ReportTechnicalIssue, HmrcReportTechnicalIssue]( + hmrcComponentName = "hmrcReportTechnicalIssue" + ) diff --git a/it-play-30/src/test/scala/uk/gov/hmrc/support/TemplateIntegrationBaseMetaSpec.scala b/it-play-30/src/test/scala/uk/gov/hmrc/support/TemplateIntegrationBaseMetaSpec.scala new file mode 100644 index 000000000..9a8e55e90 --- /dev/null +++ b/it-play-30/src/test/scala/uk/gov/hmrc/support/TemplateIntegrationBaseMetaSpec.scala @@ -0,0 +1,66 @@ +/* + * Copyright 2024 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.support + +import better.files.File +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + +abstract class TemplateIntegrationBaseMetaSpec(val libraryName: String, val ignoredHelpers: Seq[String] = Seq.empty) + extends AnyWordSpec + with Matchers { + + private val libraryDir = libraryName.replace("-", "") + private val libraryPrefix = libraryName.split('-').head + + private val itPath = "it-play-30" + private val itRoot = File(itPath) + private val testRoot = itRoot / "src" / "test" / "scala" + private val componentTestDir = testRoot / "uk" / "gov" / "hmrc" / libraryDir / "views" / "components" + + private val mainPath = "play-frontend-hmrc-play-30" + private val mainRoot = File(mainPath) + private val templatesRoot = mainRoot / "src" / "main" / "twirl" + private val templatesDir = templatesRoot / "uk" / "gov" / "hmrc" / libraryDir / "views" / "components" + + this.getClass.getCanonicalName when { + + val templates = templatesDir.children + .filter(_.isRegularFile) + .map(_.name) + .map(filename => filename.split('.').head) + .map(name => s"${name.head.toLower}${name.tail}") + .filter(_.startsWith(libraryPrefix)) + .filterNot(ignoredHelpers.contains(_)) + .toList + .sorted + + templates.foreach { template => + s"component is $template" should { + + "be covered by an integration test" in { + withClue(s"""no test found for component "$template" under $componentTestDir""") { + componentTestDir.children + .filter(_.isRegularFile) + .exists(_.contentAsString.contains(s""""$template"""")) should be(true) + } + } + } + } + } + +} diff --git a/play-frontend-hmrc-play-30/src/main/scala/uk/gov/hmrc/hmrcfrontend/config/AssetsConfig.scala b/play-frontend-hmrc-play-30/src/main/scala/uk/gov/hmrc/hmrcfrontend/config/AssetsConfig.scala index e2b96c6d1..8e20ba174 100644 --- a/play-frontend-hmrc-play-30/src/main/scala/uk/gov/hmrc/hmrcfrontend/config/AssetsConfig.scala +++ b/play-frontend-hmrc-play-30/src/main/scala/uk/gov/hmrc/hmrcfrontend/config/AssetsConfig.scala @@ -23,12 +23,10 @@ import uk.gov.hmrc.hmrcfrontend.views.HmrcFrontendDependency class AssetsConfig @Inject() () { private val hmrcFrontendVersion = HmrcFrontendDependency.hmrcFrontendVersion - lazy val html5ShivJsUrl: String = Assets.at("vendor/html5shiv.min.js").url - lazy val hmrcFrontendCssUrl: String = hmrcFrontendAssetUrl(s"hmrc-frontend-$hmrcFrontendVersion.min.css") - lazy val hmrcFrontendIe8CssUrl: String = hmrcFrontendAssetUrl(s"hmrc-frontend-ie8-$hmrcFrontendVersion.min.css") - lazy val hmrcFrontendJsUrl: String = hmrcFrontendAssetUrl(s"hmrc-frontend-$hmrcFrontendVersion.min.js") - lazy val autocompleteJsUrl: String = hmrcFrontendAssetUrl(s"accessible-autocomplete-$hmrcFrontendVersion.js") - lazy val autocompleteCssUrl: String = hmrcFrontendAssetUrl(s"accessible-autocomplete-$hmrcFrontendVersion.css") + lazy val hmrcFrontendCssUrl: String = hmrcFrontendAssetUrl(s"hmrc-frontend-$hmrcFrontendVersion.min.css") + lazy val hmrcFrontendJsUrl: String = hmrcFrontendAssetUrl(s"hmrc-frontend-$hmrcFrontendVersion.min.js") + lazy val autocompleteJsUrl: String = hmrcFrontendAssetUrl(s"accessible-autocomplete-$hmrcFrontendVersion.js") + lazy val autocompleteCssUrl: String = hmrcFrontendAssetUrl(s"accessible-autocomplete-$hmrcFrontendVersion.css") private def hmrcFrontendAssetUrl(filename: String) = Assets.at(filename).url } diff --git a/play-frontend-hmrc-play-30/src/main/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/Footer.scala b/play-frontend-hmrc-play-30/src/main/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/Footer.scala index f8e73e096..9021aab06 100644 --- a/play-frontend-hmrc-play-30/src/main/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/Footer.scala +++ b/play-frontend-hmrc-play-30/src/main/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/Footer.scala @@ -30,5 +30,5 @@ case class Footer( object Footer { - implicit def jsonFormats: Format[Footer] = Json.using[Json.WithDefaultValues].format[Footer] + implicit def jsonFormats: OFormat[Footer] = Json.using[Json.WithDefaultValues].format[Footer] } diff --git a/play-frontend-hmrc-play-30/src/main/twirl/uk/gov/hmrc/hmrcfrontend/views/components/HmrcReportTechnicalIssue.scala.html b/play-frontend-hmrc-play-30/src/main/twirl/uk/gov/hmrc/hmrcfrontend/views/components/HmrcReportTechnicalIssue.scala.html index 87c120e27..1c0f04783 100644 --- a/play-frontend-hmrc-play-30/src/main/twirl/uk/gov/hmrc/hmrcfrontend/views/components/HmrcReportTechnicalIssue.scala.html +++ b/play-frontend-hmrc-play-30/src/main/twirl/uk/gov/hmrc/hmrcfrontend/views/components/HmrcReportTechnicalIssue.scala.html @@ -14,16 +14,19 @@ * limitations under the License. *@ +@import uk.gov.hmrc.hmrcfrontend.views.html.components._ + @this() + @(params: ReportTechnicalIssue) @import params._ @defining(if(serviceId.nonEmpty) serviceId else serviceCode) { service => &referrerUrl=@urlEncode(url)}" >@if(params.language.code == "cy") {A yw’r dudalen hon yn gweithio’n iawn? (yn agor tab newydd)} else {Is this page not working properly? (opens in new tab)} } diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-attributes/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-attributes/README.md new file mode 100644 index 000000000..2e42d0ecd --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-attributes/README.md @@ -0,0 +1 @@ +This fixture is excluded because we decided to not yet implement the Password Input component - see [ADR-0021](docs/maintainers/adr/0021-defer-inclusion-of-password-field.md) \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-attributes/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-attributes/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-attributes/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-attributes/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-attributes/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-attributes/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-attributes/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-attributes/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-attributes/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-attributes/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-attributes/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-attributes/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-classes/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-classes/README.md new file mode 100644 index 000000000..2e42d0ecd --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-classes/README.md @@ -0,0 +1 @@ +This fixture is excluded because we decided to not yet implement the Password Input component - see [ADR-0021](docs/maintainers/adr/0021-defer-inclusion-of-password-field.md) \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-classes/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-classes/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-classes/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-classes/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-classes/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-classes/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-classes/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-classes/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-classes/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-classes/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-classes/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-classes/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-default/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-default/README.md new file mode 100644 index 000000000..2e42d0ecd --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-default/README.md @@ -0,0 +1 @@ +This fixture is excluded because we decided to not yet implement the Password Input component - see [ADR-0021](docs/maintainers/adr/0021-defer-inclusion-of-password-field.md) \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-default/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-default/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-default/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-default/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-default/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-default/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-default/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-default/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-default/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-default/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-default/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-default/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-value/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-value/README.md new file mode 100644 index 000000000..2e42d0ecd --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-value/README.md @@ -0,0 +1 @@ +This fixture is excluded because we decided to not yet implement the Password Input component - see [ADR-0021](docs/maintainers/adr/0021-defer-inclusion-of-password-field.md) \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-value/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-value/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-value/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-value/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-value/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-value/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-value/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-value/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-value/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-value/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-value/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-value/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-describedBy/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-describedBy/README.md new file mode 100644 index 000000000..2e42d0ecd --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-describedBy/README.md @@ -0,0 +1 @@ +This fixture is excluded because we decided to not yet implement the Password Input component - see [ADR-0021](docs/maintainers/adr/0021-defer-inclusion-of-password-field.md) \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-describedBy/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-describedBy/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-describedBy/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-describedBy/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-describedBy/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-describedBy/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-describedBy/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-describedBy/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-describedBy/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-describedBy/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-describedBy/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-describedBy/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-error-message/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-error-message/README.md new file mode 100644 index 000000000..2e42d0ecd --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-error-message/README.md @@ -0,0 +1 @@ +This fixture is excluded because we decided to not yet implement the Password Input component - see [ADR-0021](docs/maintainers/adr/0021-defer-inclusion-of-password-field.md) \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-error-message/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-error-message/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-error-message/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-error-message/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-error-message/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-error-message/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-error-message/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-error-message/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-error-message/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-error-message/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-error-message/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-error-message/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-hint-text/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-hint-text/README.md new file mode 100644 index 000000000..2e42d0ecd --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-hint-text/README.md @@ -0,0 +1 @@ +This fixture is excluded because we decided to not yet implement the Password Input component - see [ADR-0021](docs/maintainers/adr/0021-defer-inclusion-of-password-field.md) \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-hint-text/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-hint-text/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-hint-text/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-hint-text/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-hint-text/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-hint-text/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-hint-text/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-hint-text/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-hint-text/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-hint-text/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-hint-text/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-hint-text/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-label-as-page-heading/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-label-as-page-heading/README.md new file mode 100644 index 000000000..2e42d0ecd --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-label-as-page-heading/README.md @@ -0,0 +1 @@ +This fixture is excluded because we decided to not yet implement the Password Input component - see [ADR-0021](docs/maintainers/adr/0021-defer-inclusion-of-password-field.md) \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-label-as-page-heading/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-label-as-page-heading/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-label-as-page-heading/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-label-as-page-heading/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-label-as-page-heading/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-label-as-page-heading/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-label-as-page-heading/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-label-as-page-heading/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-label-as-page-heading/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-label-as-page-heading/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-label-as-page-heading/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-label-as-page-heading/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-new-password-autocomplete/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-new-password-autocomplete/README.md new file mode 100644 index 000000000..2e42d0ecd --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-new-password-autocomplete/README.md @@ -0,0 +1 @@ +This fixture is excluded because we decided to not yet implement the Password Input component - see [ADR-0021](docs/maintainers/adr/0021-defer-inclusion-of-password-field.md) \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-new-password-autocomplete/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-new-password-autocomplete/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-new-password-autocomplete/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-new-password-autocomplete/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-new-password-autocomplete/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-new-password-autocomplete/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-new-password-autocomplete/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-new-password-autocomplete/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-new-password-autocomplete/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-new-password-autocomplete/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-new-password-autocomplete/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-new-password-autocomplete/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-translations/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-translations/README.md new file mode 100644 index 000000000..2e42d0ecd --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-translations/README.md @@ -0,0 +1 @@ +This fixture is excluded because we decided to not yet implement the Password Input component - see [ADR-0021](docs/maintainers/adr/0021-defer-inclusion-of-password-field.md) \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-translations/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-translations/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-translations/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-translations/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-translations/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-translations/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-translations/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-translations/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-translations/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-translations/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/test-fixtures/password-input-with-translations/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/govuk-frontend/excluded-fixtures/password-input-with-translations/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-default/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-default/README.md new file mode 100644 index 000000000..5b7cf3a23 --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-default/README.md @@ -0,0 +1,3 @@ +This fixture is excluded because it exists only to test the component in hmrc-frontend. In play-frontend-hmrc, +we provide an [implicit helper](README.md#adding-accessible-autocomplete-to-a-select-input) that enhances a regular +`GovukSelect` component with accessible autocomplete functionality. \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-default/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-default/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-default/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-default/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-default/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-default/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-default/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-default/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-default/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-default/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-default/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-default/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-autoselect-on/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-autoselect-on/README.md new file mode 100644 index 000000000..5b7cf3a23 --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-autoselect-on/README.md @@ -0,0 +1,3 @@ +This fixture is excluded because it exists only to test the component in hmrc-frontend. In play-frontend-hmrc, +we provide an [implicit helper](README.md#adding-accessible-autocomplete-to-a-select-input) that enhances a regular +`GovukSelect` component with accessible autocomplete functionality. \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-autoselect-on/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-autoselect-on/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-autoselect-on/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-autoselect-on/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-autoselect-on/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-autoselect-on/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-autoselect-on/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-autoselect-on/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-autoselect-on/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-autoselect-on/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-autoselect-on/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-autoselect-on/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-default-value/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-default-value/README.md new file mode 100644 index 000000000..5b7cf3a23 --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-default-value/README.md @@ -0,0 +1,3 @@ +This fixture is excluded because it exists only to test the component in hmrc-frontend. In play-frontend-hmrc, +we provide an [implicit helper](README.md#adding-accessible-autocomplete-to-a-select-input) that enhances a regular +`GovukSelect` component with accessible autocomplete functionality. \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-default-value/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-default-value/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-default-value/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-default-value/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-default-value/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-default-value/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-default-value/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-default-value/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-default-value/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-default-value/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-default-value/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-default-value/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-empty-default-value/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-empty-default-value/README.md new file mode 100644 index 000000000..5b7cf3a23 --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-empty-default-value/README.md @@ -0,0 +1,3 @@ +This fixture is excluded because it exists only to test the component in hmrc-frontend. In play-frontend-hmrc, +we provide an [implicit helper](README.md#adding-accessible-autocomplete-to-a-select-input) that enhances a regular +`GovukSelect` component with accessible autocomplete functionality. \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-empty-default-value/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-empty-default-value/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-empty-default-value/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-empty-default-value/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-empty-default-value/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-empty-default-value/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-empty-default-value/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-empty-default-value/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-empty-default-value/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-empty-default-value/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-empty-default-value/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-empty-default-value/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint-and-error/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint-and-error/README.md new file mode 100644 index 000000000..5b7cf3a23 --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint-and-error/README.md @@ -0,0 +1,3 @@ +This fixture is excluded because it exists only to test the component in hmrc-frontend. In play-frontend-hmrc, +we provide an [implicit helper](README.md#adding-accessible-autocomplete-to-a-select-input) that enhances a regular +`GovukSelect` component with accessible autocomplete functionality. \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-label-and-hint-and-error/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint-and-error/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-label-and-hint-and-error/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint-and-error/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-label-and-hint-and-error/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint-and-error/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-label-and-hint-and-error/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint-and-error/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-label-and-hint-and-error/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint-and-error/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-label-and-hint-and-error/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint-and-error/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint/README.md new file mode 100644 index 000000000..5b7cf3a23 --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint/README.md @@ -0,0 +1,3 @@ +This fixture is excluded because it exists only to test the component in hmrc-frontend. In play-frontend-hmrc, +we provide an [implicit helper](README.md#adding-accessible-autocomplete-to-a-select-input) that enhances a regular +`GovukSelect` component with accessible autocomplete functionality. \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-label-and-hint/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-label-and-hint/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-label-and-hint/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-label-and-hint/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-label-and-hint/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-label-and-hint/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-label-and-hint/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-show-all-values/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-show-all-values/README.md new file mode 100644 index 000000000..5b7cf3a23 --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-show-all-values/README.md @@ -0,0 +1,3 @@ +This fixture is excluded because it exists only to test the component in hmrc-frontend. In play-frontend-hmrc, +we provide an [implicit helper](README.md#adding-accessible-autocomplete-to-a-select-input) that enhances a regular +`GovukSelect` component with accessible autocomplete functionality. \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-show-all-values/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-show-all-values/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-show-all-values/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-show-all-values/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-show-all-values/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-show-all-values/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-show-all-values/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-show-all-values/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-show-all-values/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-show-all-values/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-show-all-values/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-show-all-values/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-autoselect-on/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-autoselect-on/README.md new file mode 100644 index 000000000..5b7cf3a23 --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-autoselect-on/README.md @@ -0,0 +1,3 @@ +This fixture is excluded because it exists only to test the component in hmrc-frontend. In play-frontend-hmrc, +we provide an [implicit helper](README.md#adding-accessible-autocomplete-to-a-select-input) that enhances a regular +`GovukSelect` component with accessible autocomplete functionality. \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language-and-autoselect-on/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-autoselect-on/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language-and-autoselect-on/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-autoselect-on/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language-and-autoselect-on/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-autoselect-on/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language-and-autoselect-on/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-autoselect-on/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language-and-autoselect-on/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-autoselect-on/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language-and-autoselect-on/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-autoselect-on/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-min-length/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-min-length/README.md new file mode 100644 index 000000000..5b7cf3a23 --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-min-length/README.md @@ -0,0 +1,3 @@ +This fixture is excluded because it exists only to test the component in hmrc-frontend. In play-frontend-hmrc, +we provide an [implicit helper](README.md#adding-accessible-autocomplete-to-a-select-input) that enhances a regular +`GovukSelect` component with accessible autocomplete functionality. \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language-and-min-length/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-min-length/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language-and-min-length/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-min-length/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language-and-min-length/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-min-length/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language-and-min-length/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-min-length/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language-and-min-length/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-min-length/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language-and-min-length/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language-and-min-length/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language/README.md new file mode 100644 index 000000000..5b7cf3a23 --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language/README.md @@ -0,0 +1,3 @@ +This fixture is excluded because it exists only to test the component in hmrc-frontend. In play-frontend-hmrc, +we provide an [implicit helper](README.md#adding-accessible-autocomplete-to-a-select-input) that enhances a regular +`GovukSelect` component with accessible autocomplete functionality. \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-with-welsh-language/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-with-welsh-language/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-without-optional-data-attributes/README.md b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-without-optional-data-attributes/README.md new file mode 100644 index 000000000..5b7cf3a23 --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-without-optional-data-attributes/README.md @@ -0,0 +1,3 @@ +This fixture is excluded because it exists only to test the component in hmrc-frontend. In play-frontend-hmrc, +we provide an [implicit helper](README.md#adding-accessible-autocomplete-to-a-select-input) that enhances a regular +`GovukSelect` component with accessible autocomplete functionality. \ No newline at end of file diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-without-optional-data-attributes/component.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-without-optional-data-attributes/component.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-without-optional-data-attributes/component.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-without-optional-data-attributes/component.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-without-optional-data-attributes/input.json b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-without-optional-data-attributes/input.json similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-without-optional-data-attributes/input.json rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-without-optional-data-attributes/input.json diff --git a/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-without-optional-data-attributes/output.txt b/play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-without-optional-data-attributes/output.txt similarity index 100% rename from play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/test-fixtures/accessible-autocomplete-without-optional-data-attributes/output.txt rename to play-frontend-hmrc-play-30/src/test/resources/fixtures/hmrc-frontend/excluded-fixtures/accessible-autocomplete-without-optional-data-attributes/output.txt diff --git a/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/govukfrontend/views/TemplateUnitMetaSpec.scala b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/govukfrontend/views/TemplateUnitMetaSpec.scala new file mode 100644 index 000000000..c05866e59 --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/govukfrontend/views/TemplateUnitMetaSpec.scala @@ -0,0 +1,21 @@ +/* + * Copyright 2023 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.govukfrontend.views + +import uk.gov.hmrc.helpers.views.TemplateUnitBaseMetaSpec + +class TemplateUnitMetaSpec extends TemplateUnitBaseMetaSpec("govuk-frontend") diff --git a/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/govukfrontend/views/viewmodels/header/Generators.scala b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/govukfrontend/views/viewmodels/header/Generators.scala index 64b0993bc..67da6dc2d 100644 --- a/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/govukfrontend/views/viewmodels/header/Generators.scala +++ b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/govukfrontend/views/viewmodels/header/Generators.scala @@ -33,14 +33,14 @@ object Generators { implicit val arbHeader: Arbitrary[Header] = Arbitrary { for { - homepageUrl <- Gen.option(genAlphaStr()) + homepageUrl <- Gen.option(genNonEmptyAlphaStr) productName <- Gen.option(genAlphaStr()) serviceName <- Gen.option(genAlphaStr()) serviceUrl <- Gen.option(genAlphaStr()) n <- Gen.chooseNum(0, 5) navigation <- Gen.option(Gen.listOfN(n, arbHeaderNavigation.arbitrary)) navigationClasses <- genClasses() - containerClasses <- Gen.option(genClasses()) + containerClasses <- Gen.option(genNonEmptyAlphaStr) classes <- genClasses() attributes <- genAttributes() } yield Header( diff --git a/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/helpers/views/TemplateUnitBaseMetaSpec.scala b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/helpers/views/TemplateUnitBaseMetaSpec.scala new file mode 100644 index 000000000..5f403660e --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/helpers/views/TemplateUnitBaseMetaSpec.scala @@ -0,0 +1,68 @@ +/* + * Copyright 2023 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.helpers.views + +import better.files.{File, Resource} +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec +import play.api.libs.json.Json + +abstract class TemplateUnitBaseMetaSpec(val libraryName: String) extends AnyWordSpec with Matchers { + + private val libraryDir = libraryName.replace("-", "") + private val projectPath = "play-frontend-hmrc-play-30" + private val projectRoot = File(projectPath) + private val testRoot = projectRoot / "src" / "test" / "scala" + private val componentTestDir = testRoot / "uk" / "gov" / "hmrc" / libraryDir / "views" / "components" + + private val fixturesResourcePath = s"/fixtures/$libraryName" + private val fixturesDir = File(Resource.my.getUrl(fixturesResourcePath)) + + this.getClass.getCanonicalName when { + + val fixtureTypes = fixturesDir.children.filter(_.isDirectory).filterNot(_.name == "excluded-fixtures") + fixtureTypes.foreach { fixtureType => + s"fixture type is ${fixtureType.name}" when { + + val fixtures = fixtureType.children.filter(_.isDirectory).toList.sortBy(_.name) + fixtures + .map { fixture => + val componentName = (Json.parse((fixture / "component.json").contentAsString) \ "name") + .as[String] + (componentName, fixture.name) + } + .groupBy { case (componentName, _) => componentName } + .foreach { case (componentName, fixtures) => + s"component is $componentName" should { + + "be covered by a unit test" in { + + withClue( + s"""no test found under $componentTestDir for component "$componentName"""" + + s""" (fixtures ${fixtures.map { case (_, name) => name }.mkString(", ")})""" + ) { + componentTestDir.children + .filter(_.isRegularFile) + .exists(_.contentAsString.contains(s""""$componentName"""")) should be(true) + } + } + } + } + } + } + } +} diff --git a/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/TemplateUnitMetaSpec.scala b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/TemplateUnitMetaSpec.scala new file mode 100644 index 000000000..0320ce20c --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/TemplateUnitMetaSpec.scala @@ -0,0 +1,21 @@ +/* + * Copyright 2023 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.hmrcfrontend.views + +import uk.gov.hmrc.helpers.views.TemplateUnitBaseMetaSpec + +class TemplateUnitMetaSpec extends TemplateUnitBaseMetaSpec("hmrc-frontend") diff --git a/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/FooterItemSpec.scala b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/FooterItemSpec.scala new file mode 100644 index 000000000..55112658b --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/FooterItemSpec.scala @@ -0,0 +1,22 @@ +/* + * Copyright 2023 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.hmrcfrontend.views.viewmodels.footer + +import uk.gov.hmrc.hmrcfrontend.views.viewmodels.JsonRoundtripSpec +import uk.gov.hmrc.hmrcfrontend.views.viewmodels.footer.Generators._ + +class FooterItemSpec extends JsonRoundtripSpec[FooterItem] diff --git a/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/FooterNavigationSpec.scala b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/FooterNavigationSpec.scala new file mode 100644 index 000000000..e83a0fbe2 --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/FooterNavigationSpec.scala @@ -0,0 +1,22 @@ +/* + * Copyright 2023 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.hmrcfrontend.views.viewmodels.footer + +import uk.gov.hmrc.hmrcfrontend.views.viewmodels.JsonRoundtripSpec +import uk.gov.hmrc.hmrcfrontend.views.viewmodels.footer.Generators._ + +class FooterNavigationSpec extends JsonRoundtripSpec[FooterNavigation] diff --git a/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/FooterSpec.scala b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/FooterSpec.scala new file mode 100644 index 000000000..7b0f08993 --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/FooterSpec.scala @@ -0,0 +1,22 @@ +/* + * Copyright 2023 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.hmrcfrontend.views.viewmodels.footer + +import uk.gov.hmrc.hmrcfrontend.views.viewmodels.JsonRoundtripSpec +import uk.gov.hmrc.hmrcfrontend.views.viewmodels.footer.Generators._ + +class FooterSpec extends JsonRoundtripSpec[Footer] diff --git a/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/Generators.scala b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/Generators.scala new file mode 100644 index 000000000..52640d90b --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/Generators.scala @@ -0,0 +1,67 @@ +/* + * Copyright 2023 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.hmrcfrontend.views.viewmodels.footer + +import org.scalacheck.{Arbitrary, Gen} +import uk.gov.hmrc.hmrcfrontend.views.viewmodels.Generators._ +import uk.gov.hmrc.hmrcfrontend.views.viewmodels.content.Generators._ + +object Generators { + + implicit val arbFooterItem: Arbitrary[FooterItem] = Arbitrary { + for { + text <- Gen.option(genAlphaStr()) + href <- Gen.option(genAlphaStr()) + attributes <- genAttributes() + } yield FooterItem(text = text, href = href, attributes = attributes) + } + + implicit val arbFooterNavigation: Arbitrary[FooterNavigation] = Arbitrary { + for { + title <- Gen.option(genAlphaStr()) + columns <- Gen.option(Gen.chooseNum(0, 5)) + n <- Gen.chooseNum(0, 5) + items <- Gen.listOfN(n, arbFooterItem.arbitrary) + } yield FooterNavigation(title = title, columns = columns, items = items) + } + + implicit val arbMeta: Arbitrary[Meta] = Arbitrary { + for { + visuallyHiddenText <- Gen.option(genAlphaStr()) + content <- arbContent.arbitrary + n <- Gen.chooseNum(0, 5) + items <- Gen.option(Gen.listOfN(n, arbFooterItem.arbitrary)) + } yield Meta(visuallyHiddenTitle = visuallyHiddenText, content = content, items = items) + } + + implicit val arbFooter: Arbitrary[Footer] = Arbitrary { + for { + meta <- Gen.option(arbMeta.arbitrary) + n <- Gen.chooseNum(0, 5) + navigation <- Gen.listOfN(n, arbFooterNavigation.arbitrary) + containerClasses <- genClasses() + classes <- genClasses() + attributes <- genAttributes() + } yield Footer( + meta = meta, + navigation = navigation, + containerClasses = containerClasses, + classes = classes, + attributes = attributes + ) + } +} diff --git a/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/MetaSpec.scala b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/MetaSpec.scala new file mode 100644 index 000000000..bdf724e7d --- /dev/null +++ b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/footer/MetaSpec.scala @@ -0,0 +1,22 @@ +/* + * Copyright 2023 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.hmrcfrontend.views.viewmodels.footer + +import uk.gov.hmrc.hmrcfrontend.views.viewmodels.JsonRoundtripSpec +import uk.gov.hmrc.hmrcfrontend.views.viewmodels.footer.Generators._ + +class MetaSpec extends JsonRoundtripSpec[Meta] diff --git a/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/reporttechnicalissue/Generators.scala b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/reporttechnicalissue/Generators.scala index 8493f2bcd..7afac440d 100644 --- a/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/reporttechnicalissue/Generators.scala +++ b/play-frontend-hmrc-play-30/src/test/scala/uk/gov/hmrc/hmrcfrontend/views/viewmodels/reporttechnicalissue/Generators.scala @@ -24,13 +24,15 @@ object Generators { implicit val arbReportTechnicalIssue: Arbitrary[ReportTechnicalIssue] = Arbitrary { for { - text <- genAlphaStr() + serviceId <- genAlphaStr() + serviceCode <- genNonEmptyAlphaStr language <- arbLanguage.arbitrary classes <- Gen.option(genClasses()) baseUrl <- Gen.option(genAlphaStr()) referrerUrl <- Gen.option(genAlphaStr()) } yield ReportTechnicalIssue( - serviceCode = text, + serviceId = serviceId, + serviceCode = serviceCode, language = language, classes = classes, baseUrl = baseUrl,