refactor(admin): fusionne apps/admin-web dans apps/web sous /admin/* #18

Merged
kyuno merged 3 commits from feat/merge-admin-into-web into main 2026-08-29 21:15:44 +02:00
Showing only changes of commit 1a28d67218 - Show all commits

View file

@ -52,8 +52,19 @@ describe("Admin monitoring", () => {
cy.intercept("GET", "**/admin/auth/me", { statusCode: 200, body: adminBody });
});
// The page route `/admin/monitoring` and the API path `GET /admin/monitoring`
// are identical — a plain `**/admin/monitoring` glob would also match the
// `cy.visit()` document request (and whether that's same-origin or not
// depends on `VITE_API_URL`, which isn't set in CI). `resourceType: "fetch"`
// pins the intercept to the `AdminApiClient` XHR only.
const monitoringApi = {
method: "GET",
url: "**/admin/monitoring",
resourceType: "fetch",
} as const;
it("renders one card per service with its status and details", () => {
cy.intercept("GET", "http://localhost:3000/admin/monitoring", {
cy.intercept(monitoringApi, {
statusCode: 200,
body: monitoringFixture(),
}).as("getMonitoring");
@ -74,7 +85,7 @@ describe("Admin monitoring", () => {
});
it("shows an error state when the request fails", () => {
cy.intercept("GET", "http://localhost:3000/admin/monitoring", {
cy.intercept(monitoringApi, {
statusCode: 500,
body: { code: 5000, message: "x" },
});