summaryrefslogtreecommitdiff
path: root/examples/noc/test/fluid_resistance.reload.script
blob: 3c44287997706d7d7e3896926d04b44f5b4b96e5 (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
# Live reload (design.md "Acceptance: live reload"): play a while, pause a
# replay so State holds still, load the edited build ({v2}: blue liquid),
# check that State carried over and the picture changed where the edit shows.
frames 60
click 320 180
frames 60
console record 0
frames 30
console stop
console play 0
frames 10
console pause
frames 2
expect movers[4].position[1] 214.757 ~0.001
expect movers[4].mass 2.32375 ~0.001
expect rng.s[0] 539197494011417557
screenshot .zig-cache/e2e/fluid_resistance-before.png
frames 1
load {v2}
expect movers[4].position[1] 214.757 ~0.001
expect movers[4].mass 2.32375 ~0.001
expect rng.s[0] 539197494011417557
frames 2
screenshot .zig-cache/e2e/fluid_resistance-after.png
frames 1
expect-different-screenshot .zig-cache/e2e/fluid_resistance-before.png .zig-cache/e2e/fluid_resistance-after.png 0 180 640 180
# Playing on after the reload: State goes on from where it was.
console pause
frames 10
expect movers[4].position[1] 231.551 ~0.001
expect movers[4].mass 2.32375 ~0.001
expect rng.s[0] 539197494011417557