prop/test/microwaveprop/radio
Graham McIntire 2365c19321
fix(radio): coerce qso_timestamp string in normalize_proposed
The /contacts/:id edit form pre-fills qso_timestamp via
`Calendar.strftime(ts, "%Y-%m-%d %H:%M")` and submits whatever the
user typed back unchanged. Two failure modes resulted:

1. `diff_against_contact/2` compared that string against the stored
   `%DateTime{}`, never matched, and treated every untouched submit
   as a modification.
2. `build_contact_changes/2` then ran `DateTime.from_iso8601/1` on
   the space-separated, no-seconds, no-Z form and crashed with
   `MatchError` on `{:error, :invalid_format}` — direct owner/admin
   submits raised instead of saving.

Adds `normalize_timestamp_field/2` to `normalize_proposed/1` that
parses both the form's `"YYYY-MM-DD HH:MM[:SS]"` and the strict
`"YYYY-MM-DDTHH:MM:SSZ"` shapes into a UTC `%DateTime{}` (with
`NaiveDateTime.from_iso8601` doing the heavy lifting after a small
seconds-padding pass). Empty strings drop the field; unparseable
input drops it too so a typo becomes "no changes" rather than a
500.
2026-04-25 10:03:26 -05:00
..
adif_import_test.exs feat(adif): carry NOTES / COMMENT into contact notes 2026-04-23 11:05:39 -05:00
band_resolver_property_test.exs test(property): add property tests for parsing + domain conversions 2026-04-21 13:57:47 -05:00
band_resolver_test.exs Rename 9cm band 3456 → 3400 2026-04-16 12:40:38 -05:00
callsign_client_test.exs test: cover geo, qrz record, callsign client 2026-04-16 14:09:44 -05:00
contact_edit_test.exs fix(radio): coerce qso_timestamp string in normalize_proposed 2026-04-25 10:03:26 -05:00
contact_submission_test.exs test: broaden coverage across parsers, schemas, and pure helpers 2026-04-23 13:56:29 -05:00
contact_test.exs feat(contacts): antenna height fields feed terrain analysis 2026-04-18 15:48:14 -05:00
csv_import_test.exs feat(contacts): add free-form notes field 2026-04-23 11:02:27 -05:00
edit_notifier_test.exs test: cover radio/edit_notifier 2026-04-16 14:58:55 -05:00
enrichment_status_test.exs Add Tier 1 test coverage: EnrichmentStatus, Markdown, health, RemoteIp, Maidenhead 2026-04-06 10:15:38 -05:00
import_matcher_test.exs CSV/ADIF import: upsert existing contacts on grid/mode refinement 2026-04-16 10:57:37 -05:00
import_run_test.exs feat(import): async CSV import with progress-tracking schema 2026-04-17 09:31:22 -05:00
maidenhead_property_test.exs test(property): add property tests for parsing + domain conversions 2026-04-21 13:57:47 -05:00
maidenhead_test.exs Add /beacons CRUD and /users admin page 2026-04-08 12:01:45 -05:00