From 0d7672a5af720a4760f0123686dc3b274ca50cef Mon Sep 17 00:00:00 2001 From: MelekTaus Date: Fri, 16 Oct 2026 07:19:31 +0200 Subject: [PATCH] Play the guest's changed demo in e2e 70 (#428) 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 --- tools/e2e/70-guest.mjs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/e2e/70-guest.mjs b/tools/e2e/70-guest.mjs index 6f349ac9..e2af709d 100644 --- a/tools/e2e/70-guest.mjs +++ b/tools/e2e/70-guest.mjs @@ -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.