diff --git a/apps/lrauv-dash2/components/CommsSection.test.tsx b/apps/lrauv-dash2/components/CommsSection.test.tsx index 33a6f495..11fcb9a6 100644 --- a/apps/lrauv-dash2/components/CommsSection.test.tsx +++ b/apps/lrauv-dash2/components/CommsSection.test.tsx @@ -146,4 +146,21 @@ describe('CommsSection', () => { 'text-indigo-600' ) }) + + test('should display timestamps with seconds (H:mm:ss)', async () => { + render( + + + + ) + await waitFor(() => { + screen.getByText(/One More/i) + }) + const timeElements = screen.getAllByLabelText('time') + expect(timeElements.length).toBeGreaterThan(0) + const timeFormat = /^\d{1,2}:\d{2}:\d{2}$/ + timeElements.forEach((el) => { + expect(el.textContent).toMatch(timeFormat) + }) + }) }) diff --git a/apps/lrauv-dash2/components/CommsSection.tsx b/apps/lrauv-dash2/components/CommsSection.tsx index f66c4f24..d82bcd07 100644 --- a/apps/lrauv-dash2/components/CommsSection.tsx +++ b/apps/lrauv-dash2/components/CommsSection.tsx @@ -88,7 +88,7 @@ const CommsSection: React.FC = ({ const day = today ? 'Today' : DateTime.fromISO(item?.commsIsoTime ?? '').toFormat('MMM d yyyy') - const time = DateTime.fromISO(item?.commsIsoTime ?? '').toFormat('H:mm') + const time = DateTime.fromISO(item?.commsIsoTime ?? '').toFormat('H:mm:ss') return item ? (