fix: update e2e tests for current UI, increase timeouts for CPU environments, and fix auth bypass bug

- Fix SKIP_MUST_CHANGE_PASSWORD not affecting login/session API responses,
  causing frontend redirect even when the env var was set after user creation
- Increase Docker Playwright timeouts (test: 600s, expect: 60s, AI processing: 300s)
  to support CPU-only self-hosted environments
- Increase default rate limit from 100 to 50000 req/min for self-hosted deployments
- Fix OCR tests: use filechooser pattern (Dropzone has no static file input),
  correct enhance checkbox default, rewrite for actual fixture behavior
- Fix remove-bg tests: update quality labels (Balanced→HD, Best→Max)
- Fix noise-removal skip guard: use waitFor() instead of instant isVisible()
- Fix automate pipeline save test: clean up stale E2E pipelines before assertion
This commit is contained in:
ashim-hq
2026-04-20 15:03:56 +08:00
parent e20418c3e1
commit ac5fdfb841
9 changed files with 68 additions and 67 deletions
+19
View File
@@ -183,6 +183,25 @@ test.describe("Automate Page", () => {
});
test("can save a pipeline and see it as a chip", async ({ loggedInPage: page }) => {
// Clean up stale E2E pipelines from previous runs to avoid overflow hiding new ones
const apiUrl = process.env.API_URL || "http://localhost:13490";
const loginRes = await fetch(`${apiUrl}/api/auth/login`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ username: "admin", password: "admin" }),
});
const { token } = await loginRes.json();
const listRes = await fetch(`${apiUrl}/api/v1/pipeline/list`, {
headers: { Authorization: `Bearer ${token}` },
});
const { pipelines } = await listRes.json();
for (const p of pipelines.filter((p: { name: string }) => p.name.startsWith("E2E Pipeline"))) {
await fetch(`${apiUrl}/api/v1/pipeline/${p.id}`, {
method: "DELETE",
headers: { Authorization: `Bearer ${token}` },
});
}
await gotoAutomate(page);
await addToolStep(page, "Resize", 1);
await addToolStep(page, "Compress", 2);