From c281ba9d4b6359dad9b7de6b9d8a367f99b52c5c Mon Sep 17 00:00:00 2001 From: Jeff Puzzo Date: Mon, 6 May 2024 10:27:44 -0400 Subject: [PATCH] Fix unit test date - Artifacts table --- .../artifacts/__tests__/ArtifactsTable.spec.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/pipelines/global/experiments/artifacts/__tests__/ArtifactsTable.spec.tsx b/frontend/src/pages/pipelines/global/experiments/artifacts/__tests__/ArtifactsTable.spec.tsx index f20b717a70..a7bb339b89 100644 --- a/frontend/src/pages/pipelines/global/experiments/artifacts/__tests__/ArtifactsTable.spec.tsx +++ b/frontend/src/pages/pipelines/global/experiments/artifacts/__tests__/ArtifactsTable.spec.tsx @@ -79,7 +79,7 @@ describe('ArtifactsTable', () => { ], ], state: 2, - createTimeSinceEpoch: 1711113121829, + createTimeSinceEpoch: new Date(), })), }, { @@ -103,7 +103,7 @@ describe('ArtifactsTable', () => { ], ], state: 2, - createTimeSinceEpoch: 1611399342384, + createTimeSinceEpoch: new Date(), })), }, ] as unknown as Artifact[], @@ -135,7 +135,7 @@ describe('ArtifactsTable', () => { expect(firstRow).toHaveTextContent('1'); expect(firstRow).toHaveTextContent('system.Artifact'); expect(firstRow).toHaveTextContent('https://test-artifact!-aiplatform.googleapis.com/v1/12.15'); - expect(firstRow).toHaveTextContent('1 month ago'); + expect(firstRow).toHaveTextContent('Just now'); const secondRow = screen.getByRole('row', { name: /iris_dataset/ }); expect(secondRow).toHaveTextContent('iris_dataset'); @@ -144,6 +144,6 @@ describe('ArtifactsTable', () => { expect(secondRow).toHaveTextContent( 'https://test2-artifact!-aiplatform.googleapis.com/v1/12.10', ); - expect(secondRow).toHaveTextContent('23 Jan 2021'); + expect(secondRow).toHaveTextContent('Just now'); }); });