Add full test suite with unit, integration, and E2E smoke tests.
Introduce test.bat orchestrating Go/Vitest/Playwright phases, expand coverage across server, agent, and dashboard, and document in tests/README.md.
This commit is contained in:
29
server/web/e2e/smoke.spec.ts
Normal file
29
server/web/e2e/smoke.spec.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
|
||||
test.describe('AetherForge smoke', () => {
|
||||
test('health endpoint responds', async ({ request }) => {
|
||||
const res = await request.get('/api/v1/health');
|
||||
expect(res.ok()).toBeTruthy();
|
||||
const body = await res.json();
|
||||
expect(body.status).toBe('ok');
|
||||
});
|
||||
|
||||
test('login gate renders and accepts credentials', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await expect(page.getByRole('heading', { name: 'AetherForge' })).toBeVisible({ timeout: 15_000 });
|
||||
await page.getByLabel('Username').fill('drjones');
|
||||
await page.getByLabel('Password').fill('czapiewski');
|
||||
await page.getByRole('button', { name: /enter command deck/i }).click();
|
||||
await expect(page.getByRole('heading', { name: 'Command Deck' })).toBeVisible({ timeout: 15_000 });
|
||||
});
|
||||
|
||||
test('forge page loads after login', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await page.getByLabel('Username').fill('drjones');
|
||||
await page.getByLabel('Password').fill('czapiewski');
|
||||
await page.getByRole('button', { name: /enter command deck/i }).click();
|
||||
await expect(page.getByRole('heading', { name: 'Command Deck' })).toBeVisible({ timeout: 15_000 });
|
||||
await page.getByRole('link', { name: /forge/i }).click();
|
||||
await expect(page.getByRole('heading', { name: 'The Forge' })).toBeVisible({ timeout: 10_000 });
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user