Skip to content

Commit b52bda7

Browse files
committed
fix(regression-test): target the selected agent row
Signed-off-by: kangfenmao <kangfenmao@qq.com>
1 parent 7acf9c3 commit b52bda7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

tests/e2e/cherry-regression/agents.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ export async function selectAgent(page: Page, name: string): Promise<void> {
2020
export async function startNewAgentTask(page: Page, name: string): Promise<void> {
2121
await selectAgent(page, name)
2222
const agentView = page.locator('[data-ui="agent.view"]:visible').first()
23-
const agent = agentView.getByText(name, { exact: true }).first()
24-
const agentRow = agentView.getByRole('option').filter({ has: agent }).first()
23+
const agentRow = agentView.getByRole('option').filter({ hasText: name }).first()
2524
await agentRow.hover()
2625
const newTask = agentRow.getByRole('button', { name: 'New task', exact: true })
2726
await expect(newTask).toBeVisible()

0 commit comments

Comments
 (0)