[Bug] Nine of 24 slide types never pass through an export test #615

Closed
opened 2026-07-22 16:19:57 +00:00 by brenno · 1 comment
Owner

Found in the pre-publication test review.

Evidence: test/export_service_test.dart:377-409 uses only SlideType.title and SlideType.bullets. test/slide_rasterizer_test.dart touches six types. Across all export tests together (marp-html, chart, package, rasterizer, export_service) nine of the 24 types are absent entirely: section, twoBullets, twoImages, code, cockpit, question, timeline, finding, signOff.

For contrast, test/markdown_round_trip_test.dart:2242 does iterate for (final type in SlideType.values) — the project can do this; for export it simply has not been done.

Why this matters now: export is what the user takes out of OciDeck. A timeline or finding that rasterises as an empty page is a first-order user-facing fault and no gate sees it, so the bug report arrives from outside instead of from the suite. This review already found exactly that failure mode for a Scorecard slide (separate issue) — an empty slide that passed the quality gate and exported blank. When adding a slide type the compiler names six places; export is not among them.

Proposal: one test that runs for (final type in SlideType.values), exports a one-slide deck per type, and asserts per type that the PDF contains more than an empty page — for example that a unique text fragment from the fixture appears in the extracted PDF text, as :285 already does for TLP:AMBER.

Found in the pre-publication test review. **Evidence:** `test/export_service_test.dart:377-409` uses only `SlideType.title` and `SlideType.bullets`. `test/slide_rasterizer_test.dart` touches six types. Across all export tests together (marp-html, chart, package, rasterizer, export_service) nine of the 24 types are absent entirely: `section, twoBullets, twoImages, code, cockpit, question, timeline, finding, signOff`. For contrast, `test/markdown_round_trip_test.dart:2242` does iterate `for (final type in SlideType.values)` — the project can do this; for export it simply has not been done. **Why this matters now:** export is what the user takes out of OciDeck. A `timeline` or `finding` that rasterises as an empty page is a first-order user-facing fault and no gate sees it, so the bug report arrives from outside instead of from the suite. This review already found exactly that failure mode for a Scorecard slide (separate issue) — an empty slide that passed the quality gate and exported blank. When adding a slide type the compiler names six places; export is not among them. **Proposal:** one test that runs `for (final type in SlideType.values)`, exports a one-slide deck per type, and asserts per type that the PDF contains more than an empty page — for example that a unique text fragment from the fixture appears in the extracted PDF text, as `:285` already does for `TLP:AMBER`.
Author
Owner

Opgelost in PR #686, op main.

De test loopt uitputtend over SlideType.values en toetst per type dat er werkelijk iets getekend is. In de rasterizer en niet in de exportservice: die krijgt al gerenderde PNG's aangereikt, terwijl de rasterizer de enige weg naar PDF en PPTX is. Daar moet "lege pagina bij de ontvanger" zich laten vangen.

Vandaag rastert elk type iets — dit is bewaking, geen reparatie. Wel eerst rood laten worden: met een vers aangemaakte scorecard-dia, precies het geval uit #583, valt hij om met "rastert als een egale vlakte". Zonder die stap wist ik niet of de assertie scherp genoeg was.

De fixture is gedeeld. markdown_round_trip_test.dart liep als enige al uitputtend over het enum, met een eigen _metInhoud(type). Die staat nu in test/slide_fixtures.dart en wordt door beide gebruikt — één lijst, want twee lijsten lopen uiteen, en dan dekt de ene een type dat de andere overslaat. Dat is precies de vorm van deze bug.

Opgelost in PR #686, op main. De test loopt uitputtend over `SlideType.values` en toetst per type dat er werkelijk iets getekend is. **In de rasterizer en niet in de exportservice**: die krijgt al gerenderde PNG's aangereikt, terwijl de rasterizer de enige weg naar PDF en PPTX is. Daar moet "lege pagina bij de ontvanger" zich laten vangen. **Vandaag rastert elk type iets** — dit is bewaking, geen reparatie. Wel eerst rood laten worden: met een vers aangemaakte scorecard-dia, precies het geval uit #583, valt hij om met "rastert als een egale vlakte". Zonder die stap wist ik niet of de assertie scherp genoeg was. **De fixture is gedeeld.** `markdown_round_trip_test.dart` liep als enige al uitputtend over het enum, met een eigen `_metInhoud(type)`. Die staat nu in `test/slide_fixtures.dart` en wordt door beide gebruikt — één lijst, want twee lijsten lopen uiteen, en dan dekt de ene een type dat de andere overslaat. Dat is precies de vorm van deze bug.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
LibreKAT/Ocideck#615
No description provided.