mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-04 22:32:12 +03:00
fix(e2e): correct API endpoints and response format assertions
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user