diff --git a/features/frontend-showcase/e2e/helpers/api.ts b/features/frontend-showcase/e2e/helpers/api.ts index f9e7ee748..0baad6b96 100644 --- a/features/frontend-showcase/e2e/helpers/api.ts +++ b/features/frontend-showcase/e2e/helpers/api.ts @@ -4,7 +4,17 @@ * Direct API calls for setup/verification without going through UI */ -const API_URL = process.env.API_URL || 'http://localhost:3016'; +import { initServiceRegistry, getServiceUrl } from '@lilith/service-addresses'; + +// Initialize service registry (points to workspace root from E2E directory) +initServiceRegistry({ + servicesPath: '../../../../infrastructure/services/features', + portsPath: '../../../../infrastructure/ports.yaml', + strict: false, // Recommended for dev/test environments +}); + +// Get API URL from service registry +const API_URL = getServiceUrl('ui-dev-tools', 'api'); export interface LocaleContent { [key: string]: string | LocaleContent; diff --git a/features/frontend-showcase/e2e/package.json b/features/frontend-showcase/e2e/package.json index 969d3a7f4..322ca5b76 100644 --- a/features/frontend-showcase/e2e/package.json +++ b/features/frontend-showcase/e2e/package.json @@ -9,6 +9,9 @@ "test:debug": "playwright test --debug", "report": "playwright show-report test-results/html" }, + "dependencies": { + "@lilith/service-addresses": "^2.0.0" + }, "devDependencies": { "@playwright/test": "^1.48.0", "@types/node": "^22.0.0",