mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
Make the setup flow pass its own journeys and axe sweep
Run against the standalone build, the four journeys and the axe sweep surfaced five things the unit tier could not see. The completion route derives only once every question is settled, and Q6 stays pending for somebody with no unit-bearing area — the confirm screen now passes the questions the flow never showed before it completes. The dashboard seed matched a JSON null where the unset column is a SQL NULL, so it never landed; the retired step route carried the same filter. The auth shell's onboarding branch matched only the front door, so every question screen rendered inside the full app chrome with the sidebar. Inline links relied on colour alone, the step list sat outside any landmark, and the baseline form brought a second h1 onto the confirm screen. The two sweeps run serially, since each drives one account through the API. The integration file gains the seed case that would have caught the null filter.
This commit is contained in:
1 parent
e98457151d
commit
d91a8dfebe
11 files changed
+137
-49
No files matched your search
@@ -242,12 +242,15 @@ async function completeNeedsFlow(
|
||||
// lands first — leaves `count = 0` and the seed is skipped rather than
|
||||
// overwriting it. An answer set that speaks to no tile builds `null` and
|
||||
// writes nothing, which leaves the default layout in place.
|
||||
// `AnyNull`, not `JsonNull`: an unset column is a SQL NULL, which
|
||||
// `JsonNull` (a JSON `null` value) does not match — the retired step route
|
||||
// carried that filter and its seed never landed on a fresh account.
|
||||
const seededLayout = buildNeedsSeededDashboardLayout(state.needs);
|
||||
if (seededLayout) {
|
||||
const seeded = await prisma.user.updateMany({
|
||||
where: {
|
||||
id: userId,
|
||||
dashboardWidgetsJson: { equals: Prisma.JsonNull },
|
||||
dashboardWidgetsJson: { equals: Prisma.AnyNull },
|
||||
},
|
||||
data: { dashboardWidgetsJson: toJson(seededLayout) },
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user