TenantAtlas/apps/website/tests/smoke/smoke-helpers.ts
ahmido eeb5c98450 feat: rebuild website on ScrewFast foundation (#393)
## Summary
- rebuild `apps/website` on the pinned ScrewFast Astro foundation
- replace the legacy page/content/component structure with the new section and UI architecture
- add Starlight-based docs and the new public route set for platform, pricing, trust, legal, and guides
- refresh website tooling, dependencies, and Playwright smoke coverage for the new site shell

## Scope
- touches `apps/website` and the matching spec artifacts for feature 402
- does not modify `apps/platform`

## Testing
- not run in this step

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #393
2026-05-20 21:36:29 +00:00

58 lines
1.2 KiB
TypeScript

import { expect, type Page } from '@playwright/test';
export const renderedRoutes = [
'/',
'/platform',
'/pricing',
'/contact',
'/trust',
'/legal',
'/privacy',
'/terms',
'/imprint',
'/welcome-to-docs/',
] as const;
export const redirectRoutes = [
'/product',
'/products',
'/services',
'/blog',
'/insights',
] as const;
const forbiddenPublicText = [
'ScrewFast',
'construction',
'hardware',
'template',
'open-source',
'TenantAtlas',
'TenantPilot',
'TenantCTRL',
'trusted by',
'SOC 2',
'ISO 27001',
'99.9%',
'Microsoft endorsed',
'guaranteed recovery',
'guaranteed compliance',
];
export async function expectNoForbiddenPublicText(page: Page): Promise<void> {
const text = await page.locator('body').innerText();
for (const term of forbiddenPublicText) {
expect(text.toLowerCase()).not.toContain(term.toLowerCase());
}
}
export async function expectNoHorizontalOverflow(page: Page): Promise<void> {
const metrics = await page.evaluate(() => ({
clientWidth: document.documentElement.clientWidth,
scrollWidth: document.documentElement.scrollWidth,
}));
expect(metrics.scrollWidth).toBeLessThanOrEqual(metrics.clientWidth + 1);
}