From b829833344eb33caa99e8a8b2442985f189154f0 Mon Sep 17 00:00:00 2001 From: Stephen Glass Date: Wed, 18 Sep 2024 22:10:17 -0400 Subject: [PATCH] update created at column test Signed-off-by: Stephen Glass --- .../ListTasksPage/columns/CreatedAtColumn.test.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/scaffolder/src/components/ListTasksPage/columns/CreatedAtColumn.test.tsx b/plugins/scaffolder/src/components/ListTasksPage/columns/CreatedAtColumn.test.tsx index 9cd1353ae1..92f1c4560c 100644 --- a/plugins/scaffolder/src/components/ListTasksPage/columns/CreatedAtColumn.test.tsx +++ b/plugins/scaffolder/src/components/ListTasksPage/columns/CreatedAtColumn.test.tsx @@ -23,12 +23,16 @@ import { DateTime } from 'luxon'; describe('', () => { it('should render the column with the time', async () => { const props = { - createdAt: DateTime.now().toISO()!, + createdAt: DateTime.now().toISO(), }; + const formattedTime = DateTime.fromISO(props.createdAt).toLocaleString( + DateTime.DATETIME_SHORT_WITH_SECONDS, + ); + const { getByText } = await renderInTestApp(); - const text = getByText('0 seconds ago'); + const text = getByText(formattedTime); expect(text).toBeDefined(); }); });