Skip to content

Fix deterministic caring-contact time test - #2465

Merged
BigSimmo merged 1 commit into
mainfrom
codex/fix-contact-time-test-20260830
Aug 30, 2026
Merged

Fix deterministic caring-contact time test#2465
BigSimmo merged 1 commit into
mainfrom
codex/fix-contact-time-test-20260830

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace character-by-character entry only in the three repeated controlled input[type="time"] paths with the completed browser change event.
  • Keep the baseline repair test-only and confined to tests/caring-contacts-contact-time-adjustment.dom.test.tsx.
  • Preserve PR Finish the PsychSift rename across the repository's living surfaces #2461's PsychSift rename diff unchanged.

Verification

  • npm run verify:pr-local — not run locally because the one-file test-only scope is covered by the focused DOM suite and the authoritative hosted Unit coverage job will run on this PR.
  • GATE_RECEIPTS=off npx vitest run tests/caring-contacts-contact-time-adjustment.dom.test.tsx --reporter=dot — 17 passed, repeated three consecutive times.
  • npx prettier --check tests/caring-contacts-contact-time-adjustment.dom.test.tsx — all matched files use Prettier code style.
  • npx eslint tests/caring-contacts-contact-time-adjustment.dom.test.tsx — clean.
  • UI verification not run: no product, styling, routing, or browser behaviour changed.
  • Release verification not run: no release-confidence claim is made.

Risk and rollout

  • Risk: low; test-only event simulation correction.
  • Rollback: revert the single commit.
  • Provider or production effects: GitHub CI only. No application runtime, data, Supabase, Railway configuration, or RAG behaviour changes.
  • RAG impact: none.

Clinical Governance Preflight

Not applicable: no clinical behaviour, content, retrieval, privacy, ingestion, source rendering, or production environment code changed.

Notes

The current-main reproduction showed the failing time field was "" after userEvent.type; the production component itself has no system-clock read. This follows the repository's existing controlled date-input precedent: jsdom sanitises partial date/time values, while the browser delivers one completed change from the native control.


Note

Low Risk
Test-only event simulation in one DOM test file; no runtime, auth, or data-path changes.

Overview
Fixes non-deterministic failures in tests/caring-contacts-contact-time-adjustment.dom.test.tsx when tests set input[type="time"] to completed values like 15:45 or 18:00.

In three scenarios (second move on the same screen, version-refusal after a first move, and the outside-window boundary at 18:00), userEvent.clear + userEvent.type is replaced with fireEvent.change so jsdom receives a single completed value instead of partial keystrokes that the time control sanitises to "". The first move in each flow still uses userEvent where it already passed; only the repeated controlled-time paths change. A short comment documents the jsdom vs browser behaviour for the 18:00 case.

Imports fireEvent from Testing Library. No application or production code is touched.

Reviewed by Cursor Bugbot for commit 7912604. Configure here.

@supabase

supabase Bot commented Aug 30, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c217844e-8e22-4600-8f59-4cef2036f743


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-30T18:57:29.669632Z 7912604 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor

cursor Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_81b19768-4247-47da-80a8-c5ec4cbc9238)

@BigSimmo
BigSimmo merged commit c51286a into main Aug 30, 2026
30 of 34 checks passed
@BigSimmo
BigSimmo deleted the codex/fix-contact-time-test-20260830 branch August 30, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant