dotCMS / dotCMS/core

Follow-up tests for a11y render-source metadata (PR #36264): render IT, FileRefView record, PageResourceHelper test

Open
#36,269 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dotCMS : Technical Debt Type : Test Automation
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Summary

Follow-up test/quality work deferred from PR #36264 ("Expose page render source metadata for a11y agent"). The substantive correctness items from review (cross-host theme template cache-key bug, source-map permission gating) were fixed in that PR; this issue tracks the remaining test coverage and a style improvement so #36264 can merge without ballooning.

Tasks

1. End-to-end render IT for the #parse#dotParse theme-shell switch (highest value)

PR #36264 changed the theme-shell include from #parse (filesystem, always working binary) to #dotParse (version-aware) for every file-asset-theme page — a high-blast-radius change on the hottest render path, currently with no end-to-end test. Add an IT that renders a file-asset-theme page asserting:

  • EDIT mode: no stray data-dot-object='vtl-file' control is emitted for the theme shell (the one-shot dontShowThemeTemplateIcon suppression), while nested #dotParse includes (html_head/header/footer) still emit theirs.
  • LIVE vs WORKING: publish template.vtl, then edit the working copy; assert LIVE renders the published version while PREVIEW/EDIT renders the working one.
  • Scaffolding to reuse: ThemeDataGen, PageRenderTestUtil, HTMLPageAssetRenderedTest.
  • Bonus: a cross-host case exercising the host-qualified template path (a page on host B rendering a theme owned by host A).
2. Convert FileRefView to a Java 25 record

Per review ("prefer records now that we are in Java 25"). Must verify the @Schema / Jackson serialization and OpenAPI generation remain byte-identical after the conversion (regenerate openapi.yaml and confirm no diff).

3. PageResourceHelper file-ref test

Add a unit/integration test for the toFileRef / widget file-ref building path (PageResourceHelper:~1265), covering extension lowercasing and the non-VTL fallback now that the API returns all theme files.

Context

  • Parent: #36265
  • Source PR: #36264
  • Reviewer: @fabrizzio-dotCMS

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the scaffolding named in the issue: ThemeDataGen, PageRenderTestUtil, and HTMLPageAssetRenderedTest, then inspect the render path changed by PR #36264. Cover the EDIT and LIVE versus PREVIEW behavior, convert FileRefView while checking regenerated openapi.yaml, and add the PageResourceHelper:~1265 file-ref test for lowercasing and non-VTL fallback.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend, testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.