diff --git a/apps/web/tests/composer-draft-scroll.e2e.ts b/apps/web/tests/composer-draft-scroll.e2e.ts index 508749d0e8..8db710b9e1 100644 --- a/apps/web/tests/composer-draft-scroll.e2e.ts +++ b/apps/web/tests/composer-draft-scroll.e2e.ts @@ -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) diff --git a/apps/web/tests/queue-actions.e2e.ts b/apps/web/tests/queue-actions.e2e.ts index 0f577566fe..c119082ec0 100644 --- a/apps/web/tests/queue-actions.e2e.ts +++ b/apps/web/tests/queue-actions.e2e.ts @@ -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') } diff --git a/apps/web/tests/steering.e2e.ts b/apps/web/tests/steering.e2e.ts index c6f1df177e..7cc1da82c9 100644 --- a/apps/web/tests/steering.e2e.ts +++ b/apps/web/tests/steering.e2e.ts @@ -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]')