feat(m1-1): scaffold SvelteKit + Dockerfile + TDD test harness

- SvelteKit (JS, adapter-node) home page + /api/health route
- frontend/Dockerfile multi-stage build->serve (slabuploader-m1:local, 349MB)
- Test harness: Vitest unit + Playwright e2e; smoke tests RED->GREEN verified
- Build, image build, and image serve all verified
This commit is contained in:
Ty
2026-09-13 22:55:34 -07:00
parent ba8e5f72f6
commit 93666320ef
15 changed files with 2610 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
import { test, expect } from '@playwright/test';
// E2E smoke: the app serves and the health route responds.
// Later cards extend this to walk the full 5-state capture flow.
test('M1-1 harness smoke: app serves + health ok', async ({ page, request }) => {
await page.goto('/');
await expect(page).toHaveTitle(/SlabUploader/);
const res = await request.get('/api/health');
expect(res.ok()).toBeTruthy();
const body = await res.json();
expect(body.ok).toBe(true);
});
+10
View File
@@ -0,0 +1,10 @@
import { describe, it, expect } from 'vitest';
// Smoke test for the M1-1 harness: proves the JS unit runner works end-to-end.
// This is deliberately trivial — later cards (M1-2+) replace it with the
// deterministic-core suite. It must pass to certify the harness is GREEN.
describe('M1 harness smoke', () => {
it('adds numbers (harness is live)', () => {
expect(1 + 1).toBe(2);
});
});