From f0521cfa3c67b3ebca4b3e2042547dc635ccec85 Mon Sep 17 00:00:00 2001 From: Jake Howell Date: Wed, 8 Apr 2026 00:17:06 +1000 Subject: [PATCH] fix: resolve `` storybook flake (#24084) This pull-request ensures we have a stable test where the content doesn't change every time we have a new storybook artifact by setting it to a consistent date. Closes https://github.com/coder/internal/issues/1454 --- site/src/modules/resources/AgentRow.stories.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/site/src/modules/resources/AgentRow.stories.tsx b/site/src/modules/resources/AgentRow.stories.tsx index 995e99723c..39697f330e 100644 --- a/site/src/modules/resources/AgentRow.stories.tsx +++ b/site/src/modules/resources/AgentRow.stories.tsx @@ -76,6 +76,8 @@ const defaultAgentMetadata = [ }, ]; +const fixedLogTimestamp = "2021-05-05T00:00:00.000Z"; + const logs = [ "\x1b[91mCloning Git repository...", "\x1b[2;37;41mStarting Docker Daemon...", @@ -87,7 +89,7 @@ const logs = [ level: "info", output: line, source_id: M.MockWorkspaceAgentLogSource.id, - created_at: new Date().toISOString(), + created_at: fixedLogTimestamp, })); const installScriptLogSource: TypesGen.WorkspaceAgentLogSource = { @@ -102,21 +104,21 @@ const tabbedLogs = [ level: "info", output: "startup: preparing workspace", source_id: M.MockWorkspaceAgentLogSource.id, - created_at: new Date().toISOString(), + created_at: fixedLogTimestamp, }, { id: 101, level: "info", output: "install: pnpm install", source_id: installScriptLogSource.id, - created_at: new Date().toISOString(), + created_at: fixedLogTimestamp, }, { id: 102, level: "info", output: "install: setup complete", source_id: installScriptLogSource.id, - created_at: new Date().toISOString(), + created_at: fixedLogTimestamp, }, ]; @@ -153,7 +155,7 @@ const overflowLogs = overflowLogSources.map((source, index) => ({ level: "info", output: `${source.display_name}: line`, source_id: source.id, - created_at: new Date().toISOString(), + created_at: fixedLogTimestamp, })); const meta: Meta = {