From c7b75a7849cb260e6f17a045473bfdd0ea21ca81 Mon Sep 17 00:00:00 2001 From: Gille <4317663+helix4u@users.noreply.github.com> Date: Sun, 26 Jul 2026 23:03:20 -0600 Subject: [PATCH] test(desktop): isolate compression from slash completion --- ...session-compression-and-queue-stop.spec.ts | 23 +++++-------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/apps/desktop/e2e/session-compression-and-queue-stop.spec.ts b/apps/desktop/e2e/session-compression-and-queue-stop.spec.ts index e529cb96188e..e48c52cda2b0 100644 --- a/apps/desktop/e2e/session-compression-and-queue-stop.spec.ts +++ b/apps/desktop/e2e/session-compression-and-queue-stop.spec.ts @@ -57,25 +57,14 @@ test.describe('session compression', () => { await send(page, 'E2E_COMPRESSION_THIRD') await expect.poll(() => receivedUserTexts().filter(text => text === 'E2E_COMPRESSION_THIRD').length).toBe(1) - // Commit the command before typing its argument. This waits for the async - // completion request on cold CI workers, then uses the composer's own - // keyboard accept path to advance the arg-taking command. Bare commands - // that take arguments intentionally remain plain text instead of becoming - // chips. Clicking a later completion after typing the argument can insert - // a second command token (for example `//compress ...`) as plain text. + // This test covers compression and continuation, not slash completion. + // Insert the complete command atomically and click Send so an async + // completion response cannot consume Enter as a picker acceptance. const composer = page.locator('[contenteditable="true"]').first() await composer.click() - await composer.type('/compress', { delay: 15 }) - const compressionCompletion = page - .locator('[data-slot="composer-completion-drawer"][role="listbox"]') - .getByRole('button', { name: /^\/compress\b/ }) - await expect(compressionCompletion).toBeVisible() - await compressionCompletion.hover() - await expect(compressionCompletion).toHaveAttribute('data-highlighted', '') - await page.keyboard.press('Enter') - await expect.poll(() => composer.textContent()).toMatch(/^\/compress\s*$/) - await composer.type(' preserve the three test turns', { delay: 15 }) - await page.keyboard.press('Enter') + await page.keyboard.insertText('/compress preserve the three test turns') + await expect.poll(() => composer.textContent()).toContain('preserve the three test turns') + await page.getByRole('button', { name: 'Send', exact: true }).click() await expect .poll(() => page.locator('[data-slot="aui_thread-viewport"]').textContent(), { timeout: 90_000 }) .toMatch(/Compressed|No changes from compression/)