summaryrefslogtreecommitdiff
path: root/examples/noc/test/system_of_systems.reload.script
diff options
context:
space:
mode:
Diffstat (limited to 'examples/noc/test/system_of_systems.reload.script')
-rw-r--r--examples/noc/test/system_of_systems.reload.script33
1 files changed, 33 insertions, 0 deletions
diff --git a/examples/noc/test/system_of_systems.reload.script b/examples/noc/test/system_of_systems.reload.script
new file mode 100644
index 0000000..613d40f
--- /dev/null
+++ b/examples/noc/test/system_of_systems.reload.script
@@ -0,0 +1,33 @@
+# Live reload keeps State: two emitters run, a replay is paused so nothing
+# moves, the edited build ({v2}: red particles) is loaded, and the emitters
+# and their particles carry over; then the replay goes on.
+click 200 100
+frames 60
+click 440 100
+frames 30
+console record 0
+frames 30
+console stop
+console play 0
+frames 10
+console pause
+frames 2
+expect emitters.len 2
+expect emitters.buffer[0].particles.len 102
+expect emitters.buffer[1].particles.len 42
+expect emitters.buffer[1].particles.buffer[0].position[1] 83.183 ~0.01
+screenshot .zig-cache/e2e/system_of_systems-before.png
+frames 1
+load {v2}
+expect emitters.len 2
+expect emitters.buffer[0].particles.len 102
+expect emitters.buffer[1].particles.len 42
+expect emitters.buffer[1].particles.buffer[0].position[1] 83.183 ~0.01
+frames 2
+screenshot .zig-cache/e2e/system_of_systems-after.png
+frames 1
+expect-different-screenshot .zig-cache/e2e/system_of_systems-before.png .zig-cache/e2e/system_of_systems-after.png
+# Unpaused: the replay goes on from where it was.
+console pause
+frames 15
+expect emitters.buffer[0].particles.len 117