This commit is contained in:
Dotta 2026-09-13 17:20:41 +08:00 committed by GitHub
commit 7370908c49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 4 deletions

View File

@ -130,8 +130,8 @@ vi.mock("../lib/assignees", () => ({
}));
vi.mock("./StatusIcon", () => ({
StatusIcon: ({ status, blockerAttention }: { status: string; blockerAttention?: Issue["blockerAttention"] }) => (
<span data-status-icon-state={blockerAttention?.state}>{status}</span>
StatusIcon: ({ status, blockerAttention, className, size }: { status: string; blockerAttention?: Issue["blockerAttention"]; className?: string; size?: string }) => (
<span className={className} data-testid="status-icon" data-size={size ?? "md"} data-status-icon-state={blockerAttention?.state}>{status}</span>
),
}));
@ -526,6 +526,13 @@ describe("IssueProperties", () => {
expect(surface?.classList).toContain("pl-4");
expect(surface?.querySelectorAll('[data-property-section="true"]').length).toBeGreaterThan(1);
expect(surface?.querySelector('[data-property-value="true"]')).not.toBeNull();
const statusVisual = surface?.querySelector(
'[data-property-label="Status"] + [data-property-value="true"] [data-testid="status-icon"]',
);
expect(statusVisual).not.toBeNull();
expect(statusVisual?.getAttribute("data-size")).toBe("md");
expect(statusVisual?.classList).toContain("mx-1");
expect(statusVisual?.classList).not.toContain("size-6");
expect(surface?.querySelector('[data-property-section="true"] > div')?.classList)
.toContain("text-muted-foreground/70");
const projectLabel = surface?.querySelector('[data-property-label="Project"]');

View File

@ -1944,7 +1944,7 @@ export function IssueProperties({
<ProjectTile
color={issueProject?.color ?? null}
icon={issueProject?.icon ?? null}
size="xs"
size="sm"
/>
<span className="text-sm truncate min-w-0" title={projectName(issue.projectId)}>{projectName(issue.projectId)}</span>
</>
@ -2332,7 +2332,7 @@ export function IssueProperties({
<PropertyRow label="Status">
<StatusIcon
status={issue.status}
className="size-3"
className="mx-1"
blockerAttention={issue.blockerAttention}
onChange={(status) => onUpdate({ status })}
showLabel