mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-14 04:01:35 +00:00
test(web): settle the remaining e2e drive gaps
Every consecutive composer send waits out the submit round-trip's read-only span; the end-of-document caret gesture becomes select-all + ArrowRight (Cmd/Ctrl+End moves no caret in mac contenteditable), which lets Lexical's own ancestor scroll walk prove the typing reveal.
This commit is contained in:
@@ -251,9 +251,12 @@ describe('web e2e: composer draft scrolling', () => {
|
||||
onTestFailed(() => saveFailureShot(page, 'web-e2e-composer-draft-scroll-typing'))
|
||||
const input = surface(page)
|
||||
// Put the caret at the very end, scroll the view away from it, then type:
|
||||
// the browser's own caret reveal must bring the end back on screen.
|
||||
// the editor's own caret reveal must bring the end back on screen.
|
||||
// Select-all + ArrowRight lands the caret at the document end on every
|
||||
// platform (Cmd/Ctrl+End is not a caret move in mac contenteditable).
|
||||
await input.click()
|
||||
await page.keyboard.press('ControlOrMeta+End')
|
||||
await page.keyboard.press('ControlOrMeta+KeyA')
|
||||
await page.keyboard.press('ArrowRight')
|
||||
await input.hover()
|
||||
await page.mouse.wheel(0, -2000)
|
||||
await expect.poll(async () => (await measureComposer(page)).scrollTop, { timeout: 10_000 }).toBe(0)
|
||||
|
||||
@@ -217,6 +217,8 @@ describe('web e2e: queue row actions', () => {
|
||||
await page.locator('[data-testid="todo-panel"]').waitFor({ timeout: 10_000 })
|
||||
|
||||
for (const text of ['Layout queue first', 'Layout queue second']) {
|
||||
// A just-submitted composer is read-only for the prompt round-trip.
|
||||
await page.locator('[data-composer-input][contenteditable="true"]').first().waitFor({ timeout: 10_000 })
|
||||
await input.fill(text)
|
||||
await input.press('Enter')
|
||||
}
|
||||
|
||||
@@ -99,11 +99,13 @@ describe('web e2e: mid-turn steering lands durably and visibly', () => {
|
||||
const input = page.locator('[data-composer-input]').first()
|
||||
await input.waitFor({ timeout: 10_000 })
|
||||
const settled = scaffold.whenTurnSettled(MODE === 'record' ? 180_000 : 30_000)
|
||||
await page.locator('[data-composer-input][contenteditable="true"]').first().waitFor({ timeout: 10_000 })
|
||||
await input.fill(PROMPT)
|
||||
await input.press('Enter')
|
||||
|
||||
// Enter remains the Queue gesture. The row action then atomically moves
|
||||
// this exact occurrence into the current turn's steering outbox.
|
||||
await page.locator('[data-composer-input][contenteditable="true"]').first().waitFor({ timeout: 10_000 })
|
||||
await input.fill(STEER)
|
||||
await input.press('Enter')
|
||||
const queuedRow = page.getByRole('listitem').filter({ hasText: STEER })
|
||||
@@ -203,10 +205,12 @@ describe('web e2e: composer shortcut steers directly', () => {
|
||||
const input = page.locator('[data-composer-input]').first()
|
||||
await input.waitFor({ timeout: 10_000 })
|
||||
const settled = scaffold.whenTurnSettled(30_000)
|
||||
await page.locator('[data-composer-input][contenteditable="true"]').first().waitFor({ timeout: 10_000 })
|
||||
await input.fill(PROMPT)
|
||||
await input.press('Enter')
|
||||
await page.getByRole('button', { name: 'Stop generating' }).waitFor({ timeout: 10_000 })
|
||||
|
||||
await page.locator('[data-composer-input][contenteditable="true"]').first().waitFor({ timeout: 10_000 })
|
||||
await input.fill(STEER)
|
||||
await input.press('Meta+Enter')
|
||||
await expect.poll(() => input.textContent(), { timeout: 5_000 }).toBe('')
|
||||
@@ -265,11 +269,13 @@ describe('web e2e: composer shortcut follows the swapped busy behavior', () => {
|
||||
|
||||
const input = page.locator('[data-composer-input]').first()
|
||||
const settled = scaffold.whenTurnSettled(30_000)
|
||||
await page.locator('[data-composer-input][contenteditable="true"]').first().waitFor({ timeout: 10_000 })
|
||||
await input.fill(PROMPT)
|
||||
await input.press('Enter')
|
||||
await page.getByRole('button', { name: 'Stop generating' }).waitFor({ timeout: 10_000 })
|
||||
|
||||
const queuedText = 'Queued by the complementary Cmd+Enter shortcut.'
|
||||
await page.locator('[data-composer-input][contenteditable="true"]').first().waitFor({ timeout: 10_000 })
|
||||
await input.fill(queuedText)
|
||||
await input.press('Meta+Enter')
|
||||
const queuedRow = page.locator('[data-queue-dock]').getByRole('listitem').filter({ hasText: queuedText })
|
||||
@@ -329,10 +335,13 @@ describe('web e2e: empty-draft Cmd+Enter steers the whole queue', () => {
|
||||
|
||||
// Call 0 streams a question-tool call; the fills must land inside the
|
||||
// first replay window, before the question composer replaces the textarea.
|
||||
await page.locator('[data-composer-input][contenteditable="true"]').first().waitFor({ timeout: 10_000 })
|
||||
await input.fill(PROMPT)
|
||||
await input.press('Enter')
|
||||
await page.locator('[data-composer-input][contenteditable="true"]').first().waitFor({ timeout: 10_000 })
|
||||
await input.fill(STEER_ONE)
|
||||
await input.press('Enter')
|
||||
await page.locator('[data-composer-input][contenteditable="true"]').first().waitFor({ timeout: 10_000 })
|
||||
await input.fill(STEER_TWO)
|
||||
await input.press('Enter')
|
||||
const dock = page.locator('[data-queue-dock]')
|
||||
|
||||
Reference in New Issue
Block a user