story-kit: queue 100_story_test_coverage_http_context_rs_to_100 for QA

This commit is contained in:
Dave
2026-02-23 21:34:59 +00:00
parent 0bb13d2b67
commit fcf7984a89
4 changed files with 53 additions and 79 deletions

View File

@@ -98,7 +98,8 @@ describe("RosterBadge availability state", () => {
expect(badge.style.color).toBe("rgb(170, 170, 170)");
});
it("shows a green pulsing dot for an active agent", async () => {
// AC1: roster badge always shows idle (grey) even when agent is running
it("shows a static green dot for a running agent (roster always idle)", async () => {
const agentList: AgentInfo[] = [
{
story_id: "81_active",
@@ -115,12 +116,13 @@ describe("RosterBadge availability state", () => {
render(<AgentPanel />);
const dot = await screen.findByTestId("roster-dot-coder-1");
// JSDOM normalizes #3fb950 to rgb(63, 185, 80)
expect(dot.style.background).toBe("rgb(63, 185, 80)");
expect(dot.style.animation).toBe("pulse 1.5s infinite");
// Roster is always idle — no pulsing animation
expect(dot.style.animation).toBe("");
});
it("shows green badge styling for an active agent", async () => {
// AC1: roster badge always shows idle (grey) even when agent is running
it("shows grey (idle) badge styling for a running agent", async () => {
const agentList: AgentInfo[] = [
{
story_id: "81_active",
@@ -137,8 +139,32 @@ describe("RosterBadge availability state", () => {
render(<AgentPanel />);
const badge = await screen.findByTestId("roster-badge-coder-1");
// JSDOM normalizes #3fb95018 to rgba(63, 185, 80, 0.094) and #3fb950 to rgb(63, 185, 80)
expect(badge.style.background).toBe("rgba(63, 185, 80, 0.094)");
expect(badge.style.color).toBe("rgb(63, 185, 80)");
// Always idle: grey background and grey text
expect(badge.style.background).toBe("rgba(170, 170, 170, 0.094)");
expect(badge.style.color).toBe("rgb(170, 170, 170)");
});
// AC2: after agent completes and returns to roster, badge shows idle
it("shows idle state after agent status changes from running to completed", async () => {
const agentList: AgentInfo[] = [
{
story_id: "81_completed",
agent_name: "coder-1",
status: "completed",
session_id: null,
worktree_path: null,
base_branch: null,
},
];
mockedAgents.listAgents.mockResolvedValue(agentList);
render(<AgentPanel />);
const badge = await screen.findByTestId("roster-badge-coder-1");
const dot = screen.getByTestId("roster-dot-coder-1");
// Completed agent: badge is idle
expect(badge.style.background).toBe("rgba(170, 170, 170, 0.094)");
expect(badge.style.color).toBe("rgb(170, 170, 170)");
expect(dot.style.animation).toBe("");
});
});