diff options
Diffstat (limited to 'examples/noc/test/flow_field.timeline.script')
| -rw-r--r-- | examples/noc/test/flow_field.timeline.script | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/examples/noc/test/flow_field.timeline.script b/examples/noc/test/flow_field.timeline.script new file mode 100644 index 0000000..0f6242f --- /dev/null +++ b/examples/noc/test/flow_field.timeline.script @@ -0,0 +1,60 @@ +# Timeline check (design.md "Acceptance: timeline"), from +# accel_to_mouse.timeline.script. The interaction is space (arrows off and +# on) and clicks (a new field each, from the generator in State), so a replay +# must make the same field changes between the same steps. + +# 1. Record. +frames 20 +console snapshot 1 +console record 0 +frames 20 +key space +frames 15 +click 100 100 +frames 30 +key space +click 500 300 +frames 30 +console save 2 + +# 2. Played to the end, exactly. +console play 0 +frames 120 +expect-snapshot 2 +screenshot .zig-cache/e2e/flow_field-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/flow_field-sought.png +# 7. What a seek shows equals what playing showed. +expect-same-screenshot .zig-cache/e2e/flow_field-played.png .zig-cache/e2e/flow_field-sought.png +console seek 800 +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 click and key, then the same replay. +console stop +click 20 20 +key space +frames 10 +console play 0 +frames 120 +expect-snapshot 2 +console stop |
