Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
test(frontend): which line got the instant, not how many did
zchpeter2522b54d0c3b
diff --git a/frontend/src/components/task-run-log/model.test.ts b/frontend/src/components/task-run-log/model.test.tsindex 90fbf61a99..761ea57058 100644--- a/frontend/src/components/task-run-log/model.test.ts+++ b/frontend/src/components/task-run-log/model.test.ts@@ -256,12 +256,19 @@ describe("task-run-log model", () => {{ getSectionLabel: (type) => String(type) });- const timestamps = sections- .flatMap((section) => section.items)- .map((item) => item.timeMs);- expect(timestamps).toHaveLength(2);- expect(timestamps.filter((ms) => ms === undefined)).toHaveLength(1);- expect(timestamps.filter((ms) => typeof ms === "number")).toHaveLength(1);+ // Which line got which instant, not how many of each: one undefined and+ // one number is also what swapping them produces.+ // The column a reader sees, paired with the instant behind it: both come+ // from one entry, and one undefined plus one number is also what swapping+ // them produces.+ expect(+ sections+ .flatMap((section) => section.items)+ .map((item) => [item.time, item.timeMs])+ ).toEqual([+ ["--:--:--.---", undefined],+ ["08:00:10.000", 10_000],+ ]);});test("renders gh-ost migration as a timed section", () => {diff --git a/frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.test.tsx b/frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.test.tsxindex 9d6e20c7d8..eeb99f8100 100644--- a/frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.test.tsx+++ b/frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.test.tsx@@ -83,9 +83,7 @@ describe("DatabaseChangelogTable", () => {render();// A row in a list orients the reader; the changelog's own page testifies.- expect(- shownTimestampModes(container)- ).toEqual(["compact"]);+ expect(shownTimestampModes(container)).toEqual(["compact"]);unmount();});diff --git a/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskRunHistorySheet.test.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskRunHistorySheet.test.tsxindex eafaf7b641..c0849d6063 100644--- a/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskRunHistorySheet.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskRunHistorySheet.test.tsx@@ -5,7 +5,10 @@ import type { ReactElement, ReactNode } from "react";import { act } from "react";import { createRoot } from "react-dom/client";import { describe, expect, test, vi } from "vitest";-import { shownTimestampInstants, shownTimestampModes } from "@/test-utils/humanizeTs";+import {+ shownTimestampInstants,+ shownTimestampModes,+} from "@/test-utils/humanizeTs";import {TaskRun_Status,TaskRunSchema,@@ -57,8 +60,8 @@ vi.mock("@/components/HumanizeTs", async () => ({const taskName = "projects/p1/rollouts/r1/stages/s1/tasks/t1";const CREATED_AT_MS = 1_000_000;-// Runs are a step apart, so "newest first" is a claim about order that the-// fixture can actually be wrong about.+// Older runs step back from it, so the newest run is the named instant and+// no assertion has to re-derive the fixture's arithmetic.const STEP_MS = 60_000;const makeTaskRun = (@@ -76,7 +79,7 @@ const makeTaskRuns = (count: number) =>// Newest first, matching the component contract.Array.from({ length: count }, (_, index) =>makeTaskRun({- createTime: timestampFromMs(CREATED_AT_MS + STEP_MS * (count - index)),+ createTime: timestampFromMs(CREATED_AT_MS - STEP_MS * index),name: `${taskName}/taskRuns/${count - index}`,}));@@ -116,9 +119,7 @@ describe("DeployTaskRunHistorySheet", () => {// from the wrong one reads as plausibly as the right one.const { container, cleanup } = renderSheet(makeTaskRuns(1));expect(shownTimestampModes(container)).toEqual(["compact"]);- expect(shownTimestampInstants(container)).toEqual([- String(CREATED_AT_MS + STEP_MS),- ]);+ expect(shownTimestampInstants(container)).toEqual([String(CREATED_AT_MS)]);cleanup();});diff --git a/frontend/src/routes/project/plan-detail/components/review/ReviewActivityTimeline.test.tsx b/frontend/src/routes/project/plan-detail/components/review/ReviewActivityTimeline.test.tsxindex 97731ecc68..260a709716 100644--- a/frontend/src/routes/project/plan-detail/components/review/ReviewActivityTimeline.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/review/ReviewActivityTimeline.test.tsx@@ -215,9 +215,7 @@ describe("ReviewActivityTimeline", () => {);});- expect(- shownTimestampModes(container)- ).toEqual(["queue"]);+ expect(shownTimestampModes(container)).toEqual(["queue"]);act(() => root.unmount());});