fix: stabilise happy path playwright journeys
This commit is contained in:
@@ -355,6 +355,7 @@ function InvestigationHistoryCard({ turn }) {
|
||||
className="rounded-lg border border-gray-100 bg-gray-50/60"
|
||||
key={turn.id}
|
||||
open={!isCollapsed}
|
||||
data-testid="investigation-turn"
|
||||
>
|
||||
<summary className="cursor-pointer px-4 py-2 text-sm font-medium text-gray-700 hover:text-gray-900">
|
||||
{isAnswered && <span aria-hidden="true">✓ </span>}
|
||||
@@ -390,13 +391,13 @@ function InvestigationHistory({ turns }) {
|
||||
const latestId = turns[turns.length - 1].id;
|
||||
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
<div className="space-y-3" data-testid="investigation-history">
|
||||
<h2 className="text-xs font-bold uppercase tracking-wider text-gray-400">
|
||||
Investigation history
|
||||
</h2>
|
||||
<div className="space-y-2">
|
||||
{turns.map((turn) => (
|
||||
<InvestigationHistoryCard key={turn.id} turn={{ ...turn, _collapsed: turn.id !== latestId }} />
|
||||
<InvestigationHistoryCard key={turn.id} data-testid="investigation-turn" turn={{ ...turn, _collapsed: turn.id !== latestId }} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
@@ -490,7 +491,7 @@ function LoadingOverlay({ isLoading, elapsed, currentMessage, variant }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="rounded-lg border border-gray-200 bg-blue-50 px-5 py-6" role="status" aria-busy="true">
|
||||
<div className="rounded-lg border border-gray-200 bg-blue-50 px-5 py-6" role="status" aria-busy="true" data-testid="loading-overlay">
|
||||
<div className="flex items-center gap-3">
|
||||
<ActivitySpinner />
|
||||
<span className="text-base font-medium text-blue-900">Working through your situation</span>
|
||||
@@ -626,7 +627,7 @@ export default function ReasoningWorkspace({
|
||||
Boolean(propUnderstanding || graph?.currentSummary || result?.updatedSituationGraph?.currentSummary) || !hasSelectedQuestion;
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<div className="space-y-6" data-testid="reasoning-workspace">
|
||||
{/* ── Loading overlays ─────────────────────────────── */}
|
||||
{status === "loading" && (
|
||||
<LoadingOverlay
|
||||
|
||||
Reference in New Issue
Block a user