Commit 1470891
fix(kb): drop 'use client' from event-summary-react + tighten detail spec selectors
Two test failures from the previous CI run:
1. Dashboard + journey TypesTab tests blew up with:
Error: Attempted to call renderEventSummary() from the server
but renderEventSummary is on the client.
event-summary-react.tsx was marked 'use client' but the dashboard
and TypesTab are server components that *call* renderEventSummary
directly. Next 15 rejects that — a client function can only be
rendered as JSX, not invoked from server code. The function is
pure (no hooks, no state — just a switch returning JSX), so the
directive was wrong from the start. Removed it. Server components
can still return JSX containing <EntityLink> (which IS 'use
client') — that's the normal server/client composition pattern.
2. kb_detail_renders_summary_and_full_metadata hit strict-mode
collision: `getByText('Manufacturer')` matched three elements
because the at-a-glance <dt>Manufacturer</dt> and the full
metadata table's <dt>manufacturer.name</dt> + <dt>manufacturer.code</dt>
all match (Playwright getByText normalises case for substring).
Pinned the at-a-glance assertions to `exact: true` so only the
capitalised label matches, not the dotted metadata-table keys.1 parent e4185b6 commit 1470891
2 files changed
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
204 | 206 | | |
205 | | - | |
| 207 | + | |
206 | 208 | | |
207 | | - | |
| 209 | + | |
208 | 210 | | |
209 | 211 | | |
210 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
| |||
0 commit comments