mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 06:06:10 +00:00
test(encounters): the Phase 2 surfaces against real Postgres, and end to end
Three properties here cannot be answered by a mocked client, and each has a shape that would pass a weaker assertion while being wrong: - filing a visit against a due checkup twice satisfies it ONCE. Phrased as "the second call returned 200" it proves nothing, so the assertion is that lastSatisfiedAt did not move — and the instant is captured once, because two calls milliseconds apart are two different filings and the forward-only guard correctly advances on the later one. - a lab commit writes one link PER RESULT ROW. A test that asserted "there is a link" would pass on one link for a three-marker panel. - the visit list's condition filter runs in SQL. With one visit in the account a filter and no filter return the same list, so there are always two. The bulk arm gets per-entry tolerance over a hundred documents, one unknown id reported as one failed row with the rest filed, and a foreign visit refusing the whole batch before anything is written. The e2e spec proves the incidental-linking promise once, addressing stable data-slot attributes rather than viewport text: a visit saves with a date and nothing else, and a document dated inside the window offers that visit, pre-selected because there is exactly one, and files itself against it.
This commit is contained in:
1 parent
4d2f706dad
commit
bdfea7dd85
3 files changed
+572
-2
No files matched your search
@@ -59,10 +59,10 @@ export default function CheckupsPage() {
|
||||
<PullToRefreshIndicator {...pull} />
|
||||
<Tabs value={view} onValueChange={setView}>
|
||||
<TabsList aria-label={t("checkups.viewSwitchLabel")}>
|
||||
<TabsTrigger value="vorsorge" data-slot="checkups-tab-vorsorge">
|
||||
<TabsTrigger value="vorsorge" data-testid="checkups-tab-vorsorge">
|
||||
{t("checkups.tabVorsorge")}
|
||||
</TabsTrigger>
|
||||
<TabsTrigger value="visits" data-slot="checkups-tab-visits">
|
||||
<TabsTrigger value="visits" data-testid="checkups-tab-visits">
|
||||
{t("checkups.tabVisits")}
|
||||
</TabsTrigger>
|
||||
</TabsList>
|
||||
|
||||
Reference in new issue
Block a user