import { expect, test } from '@playwright/test'; import { expectFooterLinks, expectPrimaryNavigation, expectShell, openMobileNavigation, visitPage, } from './smoke-helpers'; const coreRoutes = ['/', '/product', '/solutions', '/security-trust', '/integrations', '/contact'] as const; test('contact page qualifies the conversation and keeps legal links reachable', async ({ page }) => { await visitPage(page, '/contact'); await expectShell(page, 'Start a qualified working session instead of a generic demo request.'); await expectPrimaryNavigation(page); await expectFooterLinks(page); await expect(page.getByRole('main').getByRole('link', { name: 'Email the TenantAtlas team' }).first()).toBeVisible(); await expect(page.getByRole('main').getByRole('link', { name: 'Privacy' }).first()).toBeVisible(); await expect(page.getByRole('main').getByRole('link', { name: 'Terms' }).first()).toBeVisible(); }); test('legal, privacy, and terms routes are published and linked', async ({ page }) => { await visitPage(page, '/legal'); await expectShell(page, 'Legal access should stay one click away from the contact path.'); await expect(page.getByRole('main').getByRole('link', { name: 'Privacy' }).first()).toBeVisible(); await expect(page.getByRole('main').getByRole('link', { name: 'Terms' }).first()).toBeVisible(); await visitPage(page, '/privacy'); await expectShell(page, 'Public-site privacy overview for TenantAtlas inquiries.'); await visitPage(page, '/terms'); await expectShell(page, 'Website terms for the public TenantAtlas surface.'); }); test('core pages keep contact and legal paths within reach', async ({ page }) => { for (const path of coreRoutes) { await visitPage(page, path); await expectFooterLinks(page); if (path !== '/contact') { await expect(page.locator('main a[href="/contact"]').first()).toBeVisible(); } } }); test.describe('mobile navigation', () => { test.use({ viewport: { width: 390, height: 844 } }); test('mobile menu exposes the published contact and legal paths', async ({ page }) => { await visitPage(page, '/'); await openMobileNavigation(page); await expect(page.getByRole('banner').getByRole('link', { name: /Contact/ }).first()).toBeVisible(); await expect(page.getByRole('contentinfo').getByRole('link', { name: 'Privacy' })).toBeVisible(); await expect(page.getByRole('contentinfo').getByRole('link', { name: 'Terms' })).toBeVisible(); }); });