story-kit: merge 213_story_remove_colored_left_border_from_work_item_cards

This commit is contained in:
Dave
2026-02-26 16:15:11 +00:00
parent 774a731042
commit 8715e648ba
2 changed files with 27 additions and 21 deletions

View File

@@ -162,59 +162,66 @@ describe("StagePanel", () => {
).not.toBeInTheDocument();
});
it("applies green left border for story items", () => {
it("card has uniform border on all sides for story items", () => {
const items: PipelineStageItem[] = [
{
story_id: "20_story_green_border",
name: "Green Border",
story_id: "20_story_uniform_border",
name: "Uniform Border",
error: null,
agent: null,
},
];
render(<StagePanel title="Upcoming" items={items} />);
const card = screen.getByTestId("card-20_story_green_border");
expect(card.style.borderLeft).toContain("rgb(63, 185, 80)");
const card = screen.getByTestId("card-20_story_uniform_border");
// No 3px colored left border - all sides match the uniform shorthand
expect(card.style.borderLeft).not.toContain("3px");
expect(card.style.borderLeft).toBe(card.style.borderTop);
expect(card.style.borderLeft).toBe(card.style.borderRight);
expect(card.style.borderLeft).toBe(card.style.borderBottom);
});
it("applies red left border for bug items", () => {
it("card has uniform border on all sides for bug items", () => {
const items: PipelineStageItem[] = [
{
story_id: "21_bug_red_border",
name: "Red Border",
story_id: "21_bug_uniform_border",
name: "Uniform Border Bug",
error: null,
agent: null,
},
];
render(<StagePanel title="Current" items={items} />);
const card = screen.getByTestId("card-21_bug_red_border");
expect(card.style.borderLeft).toContain("rgb(248, 81, 73)");
const card = screen.getByTestId("card-21_bug_uniform_border");
expect(card.style.borderLeft).not.toContain("3px");
expect(card.style.borderLeft).toBe(card.style.borderTop);
});
it("applies blue left border for spike items", () => {
it("card has uniform border on all sides for spike items", () => {
const items: PipelineStageItem[] = [
{
story_id: "22_spike_blue_border",
name: "Blue Border",
story_id: "22_spike_uniform_border",
name: "Uniform Border Spike",
error: null,
agent: null,
},
];
render(<StagePanel title="QA" items={items} />);
const card = screen.getByTestId("card-22_spike_blue_border");
expect(card.style.borderLeft).toContain("rgb(88, 166, 255)");
const card = screen.getByTestId("card-22_spike_uniform_border");
expect(card.style.borderLeft).not.toContain("3px");
expect(card.style.borderLeft).toBe(card.style.borderTop);
});
it("applies neutral left border for unrecognised type", () => {
it("card has uniform border on all sides for unrecognised type", () => {
const items: PipelineStageItem[] = [
{
story_id: "23_task_neutral_border",
name: "Neutral Border",
story_id: "23_task_uniform_border",
name: "Uniform Border Task",
error: null,
agent: null,
},
];
render(<StagePanel title="Done" items={items} />);
const card = screen.getByTestId("card-23_task_neutral_border");
expect(card.style.borderLeft).toContain("rgb(68, 68, 68)");
const card = screen.getByTestId("card-23_task_uniform_border");
expect(card.style.borderLeft).not.toContain("3px");
expect(card.style.borderLeft).toBe(card.style.borderTop);
});
});

View File

@@ -174,7 +174,6 @@ export function StagePanel({
border: item.agent
? "1px solid #2a3a4a"
: "1px solid #2a2a2a",
borderLeft: `3px solid ${borderColor}`,
borderRadius: "8px",
padding: "8px 12px",
background: item.agent ? "#161e2a" : "#191919",