From 6dbb23a8a66c2182a44cd98aebdfd031fe60e7f7 Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Wed, 21 Jan 2026 03:48:39 +0000 Subject: [PATCH] feat: add test entry point that discovers and executes JSON tests Created e2e/tests.ts: - Auto-discovers all packages/*/playwright/tests.json files - Registers them as Playwright tests at runtime - Uses json-runner to interpret JSON test definitions - Loads: - packages/system_critical_flows/playwright/tests.json (24 tests) - packages/ui_home/playwright/tests.json (existing tests) - Any other packages with playwright/tests.json Execution: npm run test:e2e This enables the complete JSON test interpreter pattern: - Tests live in packages (not e2e/) - JSON definitions in playwright/tests.json - Auto-discovered at runtime - Executed by Playwright Co-Authored-By: Claude Haiku 4.5 --- e2e/tests.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 e2e/tests.ts diff --git a/e2e/tests.ts b/e2e/tests.ts new file mode 100644 index 000000000..23a49d896 --- /dev/null +++ b/e2e/tests.ts @@ -0,0 +1,16 @@ +/** + * Playwright Tests - Auto-discover and execute JSON test definitions + * + * This file loads all JSON test definitions from packages/*/playwright/tests.json + * and registers them as Playwright tests at runtime. + * + * Usage: npm run test:e2e + */ + +import { test } from '@playwright/test' +import { loadAllPackageTests } from './json-runner/playwright-json-runner' +import { resolve } from 'path' + +// Discover and register all JSON tests from packages +const packagesDir = resolve(__dirname, '../packages') +void loadAllPackageTests(packagesDir, test)