test: expand E2E-Docker coverage to all 47 tools with auth-failure tests

This commit is contained in:
SnapOtter
2026-05-01 02:51:42 +08:00
parent 710b580cee
commit e3c5279b92
11 changed files with 368 additions and 4 deletions
+29
View File
@@ -758,3 +758,32 @@ test.describe("QR Read", () => {
}
});
});
// ─── Auth Failure ──────────────────────────────────────────────────
test.describe("Auth failure", () => {
test("info without token returns 401", async ({ request }) => {
const res = await request.post("/api/v1/tools/info", {
multipart: {
file: { name: "test.png", mimeType: "image/png", buffer: PNG_200x150 },
},
});
expect(res.status()).toBe(401);
});
test("qr-generate without token returns 401", async ({ request }) => {
const res = await request.post("/api/v1/tools/qr-generate", {
data: { text: "https://snapotter.app", size: 512 },
});
expect(res.status()).toBe(401);
});
test("color-palette without token returns 401", async ({ request }) => {
const res = await request.post("/api/v1/tools/color-palette", {
multipart: {
file: { name: "test.png", mimeType: "image/png", buffer: PNG_200x150 },
},
});
expect(res.status()).toBe(401);
});
});