diff --git a/ui/e2e/native.spec.ts b/ui/e2e/native.spec.ts index d3d8666..4fc1f5b 100644 --- a/ui/e2e/native.spec.ts +++ b/ui/e2e/native.spec.ts @@ -43,20 +43,22 @@ test.describe('native offline-first', () => { await page.goto('/'); await expectOfflineGuestLobby(page); - // Play a local English vs_ai game with a pinned bag seed (deals the rack NEWYMAO). The dictionary - // comes from the APK's bundled tier (./dict/scrabble_en@dev.dawg served from dist-e2e), so no - // network is needed — this is the device-local guest playing with zero connectivity. + // Play a local Erudit vs_ai game with a pinned bag seed (deals the rack ОЖЬЯНАО). Erudit is the + // only variant the profileless offline guest is offered (the new-account default), so the single + // `.variant` click both selects it and asserts nothing else is on offer. The dictionary comes from + // the APK's bundled tier (./dict/ru_erudit@dev.dawg served from dist-e2e), so no network is needed + // — this is the device-local guest playing with zero connectivity. await page.evaluate(() => (window as unknown as { __mock: { setLocalSeed(s: string): void } }).__mock.setLocalSeed('1')); await page.locator('button.tab').nth(0).click(); - await page.locator('.variant', { hasText: 'Scrabble' }).click(); + await page.locator('.variant').click(); await page.locator('button.invite').click(); await expect(page.locator('[data-cell]').first()).toBeVisible(); - // The human plays WAY horizontally across the centre (7,5)-(7,7); the local robot replies with a - // real move (which needs the bundled dictionary), so the board gains tiles beyond WAY's three. - await placeTile(page, 'W', 7, 5); - await placeTile(page, 'A', 7, 6); - await placeTile(page, 'Y', 7, 7); + // The human plays НОЖ horizontally across the centre (7,5)-(7,7); the local robot replies with a + // real move (which needs the bundled dictionary), so the board gains tiles beyond НОЖ's three. + await placeTile(page, 'Н', 7, 5); + await placeTile(page, 'О', 7, 6); + await placeTile(page, 'Ж', 7, 7); await expect(page.locator('[data-cell].pending')).toHaveCount(3); await page.locator('.make').click(); await expect(async () => { @@ -95,14 +97,15 @@ test.describe('native offline-first', () => { await expectOfflineGuestLobby(page); // New game -> the offline mode selector offers "with friends" (pass-and-play) to the local guest. - // A minimal create: set the mandatory host (master) PIN, decline a seat, English, two open seats. + // A minimal create: set the mandatory host (master) PIN, decline a seat, the sole offered variant + // (Erudit — the profileless guest's default), two open seats. await page.locator('button.tab').nth(0).click(); await page.getByRole('button', { name: /With friends|друзьями/i }).click(); await page.locator('.hostpin .plink').click(); await typePin(page, '9999'); await typePin(page, '9999'); await page.getByRole('button', { name: /^(No|Нет)$/ }).click(); - await page.locator('.variant', { hasText: 'Scrabble' }).click(); + await page.locator('.variant').click(); await page.locator('.pname').nth(0).fill('Ann'); await page.locator('.pname').nth(1).fill('Bob'); await page.locator('button.invite').click();