Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d6f2559

Browse files
greyscaledkylecarbs
authored andcommitted
fix: static data in mocks (#1574)
1 parent 1f516e8 commit d6f2559

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

site/src/pages/TemplatePage/TemplatePageView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const TemplatesPageView: React.FC<TemplatesPageViewProps> = (props) => {
8484
<TableCell>
8585
{template.workspace_owner_count} developer{template.workspace_owner_count !== 1 && "s"}
8686
</TableCell>
87-
<TableCell>{dayjs().to(dayjs(template.updated_at))}</TableCell>
87+
<TableCell data-chromatic="ignore">{dayjs().to(dayjs(template.updated_at))}</TableCell>
8888
</TableRow>
8989
)
9090
})}

site/src/pages/TemplatesPage/TemplatesPageView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export const TemplatesPageView: React.FC<TemplatesPageViewProps> = (props) => {
9292

9393
<TableCell>{Language.developerCount(template.workspace_owner_count)}</TableCell>
9494

95-
<TableCell>{dayjs().to(dayjs(template.updated_at))}</TableCell>
95+
<TableCell data-chromatic="ignore">{dayjs().to(dayjs(template.updated_at))}</TableCell>
9696
</TableRow>
9797
))}
9898
</TableBody>

site/src/pages/WorkspacesPage/WorkspacesPageView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export const WorkspacesPageView: React.FC<WorkspacesPageViewProps> = (props) =>
9292
)}
9393
</TableCell>
9494
<TableCell>
95-
<span style={{ color: theme.palette.text.secondary }}>
95+
<span data-chromatic="ignore" style={{ color: theme.palette.text.secondary }}>
9696
{dayjs().to(dayjs(workspace.latest_build.created_at))}
9797
</span>
9898
</TableCell>

site/src/testHelpers/entities.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ export const MockRunningProvisionerJob = { ...MockProvisionerJob, status: "runni
8080

8181
export const MockTemplate: TypesGen.Template = {
8282
id: "test-template",
83-
created_at: new Date().toString(),
84-
updated_at: new Date().toString(),
83+
created_at: "2022-05-17T17:39:01.382927298Z",
84+
updated_at: "2022-05-18T17:39:01.382927298Z",
8585
organization_id: MockOrganization.id,
8686
name: "Test Template",
8787
provisioner: MockProvisioner.id,
@@ -111,7 +111,7 @@ export const MockWorkspaceAutostopEnabled: TypesGen.UpdateWorkspaceAutostartRequ
111111

112112
export const MockWorkspaceBuild: TypesGen.WorkspaceBuild = {
113113
build_number: 1,
114-
created_at: new Date().toString(),
114+
created_at: "2022-05-17T17:39:01.382927298Z",
115115
id: "1",
116116
initiator_id: "",
117117
job: MockProvisionerJob,

0 commit comments

Comments
 (0)