blob: ec85d749b6baf29d1c2e1c877b6aaf61f78eee7c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# Timeline check (design.md "Acceptance: timeline"), from
# accel_to_mouse.timeline.script: the angle follows the pointer, so each
# replayed frame must see the pointer its recording saw.
# 1. Record. Input before `record` is the state the recording starts from.
move 560 300
console snapshot 1
console record 0
frames 30
move 100 80
frames 40
move 400 250
frames 30
# Saving stops the recording first: slot 2 is the state at the stop.
console save 2
# 2. Played to the end (one recorded frame per script frame), exactly.
console play 0
frames 120
expect-snapshot 2
screenshot .zig-cache/e2e/recursive_tree-played.png
# 5. Paused (at the end): `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/recursive_tree-sought.png
# 7. What a seek shows equals what playing showed (draw-side caches).
expect-same-screenshot .zig-cache/e2e/recursive_tree-played.png .zig-cache/e2e/recursive_tree-sought.png
console seek 800
console pause
frames 10
# Paused halfway, then on to the end.
console pause
frames 30
console pause
frames 120
expect-snapshot 2
# 4. Stepped: frame by frame 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
|