inkBlocks.testSuite
README.md
inkBlocks tests
Checks the package against the rules and against what its docs promise, most of it on the presented frame of a small lit set the suite builds itself (floor, wall, boxes, ball, a camera of its own), since the test runner empties the scene.
- Rules and stacking: every block passes styleKit's block check and sits in its slot (lines as layer blocks, fills as chain blocks in painting order whatever order they are added in); every line swaps for every other line and for styleKit's depth line in one change that keeps id, strength and mask; the ink wash holds the watercolor wash's rank so the two swap in one change; every whole look and every ink set applies in one change, and every ink set is one the blocks take as ink.
- Looks work after a plain install: every block every whole look names ships in inkBlocks itself or in styleKit, the two packages an install of inkBlocks brings, and the paper and boil (
inkPaper,inkBoil) are inkBlocks' own and pass the block check. A look naming a block from another package would be refused in a fresh world, since a package's list of dependencies installs nothing by itself. - Settings: each main setting moves the picture the way its documentation says (line width, wash white point, pool threshold, splatter amount, dry texture amount, dry line dryness).
- On and off, every block, twice: each of the nine blocks is added (the frame changes), swapped for another block of its slot (the frame is still styled), and removed (the frame matches the one before, by FLIP under 0.005 and mean colour within 0.5 of 255), two rounds in a row. Clearing a whole stack also leaves the frame exactly as it was.
- With the watercolor blocks, on the frame: a pen line over the watercolor wash shows and comes off exactly; swapping the watercolor wash for the ink wash changes the picture and swapping back returns it exactly; the Watercolor look applied with
keep = { "line" }keeps the ink line visible; the chain ink wash, watercolor edge darkening and cold-press paper runs all three entries. Needs watercolorBlocks (installed in the Style Cookbook) and says so where it is missing. - A boil, not a flash: under the Ink drawing look (8 drawings a second) frames sampled over about 24 held steps differ pixel by pixel, while the whole frame's mean brightness moves by under one code value from sample to sample and under 1.5 over the run.
- Black stays black: at the Lookbook's every-light-off moment every look, white ink included, stays within 1.5 of 255 of the unstyled dark frame (needs lookbookKit).
It leaves the Lookbook's motion numbers to the Lookbook itself. The scene's shared stack, the viewport camera and the test set are put back after each test. Run with zero tests run inkBlocks or asset.resolve("inkBlocks", "testSuite"):run(). A full run takes a few minutes, most of it the on-and-off rounds waiting for each frame to settle.
Known limits
- Frame tests read the presented frame, so a run needs a drawn view, and a busy machine moves the timing checks (#24548).
- A two-client editor sometimes refuses to load two different scenes at once (#24666, #24667).
- The web build was not checked from here (#20946).
The package README's Known limits lists the rest.