Test the draft workflow end to end against convert - #80
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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),validateandbuild; load the zip with Set.from_json; and assert (a) the set equals, question for question and part for part, whatrunner(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 replayreproduces 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.