fix: static data in mocks (#1574)

This commit is contained in:
G r e y
2022-05-19 11:36:14 -04:00
committed by GitHub
parent 3f770e1111
commit e0165c5d89
4 changed files with 6 additions and 6 deletions

View File

@ -84,7 +84,7 @@ export const TemplatesPageView: React.FC<TemplatesPageViewProps> = (props) => {
<TableCell>
{template.workspace_owner_count} developer{template.workspace_owner_count !== 1 && "s"}
</TableCell>
<TableCell>{dayjs().to(dayjs(template.updated_at))}</TableCell>
<TableCell data-chromatic="ignore">{dayjs().to(dayjs(template.updated_at))}</TableCell>
</TableRow>
)
})}

View File

@ -92,7 +92,7 @@ export const TemplatesPageView: React.FC<TemplatesPageViewProps> = (props) => {
<TableCell>{Language.developerCount(template.workspace_owner_count)}</TableCell>
<TableCell>{dayjs().to(dayjs(template.updated_at))}</TableCell>
<TableCell data-chromatic="ignore">{dayjs().to(dayjs(template.updated_at))}</TableCell>
</TableRow>
))}
</TableBody>

View File

@ -92,7 +92,7 @@ export const WorkspacesPageView: React.FC<WorkspacesPageViewProps> = (props) =>
)}
</TableCell>
<TableCell>
<span style={{ color: theme.palette.text.secondary }}>
<span data-chromatic="ignore" style={{ color: theme.palette.text.secondary }}>
{dayjs().to(dayjs(workspace.latest_build.created_at))}
</span>
</TableCell>

View File

@ -80,8 +80,8 @@ export const MockRunningProvisionerJob = { ...MockProvisionerJob, status: "runni
export const MockTemplate: TypesGen.Template = {
id: "test-template",
created_at: new Date().toString(),
updated_at: new Date().toString(),
created_at: "2022-05-17T17:39:01.382927298Z",
updated_at: "2022-05-18T17:39:01.382927298Z",
organization_id: MockOrganization.id,
name: "Test Template",
provisioner: MockProvisioner.id,
@ -111,7 +111,7 @@ export const MockWorkspaceAutostopEnabled: TypesGen.UpdateWorkspaceAutostartRequ
export const MockWorkspaceBuild: TypesGen.WorkspaceBuild = {
build_number: 1,
created_at: new Date().toString(),
created_at: "2022-05-17T17:39:01.382927298Z",
id: "1",
initiator_id: "",
job: MockProvisionerJob,