From f73f76220d48d1e3b2484d83720b0a155e1eca17 Mon Sep 17 00:00:00 2001 From: Ilia Denisov Date: Fri, 12 Jun 2026 10:36:13 +0200 Subject: [PATCH] test(ui): cover the invitation-card single-word indicator Make the mock invitation a Russian single-word game so the card's "One word per turn" line renders, and assert it in the lobby e2e. --- ui/e2e/social.spec.ts | 1 + ui/src/lib/mock/data.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/e2e/social.spec.ts b/ui/e2e/social.spec.ts index 6f3d1f4..f94b0e6 100644 --- a/ui/e2e/social.spec.ts +++ b/ui/e2e/social.spec.ts @@ -48,6 +48,7 @@ test('invitations: the lobby shows an invitation and accepting clears it', async await loginLobby(page); await expect(page.getByText('Invitations')).toBeVisible(); await expect(page.getByText(/From Kaya/)).toBeVisible(); + await expect(page.getByText('One word per turn')).toBeVisible(); // the single-word-rule line on the card await page.getByRole('button', { name: /^Accept$/ }).click(); await expect(page.getByText(/From Kaya/)).toBeHidden(); }); diff --git a/ui/src/lib/mock/data.ts b/ui/src/lib/mock/data.ts index eb235bc..602ec13 100644 --- a/ui/src/lib/mock/data.ts +++ b/ui/src/lib/mock/data.ts @@ -57,11 +57,11 @@ export function mockInvitations(): Invitation[] { id: 'inv1', inviter: { accountId: 'kaya', displayName: 'Kaya' }, invitees: [{ accountId: ME, displayName: 'You', seat: 1, response: 'pending' }], - variant: 'scrabble_en', + variant: 'scrabble_ru', turnTimeoutSecs: 86400, hintsAllowed: true, hintsPerPlayer: 1, - multipleWordsPerTurn: true, + multipleWordsPerTurn: false, dropoutTiles: 'remove', status: 'pending', gameId: '',