mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
test: expand E2E-Docker coverage to all 47 tools with auth-failure tests
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user