diff options
Diffstat (limited to 'examples/noc/test/path_following.reload.script')
| -rw-r--r-- | examples/noc/test/path_following.reload.script | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/examples/noc/test/path_following.reload.script b/examples/noc/test/path_following.reload.script new file mode 100644 index 0000000..a8cb61e --- /dev/null +++ b/examples/noc/test/path_following.reload.script @@ -0,0 +1,28 @@ +# Live reload keeps State: a new path, a paused replay, the edited build +# ({v2}: a blue road), the same path and vehicles after it, then play on. +frames 30 +click 320 180 +frames 30 +console record 0 +frames 30 +console stop +console play 0 +frames 10 +console pause +frames 2 +expect path[1][0] 117.856 ~0.001 +expect cars[1].position[0] 88.606 ~0.001 +screenshot .zig-cache/e2e/path_following-before.png +frames 1 +load {v2} +expect path[1][0] 117.856 ~0.001 +expect cars[1].position[0] 88.606 ~0.001 +frames 2 +screenshot .zig-cache/e2e/path_following-after.png +frames 1 +# The road changed colour; the vehicles did not move. +expect-different-screenshot .zig-cache/e2e/path_following-before.png .zig-cache/e2e/path_following-after.png +# Unpaused: the replay goes on from where it was. +console pause +frames 15 +expect clock.count 86 |
