fix(e2e): correct API endpoints and response format assertions

This commit is contained in:
diegosouzapw
2026-02-16 17:08:17 -03:00
parent 23ee13818a
commit d3a4f6be98

View File

@@ -1,8 +1,8 @@
import { test, expect } from "@playwright/test";
test.describe("API Health Checks", () => {
test("GET /api/health returns OK", async ({ request }) => {
const res = await request.get("/api/health");
test("GET /api/monitoring/health returns OK", async ({ request }) => {
const res = await request.get("/api/monitoring/health");
expect(res.ok()).toBeTruthy();
const body = await res.json();
expect(body).toHaveProperty("status");
@@ -20,6 +20,7 @@ test.describe("API Health Checks", () => {
const res = await request.get("/api/providers");
expect(res.ok()).toBeTruthy();
const body = await res.json();
expect(Array.isArray(body)).toBe(true);
expect(body).toHaveProperty("connections");
expect(Array.isArray(body.connections)).toBe(true);
});
});