blob: 6b17558dfc63ab162d2bd55e105a3cea4d17d7ff (
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
|
# Live reload (design.md "Acceptance: live reload"): play a while, pause a
# replay so State holds still, load the edited build ({v2}: a red attractor),
# check that State carried over and the picture changed where the edit shows.
frames 120
console record 0
frames 30
console stop
console play 0
frames 10
console pause
frames 2
expect movers[0].position[0] 243.076 ~0.001
expect movers[0].angle -2.41708 ~0.001
expect clock.count 130
screenshot .zig-cache/e2e/angular_forces-before.png
frames 1
load {v2}
expect movers[0].position[0] 243.076 ~0.001
expect movers[0].angle -2.41708 ~0.001
expect clock.count 130
frames 2
screenshot .zig-cache/e2e/angular_forces-after.png
frames 1
expect-different-screenshot .zig-cache/e2e/angular_forces-before.png .zig-cache/e2e/angular_forces-after.png 300 160 40 40
# Playing on after the reload: State goes on from where it was.
console pause
frames 10
expect movers[0].position[0] 237.003 ~0.001
expect movers[0].angle -1.41708 ~0.001
expect clock.count 140
|