Problem/Motivation

relative_date_facets has no PHPUnit tests and no .gitlab-ci.yml, so nothing verifies behaviour when core or dependencies change and merge requests get no pipeline. Drupal 12 compatibility (#3434165 (D11)) is waiting to land without any automated check.

Proposed resolution

  • Add the standard .gitlab-ci.yml from https://git.drupalcode.org/project/gitlab_templates (phpcs, phpstan, cspell, phpunit) with OPT_IN_TEST_NEXT_MINOR and OPT_IN_TEST_PREVIOUS_MAJOR enabled, modelled on dubbot's.
  • Add tests under tests/src/:
  • Unit test for RelativeDateItemProcessor: configured labels/offsets produce the expected bucket list and raw values.
  • Kernel test for the search_api_relative_date query type with a Search API DB index: counts land in the right buckets, and a float-string timestamp from Search API no longer triggers the deprecation fixed in #3543160 (regression test).
  • Functional test: the "Relative date range" widget renders the configured buckets on a facet block.
  • Make phpcs and cspell blocking once they pass.

Remaining tasks

  • [ ] .gitlab-ci.yml
  • [ ] Tests
  • [ ] Green pipeline on the MR

API changes

None.

Data model changes

None.

AI-Generated: Yes (Claude drafted this summary from a review of the repository; I edited and verified it.)

Comments

davidburns created an issue. See original summary.

davidburns’s picture

Issue summary: View changes

  • 48427d85 committed on 3639018-tests-ci
    Issue #3639018: Add automated test coverage and GitLab CI
    
    Kernel...

  • fc9b6e99 committed on 3639018-tests-ci
    Issue #3639018: Add automated test coverage and GitLab CI
    
    Kernel...

  • fc9b6e99 committed on 1.1.x
    Issue #3639018: Add automated test coverage and GitLab CI
    
    Kernel...