Skip to content

Test the draft workflow end to end against convert - #80

Merged
peterbjohnson merged 6 commits into
devfrom
wb/t49
Sep 20, 2026
Merged

peterbjohnson merged 6 commits into
devfrom
wb/t49

Conversation

@peterbjohnson

Copy link
Copy Markdown
Member

The draft route (source add, spec run, validate, build) and the convert route (the four filters) are tested separately, each against its own fixtures, and nothing checks that they agree or that a draft's zip is a valid import. The first real runs found gaps between stages that no unit test could see.

Add one integration test per filter example: take in2lambda/filters//example.tex through source add, a committed spec for that layout (tests/fixtures/specs already holds one per layout - reuse them), validate and build; load the zip with Set.from_json; and assert (a) the set equals, question for question and part for part, what runner(example.tex, Layout) produces for the same file, up to whitespace the dedent rule removes, (b) every key the written JSON holds exists in the real export fixture, as test_written_keys_exist_in_export checks for convert, and (c) draft replay reproduces the draft. Add the same for the docx and the CRLF source fixtures. Run the test in CI with pandoc, Node and xelatex present so the compile and KaTeX checks are exercised. Done when the four layouts pass, and a deliberate mismatch - a spec that swaps part and solution - fails with a message naming the question.


Workbench ticket t49.

@peterbjohnson
peterbjohnson merged commit 7b39999 into dev Sep 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant