fix(offline): hotseat review fixes + PWA stale-shell (SW route order)
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / ui (pull_request) Successful in 1m6s
CI / conformance (pull_request) Successful in 10s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m44s
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / ui (pull_request) Successful in 1m6s
CI / conformance (pull_request) Successful in 10s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m44s
Owner review of the pass-and-play PR: - Roster delete (bug): a correct host PIN now ARMS a delete cross next to the row (mirroring the lobby delete) instead of removing it silently; tapping the kebab again clears the host authorisation. - Variant picker (UX): replace the dropdown with the Quick-Match variant plaques + the multiple-words toggle, one-to-one. - Keyboard layout (UX): the roster sits in a scroll region with the Start button pinned (friends-form pattern), so a name input's soft keyboard shrinks the region instead of leaving a full-height blank spacer painted behind the keyboard. - e2e: variant via plaque + a row-delete (arm then cross) regression step. PWA stale-version (pre-existing, same PR): - sw.ts: register the network-first NavigationRoute BEFORE precacheAndRoute. Workbox matches in registration order and the precache route (directoryIndex index.html) shadowed the shell navigation, serving it cache-first — the old build's __APP_VERSION__ until a second load. Fixes both the maintenance self-reload and a cold open after a deploy. Doc updated (ARCHITECTURE).
This commit is contained in:
+16
-4
@@ -54,14 +54,26 @@ test.describe('offline hotseat (pass-and-play)', () => {
|
||||
await typePin(page, '9999');
|
||||
await page.getByRole('button', { name: /^(No|Нет)$/ }).click();
|
||||
|
||||
// Pick the English variant if the picker offers a choice.
|
||||
const variant = page.locator('.fg select').first();
|
||||
if (await variant.isEnabled()) await variant.selectOption('scrabble_en');
|
||||
// Pick the English variant (the plaques mirror Quick Match; "Scrabble" is the Latin English name).
|
||||
await page.locator('.variant', { hasText: 'Scrabble' }).click();
|
||||
|
||||
// Two players: Ann (PIN-locked) and Bob (open).
|
||||
await page.locator('.pname').nth(0).fill('Ann');
|
||||
await page.locator('.pname').nth(1).fill('Bob');
|
||||
await page.locator('.prow').nth(0).locator('.plink').click(); // Ann's seat PIN
|
||||
|
||||
// Row-delete: a 3rd player's kebab asks the host PIN, which ARMS a ❌ (not a silent delete);
|
||||
// tapping the ❌ removes the row.
|
||||
await page.getByRole('button', { name: /Add player|Добавить/i }).click();
|
||||
await expect(page.locator('.prow')).toHaveCount(3);
|
||||
await page.locator('.prow').nth(2).locator('.pkebab').click();
|
||||
await typePin(page, '9999');
|
||||
const rowDel = page.locator('.prow').nth(2).locator('.prow-del');
|
||||
await expect(rowDel).toBeVisible();
|
||||
await rowDel.click();
|
||||
await expect(page.locator('.prow')).toHaveCount(2);
|
||||
|
||||
// Lock Ann's seat with a PIN.
|
||||
await page.locator('.prow').nth(0).locator('.plink').click();
|
||||
await typePin(page, '1234');
|
||||
await typePin(page, '1234');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user