Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions apps/lrauv-dash2/components/CommsSection.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,21 @@ describe('CommsSection', () => {
'text-indigo-600'
)
})

test('should display timestamps with seconds (H:mm:ss)', async () => {
render(
<MockProviders queryClient={new QueryClient()}>
<CommsSection vehicleName="makai" from="" />
</MockProviders>
)
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)
})
})
})
2 changes: 1 addition & 1 deletion apps/lrauv-dash2/components/CommsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const CommsSection: React.FC<CommsSectionProps> = ({
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')

Comment on lines 88 to 92
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CommsSection has existing component tests, but none assert the rendered timestamp format. Since this change is specifically about showing seconds, please add/extend a test to verify the time text includes seconds (e.g., matches /\d{1,2}:\d{2}:\d{2}/) for a known mocked commsIsoTime value, so regressions don’t slip in unnoticed.

Copilot uses AI. Check for mistakes.
return item ? (
<CommsCell
Expand Down