diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-16 21:28:20 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-16 21:28:20 -0300 |
| commit | 6933f99ddb2d7103515d26838496309a807bba26 (patch) | |
| tree | 991c2fe7d4a57957222876e190fa4d16a0fb889c /examples/noc/test/the_wave.timeline.script | |
| parent | 82fca5c9f29124f37f6dcd08e73e6999ce44a69d (diff) | |
| download | sketchbook-6933f99ddb2d7103515d26838496309a807bba26.tar.gz sketchbook-6933f99ddb2d7103515d26838496309a807bba26.zip | |
Move standalone sketches into sketchbook examples
Diffstat (limited to 'examples/noc/test/the_wave.timeline.script')
| -rw-r--r-- | examples/noc/test/the_wave.timeline.script | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/examples/noc/test/the_wave.timeline.script b/examples/noc/test/the_wave.timeline.script new file mode 100644 index 0000000..e35cfcf --- /dev/null +++ b/examples/noc/test/the_wave.timeline.script @@ -0,0 +1,54 @@ +# Timeline check (design.md "Acceptance: timeline"), from +# accel_to_mouse.timeline.script. The wave has no input of its own, so the +# recording is time alone, plus pointer and key events it must ignore. + +# 1. Record. +frames 20 +console snapshot 1 +console record 0 +frames 30 +click 300 200 +key space +frames 40 +console save 2 + +# 2. Played to the end, exactly. +console play 0 +frames 120 +expect-snapshot 2 +screenshot .zig-cache/e2e/the_wave-played.png +# 5. Paused: `draw` must not move State. +frames 30 +expect-snapshot 2 + +# 3. Sought to the end, and to the middle and played on. +console seek end +expect-snapshot 2 +screenshot .zig-cache/e2e/the_wave-sought.png +# 7. What a seek shows equals what playing showed. +expect-same-screenshot .zig-cache/e2e/the_wave-played.png .zig-cache/e2e/the_wave-sought.png +console seek 600 +console pause +frames 10 +console pause +frames 30 +console pause +frames 120 +expect-snapshot 2 + +# 4. Stepped from the start, then back and forth. +console seek start +console step 100000 +expect-snapshot 2 +console step -25 +console step 25 +expect-snapshot 2 + +# 6. A live pointer move, then the same replay. +console stop +move 20 20 +frames 10 +console play 0 +frames 120 +expect-snapshot 2 +console stop |
