Standardize live search Playwright setup lane
This commit is contained in:
@@ -70,6 +70,33 @@ npm run test:e2e
|
||||
```
|
||||
|
||||
The Playwright config auto-starts `npm run serve:test` and intercepts Authority redirects, so no live IdP is required. For CI/offline nodes, pre-install the required browsers via `npx playwright install --with-deps` and cache the results alongside your npm cache.
|
||||
|
||||
### Standard live-search acceptance lane
|
||||
|
||||
Use this lane when you need browser verification against a freshly ingested local AdvisoryAI corpus instead of mocked search responses:
|
||||
|
||||
```bash
|
||||
npm run test:e2e:search:live
|
||||
```
|
||||
|
||||
What it does:
|
||||
- starts or reuses the dedicated AdvisoryAI knowledge-test Postgres via `devops/compose/docker-compose.advisoryai-knowledge-test.yml`
|
||||
- starts or reuses the local AdvisoryAI WebService on `http://127.0.0.1:10451`
|
||||
- compiles the local CLI if `.artifacts/stella-cli/` is missing
|
||||
- runs `advisoryai sources prepare --json`
|
||||
- rebuilds `POST /v1/advisory-ai/index/rebuild` and `POST /v1/search/index/rebuild`
|
||||
- proves a grounded smoke query before the browser suite runs
|
||||
- executes the live search Playwright spec through `playwright.live-search.config.ts`
|
||||
|
||||
Prerequisites:
|
||||
- `docker compose`
|
||||
- `dotnet`
|
||||
- Playwright browsers installed locally
|
||||
|
||||
Optional environment overrides:
|
||||
- `PLAYWRIGHT_LIVE_SEARCH_SKIP_DOCKER=1` if the dedicated AdvisoryAI test database is already running
|
||||
- `LIVE_ADVISORYAI_SEARCH_BASE_URL` to target a non-default local AdvisoryAI host
|
||||
- `AdvisoryAI__KnowledgeSearch__ConnectionString` to override the dedicated test database connection string
|
||||
|
||||
## Running end-to-end tests
|
||||
|
||||
|
||||
Reference in New Issue
Block a user