Files
websitedev/proto/e2e/staging-smoke.spec.ts
T
Do Siki bdf9aac4d0
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Waiting to run
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Blocked by required conditions
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Blocked by required conditions
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Waiting to run
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Blocked by required conditions
content: apply copy review — concrete, credible claims and CTAs
- hero: state the actual offering (hosting, mail, domains) instead of a mission statement
- security USP: list concrete measures instead of 'maximális teljesítmény' promise
- hosting: replace '99% uptime garancia' with the 99.9% availability goal
  (excluding planned maintenance) — no absolute guarantee claim without SLA backing
- email: encrypted webmail/IMAP access wording; domain: registration, renewal
  and DNS in one place; SPF/DKIM/DMARC explained by purpose
- per-service CTA texts instead of the generic 'További információk'
- main CTA: 'Kérjen személyre szabott konzultációt' (smoke test updated to match)
- bottom CTA asks the visitor to describe their need briefly
2026-08-18 20:39:24 +02:00

61 lines
2.5 KiB
TypeScript

import { expect, test } from '@playwright/test'
test('SMOKE-01: health endpoint is available', async ({ request }) => {
const response = await request.get('/api/health')
expect(response.status()).toBe(200)
await expect(response).toBeOK()
await expect(response.json()).resolves.toMatchObject({ status: 'ok' })
})
test('SMOKE-02: homepage renders its critical shell without console errors', async ({ page }) => {
const consoleErrors: string[] = []
page.on('console', message => {
if (message.type() !== 'error') return
// Chromium logs failed resource loads (e.g. favicon 404) as console errors.
// Those are network noise here; real JS errors must still fail the test.
if (message.text().startsWith('Failed to load resource')) return
consoleErrors.push(message.text())
})
await page.goto('/')
await expect(page.getByRole('heading', { level: 1 })).toBeVisible()
await expect(page.getByRole('navigation')).toBeVisible()
await expect(page.getByRole('link', { name: /személyre szabott konzultációt/i })).toBeVisible()
await expect(page.locator('footer')).toBeVisible()
expect(consoleErrors).toEqual([])
})
test('SMOKE-03: main navigation opens every public core page', async ({ page }) => {
const targets = [
['Kezdőlap', '/'],
['Rólunk', '/rolunk'],
['Szolgáltatások', '/szolgaltatasok'],
['Kapcsolat', '/kapcsolat'],
] as const
await page.goto('/')
for (const [label, expectedPath] of targets) {
await page.getByRole('navigation').getByRole('link', { name: label }).click()
await expect(page).toHaveURL(new RegExp(`${expectedPath.replace('/', '\\/')}$`))
await expect(page.getByRole('heading', { level: 1 })).toHaveCount(1)
}
})
test('SMOKE-04: service content and contact CTA are visible', async ({ page }) => {
await page.goto('/')
await expect(page.getByRole('heading', { name: 'Szolgáltatásaink' })).toBeVisible()
await expect(page.getByRole('link', { name: /kérjen ajánlatot/i })).toHaveAttribute('href', '/kapcsolat')
})
test('SMOKE-05: empty contact form is blocked client-side without API submission', async ({ page }) => {
let contactPostCount = 0
page.on('request', request => {
if (request.method() === 'POST' && new URL(request.url()).pathname === '/api/contact') contactPostCount++
})
await page.goto('/kapcsolat')
await page.getByRole('button', { name: 'Üzenet küldése' }).click()
await expect(page.getByRole('textbox', { name: 'Név *' })).toBeVisible()
await expect.poll(() => contactPostCount).toBe(0)
})