ci(web): Phase P6 — vite build in PR CI + headless E2E gate on trunk publishes (#1445)
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
- ci.yml: build step (vite build via turbo) runs on every PR pipeline after test - publish.yml: e2e step boots the gateway from built dist (HOME/cwd-isolated throwaway PGlite) and runs the Playwright suite headless inside mcr.microsoft.com/playwright:v1.58.2-noble against the SPA bundle served exactly as production serves it; both kaniko publishes now gate on e2e - serve-spa.ts: strip query strings before asset resolution; immutable cache-control for hashed assets (onSend hook); e2e spec covers both - e2e suite hardened: globalSetup seeds admin+member through real bootstrap/better-auth APIs (Origin header for CSRF), loginAs waits for the post-login redirect (fixes 27-skipped race), stale #152-era assertions rewritten to the current command-driven UI, strict-mode violations fixed with level-1 heading queries and .or() auto-retrying locators - verify-release mirrors the new build stage; playwright artifacts ignored
This commit is contained in:
@@ -31,15 +31,11 @@ test.describe('Admin page — admin user', () => {
|
||||
await page.goto('/admin');
|
||||
await page.getByRole('button', { name: /system health/i }).click();
|
||||
// Health cards or loading indicator should appear
|
||||
const hasLoading = await page
|
||||
const loadingOrCard = page
|
||||
.getByText(/loading health/i)
|
||||
.isVisible()
|
||||
.catch(() => false);
|
||||
const hasCard = await page
|
||||
.getByText(/database/i)
|
||||
.isVisible()
|
||||
.catch(() => false);
|
||||
expect(hasLoading || hasCard).toBe(true);
|
||||
.or(page.getByText(/database/i))
|
||||
.first();
|
||||
await expect(loadingOrCard).toBeVisible({ timeout: 10_000 });
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user