fix(chat): no chat field or nudge on a finished game
CI / changes (pull_request) Successful in 1s
CI / unit (pull_request) Successful in 9s
CI / integration (pull_request) Successful in 13s
CI / ui (pull_request) Successful in 45s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 59s
CI / changes (pull_request) Successful in 1s
CI / unit (pull_request) Successful in 9s
CI / integration (pull_request) Successful in 13s
CI / ui (pull_request) Successful in 45s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 59s
A finished game is read-only: gate the nudge behind canNudge (active game, opponent's turn) so it no longer shows on a finished (or otherwise non-active) game — where the backend rejects it anyway. The message field is already hidden off your own turn. Extend the finished-game e2e to assert neither Send nor Nudge is offered.
This commit is contained in:
@@ -116,6 +116,9 @@ test('finished game draws an inert footer and trims live-only controls', async (
|
||||
await page.getByRole('button', { name: 'Chat' }).click(); // 💬
|
||||
await expect(page.locator('.pane')).toHaveCount(1);
|
||||
await expect(page.getByRole('button', { name: 'Dictionary' })).toHaveCount(0);
|
||||
// A finished game is read-only: neither the message field nor the nudge is offered.
|
||||
await expect(page.getByRole('button', { name: 'Send' })).toHaveCount(0);
|
||||
await expect(page.getByRole('button', { name: 'Nudge' })).toHaveCount(0);
|
||||
});
|
||||
|
||||
test('lobby: hiding a finished game removes it (kebab → ❌), keeping the others', async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user