diff options
Diffstat (limited to 'examples/noc/test/fluid_resistance.reload.script')
| -rw-r--r-- | examples/noc/test/fluid_resistance.reload.script | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/examples/noc/test/fluid_resistance.reload.script b/examples/noc/test/fluid_resistance.reload.script new file mode 100644 index 0000000..3c44287 --- /dev/null +++ b/examples/noc/test/fluid_resistance.reload.script @@ -0,0 +1,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 |
