Compare commits
1 commit
189df73b4c
...
a04d796167
| Author | SHA1 | Date | |
|---|---|---|---|
| a04d796167 |
1 changed files with 2 additions and 13 deletions
|
|
@ -52,19 +52,8 @@ describe("Admin monitoring", () => {
|
||||||
cy.intercept("GET", "**/admin/auth/me", { statusCode: 200, body: adminBody });
|
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", () => {
|
it("renders one card per service with its status and details", () => {
|
||||||
cy.intercept(monitoringApi, {
|
cy.intercept("GET", "http://localhost:3000/admin/monitoring", {
|
||||||
statusCode: 200,
|
statusCode: 200,
|
||||||
body: monitoringFixture(),
|
body: monitoringFixture(),
|
||||||
}).as("getMonitoring");
|
}).as("getMonitoring");
|
||||||
|
|
@ -85,7 +74,7 @@ describe("Admin monitoring", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("shows an error state when the request fails", () => {
|
it("shows an error state when the request fails", () => {
|
||||||
cy.intercept(monitoringApi, {
|
cy.intercept("GET", "http://localhost:3000/admin/monitoring", {
|
||||||
statusCode: 500,
|
statusCode: 500,
|
||||||
body: { code: 5000, message: "x" },
|
body: { code: 5000, message: "x" },
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue