mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
Some checks are pending
check-nix / nix-eval (push) Waiting to run
check / typecheck (push) Waiting to run
deploy-files / files-build (push) Waiting to run
deploy-files / files-deploy (push) Blocked by required conditions
deploy-site / site-build (push) Waiting to run
deploy-site / site-deploy (push) Blocked by required conditions
deploy / legacy-build (push) Waiting to run
deploy / legacy-deploy (push) Blocked by required conditions
deploy / data-build (push) Waiting to run
deploy / data-deploy (push) Blocked by required conditions
32 lines
1.4 KiB
TypeScript
32 lines
1.4 KiB
TypeScript
import { expect, story } from "../../stories/playwright/story"
|
|
|
|
const playground = "timeline-playground--playground"
|
|
|
|
story("a subagent row leads with its status chip", async ({ mount }) => {
|
|
const timeline = await mount(playground, { args: { scenario: "Background work", activity: true } })
|
|
const rows = timeline.locator('[data-component="timeline-subagent"] > [data-slot="timeline-event-item"]')
|
|
|
|
await expect(rows.locator('[data-slot="timeline-event-item-status"]')).toHaveText([
|
|
"Started",
|
|
"Started",
|
|
"Updated",
|
|
"Completed",
|
|
"Failed",
|
|
"Started",
|
|
"Started",
|
|
"Completed",
|
|
"Stopped",
|
|
])
|
|
// Agent names are capitalized by CSS, so their text is as configured.
|
|
await expect(rows.nth(3).locator("> *")).toHaveText(["Completed", "review Agent", "Review the theme store"])
|
|
})
|
|
|
|
// The timeline is a list of events: a start keeps its ring even while its subagent has not reported back.
|
|
story("a started subagent never spins", async ({ mount }) => {
|
|
const timeline = await mount(playground, { args: { scenario: "Subagent between tools", activity: true } })
|
|
const status = timeline.locator('[data-component="timeline-subagent"] [data-slot="timeline-event-item-status"]')
|
|
|
|
await expect(status).toHaveText("Started")
|
|
await expect(status.locator('svg[data-slot="timeline-event-item-glyph"] circle')).toHaveCount(1)
|
|
await expect(status.locator('[data-component="session-progress-indicator-v2"]')).toHaveCount(0)
|
|
})
|