Skip to content

Report content tests: preview-DOM assertions for inline labels/legend are en-only (amends #1911 AC 5.3) #2021

Description

@steilerDev

[product-owner] Follow-up from the PR #2015 review (product-owner, non-blocking). A gap in my own AC on #1911, found while reviewing what the delivered tests actually cover.

As a German-locale user approving a report in the preview, I want the preview's inline labels covered by tests in my locale, so that a German-only rendering defect is caught before it reaches the surface I approve from.

Parent Epic: none — parent-less Bank Report Wizard cluster.
Priority: Could Have

Problem

#1911 AC 5.3 required the split/deposit labels and legend to be asserted "in the extracted PDF text and the preview DOM, in en and de."

As delivered, the PDF half is asserted in both locales. The preview-DOM half is asserted in en only. So the de assertion covers one of the two surfaces the AC names.

The AC was mine and it was under-specified — it stated a two-surface × two-locale matrix in a single sentence without saying it was a matrix, which made the en-only preview coverage a reasonable reading. Recording it as a coverage gap rather than a defect: no German rendering bug is known, and the labels are shared between the surfaces, so the residual risk is low.

But it is not zero, and it is asymmetric in an unhelpful direction: German is exactly where the label pair is riskiest. (Abschlagszahlung) (abzgl. Abschlag) is the same root twice with opposite senses, and glossary.json records the short form as existing only under a measured 75 pt column constraint. The preview is also the surface the user actually approves from.

Acceptance Criteria

  • 1.1 The preview-DOM assertions for the inline labels ((partial), (less deposit), the constituted (Deposit) badge) and the legend entries run in de as well as en.
  • 1.2 Coverage is a genuine 2 × 2 matrix — {PDF, preview} × {en, de} — for the split/deposit label and legend assertions. Any cell deliberately omitted is named and justified in a comment.
  • 1.3 Real i18n bundles and real formatters, per the realRender.test.ts pattern. No key-echoing t mock — a mock that echoes keys passes identically in both locales and would make this issue a no-op.
  • 1.4 Proven non-vacuous: changing a de label string must turn the de preview assertion red while leaving en green. Record the mutation and result in the PR body.
  • 1.5 Test-only change. No production code touched.

Notes

Rated Could Have: a real gap, cheap to close, but the labels are shared across surfaces so the probability of a preview-only German defect is low.

Amends #1911 AC 5.3 — that AC's intent was always the full matrix; the wording did not say so. Recording the correction here rather than editing a released AC, per the standing rule that closed ACs get a dated supersession note, never a rewrite.

Related: #1911, #1965 (preview/PDF parity), #2020 (the other parity gap found in the same review).

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: could haveMoSCoW: Could Havetech-debtTechnical debt cleanup work (lint, refactors, etc.)

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions