commit 3c874e8198ba2fe92b7bbeedbc9b739519114028
parent d4a8895160a4897cdf79e4b712a261d4480cd943
Author: anon <anon@example.com>
Date: Mon, 9 Nov 2026 11:24:29 +0000
Check live-edit navigation against the starting page state
Capture the page's navigation count after startup instead of assuming one
initial event. Preserve the requirement that live editing and post-edit
equipment reuse happen without a page reload.
The complete TestBrowserPendingEquipmentEdit regression passes, including
cancellation, resumed native frames, same-instance reuse and page recovery.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/client/test_pending_edit.mjs b/tools/client/test_pending_edit.mjs
@@ -17,6 +17,7 @@ try {
game = await GameTest.attach(page);
await page.goto(url);
await game.ready();
+ const navigation = game.navigation;
const server = async () => (await page.request.get(url + '/test-state')).json();
const equip = async () => {
const cell = game.state.grids.flatMap(grid => grid.cells).find(cell =>
@@ -58,7 +59,7 @@ try {
await game.wait('post-edit equip completes', state => game.local(state).inventory.some(item => item.id === 1 && item.slot === 6));
evidence.equipped = await server();
assert.equal(evidence.equipped.pending, false);
- assert.equal(game.navigation, 1);
+ assert.equal(game.navigation, navigation);
assert.equal(game.errors.length, 0);
await game.save(output + '/equipped');
await page.reload();