fix: resolve multiple API and e2e test bugs

- Health endpoint returns "healthy" instead of "ok" for consistency
- MAX_USERS now configurable via env var (default 5)
- People API returns team names instead of UUIDs in register/list
- PUT user update accepts team names (name-first lookup, fallback to ID)
- Login rate limit follows global rate limit when RATE_LIMIT_PER_MIN > 1000
- Strip-metadata preserves original format encoding instead of always PNG
- Fix e2e tests: rotate/crop/border button selectors match actual UI
- Fix e2e tests: create Engineering/Design teams in people test setup
- Fix e2e tests: people UI uses select for team field, not text input
- Update visual regression baseline for tablet home page
This commit is contained in:
Siddharth Kumar Sah
2026-04-04 17:44:51 +08:00
parent 9f0354388f
commit 9d621734c3
11 changed files with 110 additions and 48 deletions
+9 -13
View File
@@ -55,23 +55,19 @@ test.describe("Full user session", () => {
await uploadTestImage(page);
await expect(page.getByText("Upload from computer")).not.toBeVisible();
// Click 90-degree right rotation preset (the CW icon button)
await page
.locator("button")
.filter({ hasText: /90.*right|right.*90|cw/i })
.first()
.click()
.catch(async () => {
// Fallback: click the second quick-rotate button (CW)
await page.locator("aside button, [class*='panel'] button").nth(1).click();
});
// Click the clockwise 90° rotation button and wait for state
await page.getByTestId("rotate-right").click();
await expect(page.locator("input[inputmode='numeric']")).toHaveValue("90", { timeout: 2000 });
// Click the process button (button text is "Rotate")
await page.getByRole("button", { name: "Rotate" }).click();
// Click the process button (button text is "Apply")
await page.getByTestId("rotate-submit").click();
await waitForProcessing(page);
// Verify result
const downloadBtn = page.getByRole("link", { name: /download/i }).first();
const downloadBtn = page
.getByRole("button", { name: /^download$/i })
.or(page.getByRole("link", { name: /download/i }))
.first();
await expect(downloadBtn).toBeVisible({ timeout: 15_000 });
const downloadPromise = page.waitForEvent("download");