Play the guest's changed demo in e2e 70 (#428)
feuerwerk / gate (push) Successful in 4m34s
feuerwerk / suite (push) Failing after 18m31s

The test plan of #428 asks a guest to change the demo and play it,
with no request that writes reaching the server. e2e 70 only changed
it.

- 70f now plays the changed demo and stops it before it counts the
  requests.

Tests: e2e 70 (atx) ALL PASSED, 13 checks, mode "play", no writes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5.5 committed 2026-10-16 07:19:31 +02:00
1 parent 925a39a276
commit 0d7672a5af
1 file changed
+7 -4
+7 -4
View File
@@ -203,16 +203,19 @@ export async function guest(t) {
JSON.stringify(picker),
);
// 70f. A change stays in the tab: well past the autosave's second, nothing has gone out.
// 70f. A change, played, stays in the tab: well past the autosave's second, nothing has gone out.
await clickText('+');
await pickAssetType(t, 'Sprite');
await t.play();
const mode = await json('__gm.state.mode');
await t.stop();
await sleep(2500);
const changed = await json('__gm.state.project.assets.length');
const copy = await (await send('GET', `demos/${token}`, { as: 'nobody' })).json();
check(
"a guest's change stays in the tab: no request that writes, and the copy on the server as it was",
changed === 3 && writes.length === 0 && copy.project.assets.length === 2,
JSON.stringify({ changed, writes, served: copy.project.assets.length }),
'a guest changes the demo and plays it: no request that writes, and the copy on the server as it was',
mode === 'play' && changed === 3 && writes.length === 0 && copy.project.assets.length === 2,
JSON.stringify({ mode, changed, writes, served: copy.project.assets.length }),
);
// 70g. Sign in… goes back to the sign-in screen; the demo picked again is the copy as it was.