feat(legal): host the privacy policy and EULA at /privacy/ and /eula/
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 11s
CI / integration (pull_request) Successful in 22s
CI / ui (pull_request) Successful in 1m14s
CI / conformance (pull_request) Successful in 10s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Failing after 40s
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 11s
CI / integration (pull_request) Successful in 22s
CI / ui (pull_request) Successful in 1m14s
CI / conformance (pull_request) Successful in 10s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Failing after 40s
Author ui/legal/{privacy,eula}_ru.md, reworked from the source documents: the seller INN is unified (290210610742), contacts unified to the Telegram bot + email + postal address, the EULA governing-law clause leads with Russian law + jurisdiction as residence tiers, the single-binding-language clause is dropped, data collection is scoped to voluntary/support provision, and "Компания" is no longer shout-cased.
Serve both as static pages through the render sidecar, reusing a shared renderLegalHtml generalised from renderOfferHtml: new GET /privacy/ and GET /eula/ (301 from the slashless form), the markdown baked into the image, no backend fetch. Route them at the edge via the @legal caddy matcher with a CI probe asserting each page's canonical URL + the seller INN, so a missing route cannot silently fall through to the landing. Add the two links to the landing footer.
Docs baked in: ARCHITECTURE (renderer legal pages + edge routing), FUNCTIONAL (+_ru) footer, renderer/README routes. Tests: renderer legal.test.mjs, ui renderLegalHtml unit, landing footer e2e.
This commit is contained in:
+15
-11
@@ -59,18 +59,22 @@ test('the landing shows a web-version entry linking /app/, with a caption', asyn
|
||||
await expect(page.getByText('Веб-версия')).toBeVisible();
|
||||
});
|
||||
|
||||
// The footer carries the public-offer link (/offer/ — the legal document a purchase accepts,
|
||||
// rendered by the render sidecar) and, beside it, the feedback link to the Telegram bot the offer
|
||||
// lists as the seller's contact.
|
||||
test('the landing footer links to the public offer and the feedback bot', async ({ page }) => {
|
||||
// The footer carries the legal documents rendered by the render sidecar — the EULA (/eula/), the
|
||||
// privacy policy (/privacy/) and the public offer (/offer/) — plus the feedback link to the Telegram
|
||||
// bot the documents list as the seller's contact.
|
||||
test('the landing footer links to the legal documents and the feedback bot', async ({ page }) => {
|
||||
await page.goto('/landing.html');
|
||||
await expect(page.getByText(/Играй в «Эрудита»/)).toBeVisible(); // Russian by default
|
||||
|
||||
const offer = page.getByRole('link', { name: 'Публичная оферта' });
|
||||
await expect(offer).toBeVisible();
|
||||
expect(await offer.getAttribute('href')).toBe('/offer/');
|
||||
|
||||
const feedback = page.getByRole('link', { name: 'Обратная связь' });
|
||||
await expect(feedback).toBeVisible();
|
||||
expect(await feedback.getAttribute('href')).toBe('https://t.me/Erudit_GameBot');
|
||||
const links: [string, string][] = [
|
||||
['Пользовательское соглашение', '/eula/'],
|
||||
['Политика конфиденциальности', '/privacy/'],
|
||||
['Публичная оферта', '/offer/'],
|
||||
['Обратная связь', 'https://t.me/Erudit_GameBot'],
|
||||
];
|
||||
for (const [name, href] of links) {
|
||||
const link = page.getByRole('link', { name });
|
||||
await expect(link).toBeVisible();
|
||||
expect(await link.getAttribute('href')).toBe(href);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user