Remove duplicate server detail metrics
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { configDiffViewFromPreview } from "./ServerDetailPage";
|
||||
import serversPageSource from "./ServersPage.tsx?raw";
|
||||
import serverManagementTerminalSource from "../components/ServerManagementTerminalDrawer.tsx?raw";
|
||||
import serverDetailPageSource from "./ServerDetailPage.tsx?raw";
|
||||
import type { ServerConfigDiffPreviewResponse } from "../api/types";
|
||||
@@ -22,6 +23,15 @@ const preview: ServerConfigDiffPreviewResponse = {
|
||||
};
|
||||
|
||||
describe("ServerDetailPage config write approval", () => {
|
||||
it("keeps server overview metrics on the server list instead of the detail header", () => {
|
||||
expect(serverDetailPageSource).not.toContain("listServerMetrics");
|
||||
expect(serverDetailPageSource).not.toContain("server-detail-stat-strip");
|
||||
expect(serverDetailPageSource).not.toContain("server-detail-meter-strip");
|
||||
expect(serverDetailPageSource).not.toContain("<UsageMeter");
|
||||
expect(serversPageSource).toContain("listServerMetrics");
|
||||
expect(serversPageSource).toContain("<UsageMeter");
|
||||
});
|
||||
|
||||
it("maps platform diff preview responses into the display diff without losing approval metadata", () => {
|
||||
const view = configDiffViewFromPreview(preview);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user