e16076c89e
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 9s
CI / integration (pull_request) Successful in 11s
CI / ui (pull_request) Successful in 31s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 55s
Close out Stage 17 round 6: - Landing page at / — one Vite build with two entries (index.html = game SPA, landing.html = a lightweight landing reusing the theme/i18n/ aboutContent leaf modules, not the app store). - Move the web game SPA to /app/; the Telegram Mini App stays at /telegram/ (gateway webui.Handler(stripPrefix, indexName): landing at /, SPA at /app/ + /telegram/). Per-language "Play in Telegram" link via new VITE_TELEGRAM_LINK_EN/_RU build vars (button hides when unset). - Cache headers: hash-named /assets/* immutable, HTML shells no-cache (the go:embed zero modtime emitted no validators, so the client re-downloaded the whole bundle every launch). - Live-stream 15s abort fix: an immediate heartbeat on open + a 10s default interval (the first tick at 15s raced the edge idle timeout -> reconnect storm). PLAN/ARCHITECTURE(§13)/FUNCTIONAL(+ru)/gateway+ui+deploy READMEs updated; round 6 closed. Tests: gateway webui/connectsrv units, ui landing unit + e2e, full e2e (60) green.
15 lines
786 B
TypeScript
15 lines
786 B
TypeScript
import { expect, test } from './fixtures';
|
|
|
|
// The landing page is a separate Vite entry (landing.html), served at "/" in production while
|
|
// the game SPA moves to /app/ and /telegram/ (Stage 17). In dev it is reachable at /landing.html.
|
|
test('landing shows the pitch, a browser CTA to /app/, and switches language', async ({ page }) => {
|
|
await page.goto('/landing.html');
|
|
|
|
// The primary call to action opens the web app mount.
|
|
await expect(page.getByRole('link', { name: /Play in browser/i })).toHaveAttribute('href', '/app/');
|
|
|
|
// The language switch flips the copy to Russian (reusing the app i18n).
|
|
await page.getByRole('button', { name: 'Русский' }).click();
|
|
await expect(page.getByRole('link', { name: /Играть в браузере/ })).toBeVisible();
|
|
});
|