test(ui): cover the invitation-card single-word indicator
CI / changes (pull_request) Successful in 1s
CI / unit (pull_request) Successful in 8s
CI / integration (pull_request) Successful in 14s
CI / ui (pull_request) Successful in 46s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 58s

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.
This commit is contained in:
Ilia Denisov
2026-06-12 10:36:13 +02:00
parent 0b57400c6f
commit f73f76220d
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -48,6 +48,7 @@ test('invitations: the lobby shows an invitation and accepting clears it', async
await loginLobby(page); await loginLobby(page);
await expect(page.getByText('Invitations')).toBeVisible(); await expect(page.getByText('Invitations')).toBeVisible();
await expect(page.getByText(/From Kaya/)).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 page.getByRole('button', { name: /^Accept$/ }).click();
await expect(page.getByText(/From Kaya/)).toBeHidden(); await expect(page.getByText(/From Kaya/)).toBeHidden();
}); });
+2 -2
View File
@@ -57,11 +57,11 @@ export function mockInvitations(): Invitation[] {
id: 'inv1', id: 'inv1',
inviter: { accountId: 'kaya', displayName: 'Kaya' }, inviter: { accountId: 'kaya', displayName: 'Kaya' },
invitees: [{ accountId: ME, displayName: 'You', seat: 1, response: 'pending' }], invitees: [{ accountId: ME, displayName: 'You', seat: 1, response: 'pending' }],
variant: 'scrabble_en', variant: 'scrabble_ru',
turnTimeoutSecs: 86400, turnTimeoutSecs: 86400,
hintsAllowed: true, hintsAllowed: true,
hintsPerPlayer: 1, hintsPerPlayer: 1,
multipleWordsPerTurn: true, multipleWordsPerTurn: false,
dropoutTiles: 'remove', dropoutTiles: 'remove',
status: 'pending', status: 'pending',
gameId: '', gameId: '',