mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
Merge pull request #2296 from deepseek-harness/codex/workflow-run-auto-disclosure
feat(workflow): auto-follow run and phase disclosures
This commit is contained in:
@@ -74,12 +74,16 @@ describe.skipIf(MODE === 'record')('web e2e: durable workflow run in Chat', () =
|
||||
await input.fill(prompt)
|
||||
await input.press('Enter')
|
||||
|
||||
const workflow = page.getByRole('button', { name: /^snapshot-flow/ })
|
||||
const workflow = page.locator('[data-workflow-run][data-run-status="running"]')
|
||||
await workflow.waitFor({ timeout: 30_000 })
|
||||
expect(await workflow.getAttribute('aria-expanded')).toBe('true')
|
||||
const phase = page.getByRole('button', { name: /^Run/ })
|
||||
await phase.waitFor({ timeout: 15_000 })
|
||||
await phase.click()
|
||||
const disclosures = workflow.locator('[data-disclosure-row]')
|
||||
await disclosures.nth(1).waitFor({ timeout: 15_000 })
|
||||
expect(await disclosures.nth(0).getAttribute('role')).toBeNull()
|
||||
expect(await disclosures.nth(0).getAttribute('aria-expanded')).toBeNull()
|
||||
expect(await disclosures.nth(1).getAttribute('role')).toBeNull()
|
||||
expect(await disclosures.nth(1).getAttribute('aria-expanded')).toBeNull()
|
||||
expect(await disclosures.nth(0).evaluate(element => getComputedStyle(element).cursor)).not.toBe('pointer')
|
||||
expect(await disclosures.nth(1).evaluate(element => getComputedStyle(element).cursor)).not.toBe('pointer')
|
||||
const member = page.getByRole('button', { name: /^Open Reply with exactly the word/ })
|
||||
await member.waitFor({ timeout: 15_000 })
|
||||
await member.focus()
|
||||
@@ -139,15 +143,20 @@ describe.skipIf(MODE === 'record')('web e2e: durable workflow run in Chat', () =
|
||||
const sessions = page.getByRole('tree', { name: 'Sessions' })
|
||||
await sessions.getByRole('treeitem', { name: /Use the workflow tool exactly/ }).click()
|
||||
await settled
|
||||
await page.locator('[data-workflow-run][data-run-status="completed"]').waitFor()
|
||||
|
||||
expect(await page.locator('[data-chat-flow-kind="tool-call"]').count()).toBeGreaterThanOrEqual(1)
|
||||
expect(await page.locator('[data-chat-flow-kind="workflow-run"]').count()).toBe(1)
|
||||
const terminalWorkflow = page.getByRole('button', { name: /^snapshot-flow/ })
|
||||
await terminalWorkflow.waitFor()
|
||||
if (await terminalWorkflow.getAttribute('aria-expanded') !== 'true') await terminalWorkflow.click()
|
||||
expect(await terminalWorkflow.getAttribute('aria-expanded')).toBe('false')
|
||||
expect(await terminalWorkflow.evaluate(element => getComputedStyle(element).cursor)).toBe('pointer')
|
||||
await terminalWorkflow.click()
|
||||
const terminalPhase = page.getByRole('button', { name: /^Run/ })
|
||||
await terminalPhase.waitFor()
|
||||
if (await terminalPhase.getAttribute('aria-expanded') !== 'true') await terminalPhase.click()
|
||||
expect(await terminalPhase.getAttribute('aria-expanded')).toBe('false')
|
||||
expect(await terminalPhase.evaluate(element => getComputedStyle(element).cursor)).toBe('pointer')
|
||||
await terminalPhase.click()
|
||||
await page.getByText(CHILD_PROMPT, { exact: false }).waitFor()
|
||||
await expect.poll(
|
||||
() => page.getByRole('button', { name: /^Open Reply with exactly the word/ }).count(),
|
||||
@@ -165,6 +174,7 @@ describe.skipIf(MODE === 'record')('web e2e: durable workflow run in Chat', () =
|
||||
await workflow.click()
|
||||
const phase = page.getByRole('button', { name: /^Run/ })
|
||||
await phase.waitFor()
|
||||
expect(await phase.getAttribute('aria-expanded')).toBe('false')
|
||||
await phase.click()
|
||||
await page.getByText(CHILD_PROMPT, { exact: false }).waitFor()
|
||||
expect(await page.getByRole('button', { name: /^Open Reply with exactly the word/ }).count()).toBe(0)
|
||||
|
||||
Reference in New Issue
Block a user