-
- © {new Date().getFullYear()} {t.siteName}. {t.footer}
-
-
+
+
+
+ {t.contacts.title}
+
+
+
+
+
© {new Date().getFullYear()} {t.siteName}. {t.footer}
+ {(showPrivacy || showTerms) && (
+
+ )}
+
)
diff --git a/src/lib/contact-links.test.ts b/src/lib/contact-links.test.ts
new file mode 100644
index 0000000..055d1cc
--- /dev/null
+++ b/src/lib/contact-links.test.ts
@@ -0,0 +1,35 @@
+import { expect, it, vi } from 'vitest'
+import { renderToStaticMarkup } from 'react-dom/server'
+import Home from '../app/(site)/[locale]/page'
+import Contacts from '../app/(site)/[locale]/contacts/page'
+import { getDict, locales } from '../i18n'
+
+vi.mock('@/app/actions/inquiry', () => ({ submitInquiry: vi.fn() }))
+vi.mock('./content', () => ({
+ loadContent: vi.fn(async () => ({ home: null, news: [] })),
+ loadLegal: vi.fn(async () => null),
+ loadProjects: vi.fn(async () => []),
+ loadSettings: vi.fn(async () => null),
+}))
+
+for (const locale of locales) {
+ for (const [page, Page] of [['Главная', Home], ['Контакты', Contacts]] as const) {
+ it(`${page} (${locale}): прямые контакты в форме и подвале без JavaScript`, async () => {
+ const html = renderToStaticMarkup(await Page({ params: Promise.resolve({ locale }) }))
+ const t = getDict(locale)
+ const form = html.match(/