BS-007 Implement accepted Contact page and independent enquiry service

This commit is contained in:
rob
2026-11-10 19:45:11 +00:00
parent 21d048a1ff
commit 5bfb128e94
46 changed files with 837 additions and 145 deletions
+2 -2
View File
@@ -4,14 +4,14 @@ import { expect, test } from '@playwright/test'
for (const [path, heading] of [
['/', /Software solutions\s*for real-world use\./], ['/services', 'Services'],
['/projects', 'Projects'], ['/projects/example', 'Project details'],
['/about', 'About BortStack'], ['/contact', 'Contact'], ['/privacy', 'Privacy policy'],
['/about', 'About BortStack'], ['/contact', 'Have a project in mind?'], ['/privacy', 'Privacy policy'],
['/login', 'Page not found'], ['/dashboard', 'Page not found'],
]) {
test(`${path} renders without overflow or auth requests`, async ({ page }) => {
const errors = []
const accountRequests = []
page.on('pageerror', error => errors.push(error.message))
page.on('request', request => { if (/\/api\//.test(request.url())) accountRequests.push(request.url()) })
page.on('request', request => { if (/\/api\//.test(request.url()) && !request.url().endsWith('/api/contact/config')) accountRequests.push(request.url()) })
await page.goto(path)
await expect(page.getByRole('heading', { name: heading, exact: true })).toBeVisible()
expect(await page.locator('html').evaluate(el => el.scrollWidth <= el.clientWidth)).toBe(true)