fix(client): usable GM column and phone HUD (#89)

This commit is contained in:
2026-11-21 23:39:09 +01:00
parent f170b9c91a
commit e2295aa416
23 changed files with 521 additions and 75 deletions
+6 -3
View File
@@ -70,17 +70,20 @@ test('GM and player: join -> canvas -> hello and roster; revoked returns to sign
await gmView.page.goto(`${origin}/`)
await waitForVisible(gmView.page, '#signin')
await signIn(gmView.page, gmKey)
const gmRoster = await canvasAndRoster(gmView.page, ['GM', 'Alice'])
// The HUD names this connection separately and lists the other players (no self row).
const gmRoster = await canvasAndRoster(gmView.page, ['Alice'])
assert.equal(await gmView.page.textContent('#role'), 'GM')
assert.match(gmRoster, /connected/)
// Alice has a key but no live connection yet: the other-player row says offline.
assert.match(gmRoster, /offline/)
const playerView = await newPage(browser)
await playerView.page.goto(`${origin}/`)
await waitForVisible(playerView.page, '#signin')
await signIn(playerView.page, player.key)
await canvasAndRoster(playerView.page, ['GM', 'Alice'])
const playerRoster = await canvasAndRoster(playerView.page, ['GM'])
assert.equal(await playerView.page.textContent('#role'), 'Player')
assert.equal(await playerView.page.textContent('#me'), 'Alice')
assert.match(playerRoster, /connected/)
// Story 10: the GM replaces the key, the server revokes the session, and the browser stops
// at the sign-in door instead of hammering a dead socket.