From 423ce0b55c48bab71ca2feb8859f5819760597f3 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 9 Aug 2026 21:37:33 +0000 Subject: [PATCH 1/2] Drop the dialog workaround from the point-and-click adventure tests The NPCs no longer count as being talked to by default, so the level starts with no dialog up and the player free to walk. Both tests dismissed that dialog with "no" before they could do anything; they now assert that no dialog is in the way instead, which checks the fixed default rather than working around it. The talking test also ends with a screenshot of the scene once the NPC has agreed to leave. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01M2jc7PVAvmMmirAQude2v1 --- .../starting-point-and-click-adventure.json | 41 +++++++------------ 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/examples/starting-point-and-click-adventure/starting-point-and-click-adventure.json b/examples/starting-point-and-click-adventure/starting-point-and-click-adventure.json index fe666c861..26cff557b 100644 --- a/examples/starting-point-and-click-adventure/starting-point-and-click-adventure.json +++ b/examples/starting-point-and-click-adventure/starting-point-and-click-adventure.json @@ -1337,20 +1337,10 @@ " await harness.stepFrames(3);", "};", "", - "/**", - " * Close the dialog if one is open. The game opens one straight away: the", - " * player is spawned overlapping two NPCs, and an NPC counts as \"being talked", - " * to\" by default (see the feedback document), so the level starts with the", - " * dialog up and the player frozen. Saying \"no\" is how a player gets out of", - " * it, and it leaves the game in the state the rest of the test needs.", - " */", "await harness.stepFrames(3);", - "if (isDialogOpen()) {", - " const dialog = harness.getObjects('TwoChoicesDialogBox')[0];", - " const no = dialog.children.NoButton[0];", - " await clickAt(no.centerX, no.centerY, no.layer);", - "}", - "harness.assert(!isDialogOpen(), 'No dialog is in the way.');", + "// The level starts with nobody being talked to, so the player is free to", + "// walk from the first frame.", + "harness.assert(!isDialogOpen(), 'No dialog is in the way when the level starts.');", "", "// Nothing happens on its own: the player only walks when told to.", "const start = getPlayer();", @@ -1457,23 +1447,18 @@ " await harness.stepFrames(3);", "};", "", - "// The level starts with a dialog already up (the player is spawned", - "// overlapping two NPCs, and an NPC counts as \"being talked to\" by default —", - "// see the feedback document). Say no to it, which is how a player gets out.", "await harness.stepFrames(3);", - "if (isDialogOpen()) {", - " const no = getDialog().children.NoButton[0];", - " await clickAt(no.centerX, no.centerY, no.layer);", - "}", - "harness.assert(!isDialogOpen(), 'No dialog is in the way to begin with.');", + "// Nobody is being talked to when the level starts: the dialog below can only", + "// come from the click.", + "harness.assert(!isDialogOpen(), 'No dialog is open before talking to anyone.');", "", "const npcsBefore = harness.getObjects('NPC').length;", "harness.assert(npcsBefore > 0, 'There are NPCs to talk to.');", "", - "// Click on an NPC standing where the player is: clicking is what picks the", - "// NPC to talk to, and being next to it is what opens the dialog. One of the", - "// NPCs the player spawns on is used, so that the dialog depends on the click", - "// and not on a walk across the level.", + "// Click on an NPC the player is standing next to: clicking is what picks the", + "// NPC to talk to, and being next to it is what opens the dialog. The player", + "// is wide enough to touch two of the NPCs from where it spawns, so one of", + "// those is used and the dialog depends on the click alone.", "const player = getPlayer();", "const isWithinReach = (npc) =>", " Math.abs(npc.centerX - player.centerX) < (npc.width + player.width) / 2 &&", @@ -1514,7 +1499,11 @@ " !harness.getObjects('NPC').some((one) => one.id === npc.id),", " 'The NPC that was talked to is the one that left.'", ");", - "harness.assert(!isDialogOpen(), 'The dialog closes once it is answered.');" + "harness.assert(!isDialogOpen(), 'The dialog closes once it is answered.');", + "", + "// A picture of what the game looks like once this has happened, kept with", + "// the test results.", + "await harness.takeScreenshot('the scene after the NPC agreed to leave');" ] } ], From 4fac57e248e94d9ab1f621bdc4e4d88f409cb6fa Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 9 Aug 2026 21:37:34 +0000 Subject: [PATCH 2/2] Take a screenshot at the end of four more gameplay tests The 3D adventure scene once the NPC has agreed to leave, the survival crafting inventory holding the log that was harvested, the card drawn in front of the deck, and the beat'em up enemy taking the hit. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01M2jc7PVAvmMmirAQude2v1 --- .../starting-3d-point-and-click-adventure.json | 6 +++++- examples/starting-beatemup/starting-beatemup.json | 6 +++++- examples/starting-card-game/starting-card-game.json | 6 +++++- .../starting-first-person-survival-crafting.json | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/examples/starting-3d-point-and-click-adventure/starting-3d-point-and-click-adventure.json b/examples/starting-3d-point-and-click-adventure/starting-3d-point-and-click-adventure.json index 522ef2806..f6592dd85 100644 --- a/examples/starting-3d-point-and-click-adventure/starting-3d-point-and-click-adventure.json +++ b/examples/starting-3d-point-and-click-adventure/starting-3d-point-and-click-adventure.json @@ -1858,7 +1858,11 @@ " !harness.getObjects('NPC').some((one) => one.id === npc.id),", " 'The NPC that was talked to is the one that left.'", ");", - "harness.assert(!isDialogOpen(), 'The dialog closes once it is answered.');" + "harness.assert(!isDialogOpen(), 'The dialog closes once it is answered.');", + "", + "// A picture of what the game looks like once this has happened, kept with", + "// the test results.", + "await harness.takeScreenshot('the scene after the NPC agreed to leave');" ] } ], diff --git a/examples/starting-beatemup/starting-beatemup.json b/examples/starting-beatemup/starting-beatemup.json index 17bb40705..8874f1877 100644 --- a/examples/starting-beatemup/starting-beatemup.json +++ b/examples/starting-beatemup/starting-beatemup.json @@ -2274,7 +2274,11 @@ " knockback > 5,", " 'The enemy is knocked back away from the player (it moved ' +", " Math.round(knockback) + 'px).'", - ");" + ");", + "", + "// A picture of what the game looks like once this has happened, kept with", + "// the test results.", + "await harness.takeScreenshot('the enemy taking the hit');" ] }, { diff --git a/examples/starting-card-game/starting-card-game.json b/examples/starting-card-game/starting-card-game.json index 6b13da1a7..aa4b5f49d 100644 --- a/examples/starting-card-game/starting-card-game.json +++ b/examples/starting-card-game/starting-card-game.json @@ -3164,7 +3164,11 @@ " stillOnDeck[0].centerY - deck.centerY", " ) < 40,", " 'The new card is on the deck.'", - ");" + ");", + "", + "// A picture of what the game looks like once this has happened, kept with", + "// the test results.", + "await harness.takeScreenshot('the card that was drawn, in front of the deck');" ] }, { diff --git a/examples/starting-first-person-survival-crafting/starting-first-person-survival-crafting.json b/examples/starting-first-person-survival-crafting/starting-first-person-survival-crafting.json index 1054d1454..bd9a7c58c 100644 --- a/examples/starting-first-person-survival-crafting/starting-first-person-survival-crafting.json +++ b/examples/starting-first-person-survival-crafting/starting-first-person-survival-crafting.json @@ -4840,7 +4840,11 @@ " harvested,", " 'Acting on the tree puts a log in the inventory (it holds ' +", " JSON.stringify(filledSlots()) + ').'", - ");" + ");", + "", + "// A picture of what the game looks like once this has happened, kept with", + "// the test results.", + "await harness.takeScreenshot('the inventory holding the log that was harvested');" ] } ],