feat(FN-4368): complete Step 5 — surface advisory polish notes
Fusion-Task-Id: FN-4368 Fusion-Task-Lineage: ac9b12e6-2101-4b51-89a0-6422fd7850ed
This commit is contained in:
@@ -232,6 +232,11 @@
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.workflow-result-badge--advisory_failure {
|
||||
background-color: color-mix(in srgb, var(--color-warning) 20%, var(--surface));
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
/* Phase badge base and modifier classes */
|
||||
.phase-badge {
|
||||
margin-inline-start: var(--space-xs);
|
||||
@@ -285,6 +290,28 @@
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.workflow-polish-notes {
|
||||
margin-top: var(--space-sm);
|
||||
padding: var(--space-sm) var(--space-md);
|
||||
border: 1px solid color-mix(in srgb, var(--color-warning) 35%, var(--border));
|
||||
border-radius: var(--radius-md);
|
||||
background: color-mix(in srgb, var(--color-warning) 8%, var(--surface));
|
||||
}
|
||||
|
||||
.workflow-polish-notes h5 {
|
||||
margin: 0 0 var(--space-xs) 0;
|
||||
}
|
||||
|
||||
.workflow-polish-notes-subtitle {
|
||||
margin: 0 0 var(--space-sm) 0;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.workflow-polish-notes ul {
|
||||
margin: 0;
|
||||
padding-inline-start: var(--space-lg);
|
||||
}
|
||||
|
||||
.workflow-results-summary-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -462,6 +462,8 @@ export function WorkflowResultsTab({
|
||||
if (skipped > 0) summaryParts.push(`${skipped} skipped`);
|
||||
if (pending > 0) summaryParts.push(`${pending} running`);
|
||||
|
||||
const advisoryFindings = results.filter((result) => result.status === "advisory_failure" || Boolean(result.notes?.trim()));
|
||||
|
||||
return (
|
||||
<div className="workflow-results-list" data-testid="workflow-results-list">
|
||||
<div className="workflow-results-summary-bar" data-testid="workflow-results-summary">
|
||||
|
||||
@@ -203,6 +203,39 @@ describe("WorkflowResultsTab", () => {
|
||||
expect(within(liveLogPanel).getByText("Current workflow output")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("renders advisory findings under Polish notes and keeps failure counts non-blocking", () => {
|
||||
const advisoryResults: WorkflowStepResult[] = [
|
||||
{
|
||||
workflowStepId: "WS-006",
|
||||
workflowStepName: "Frontend UX Design",
|
||||
phase: "pre-merge",
|
||||
status: "advisory_failure",
|
||||
notes: "Polish spacing in `packages/dashboard/app/components/TaskCard.tsx`."
|
||||
},
|
||||
{
|
||||
workflowStepId: "WS-001",
|
||||
workflowStepName: "QA Check",
|
||||
phase: "pre-merge",
|
||||
status: "passed",
|
||||
output: "All tests passed",
|
||||
},
|
||||
];
|
||||
|
||||
render(<WorkflowResultsTab taskId="FN-001" results={advisoryResults} />);
|
||||
|
||||
expect(screen.getByTestId("workflow-result-badge-WS-006")).toHaveTextContent("Advisory");
|
||||
expect(screen.getByTestId("workflow-result-badge-WS-006")).toHaveClass("workflow-result-badge--advisory_failure");
|
||||
|
||||
const polishNotes = screen.getByTestId("workflow-polish-notes");
|
||||
expect(polishNotes).toHaveTextContent("Polish notes");
|
||||
expect(polishNotes).toHaveTextContent("Non-blocking findings");
|
||||
expect(screen.getByTestId("workflow-polish-note-WS-006")).toHaveTextContent("Frontend UX Design");
|
||||
|
||||
const summary = screen.getByTestId("workflow-results-summary");
|
||||
expect(summary).toHaveTextContent("1 advisory");
|
||||
expect(summary).not.toHaveTextContent("failed");
|
||||
});
|
||||
|
||||
it("shows output content when toggle is clicked to expand", () => {
|
||||
render(<WorkflowResultsTab taskId="FN-001" results={mockResults} />);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user