Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(composer): assert caret offset after second mid-string keystroke

shanu987c7a1d430f
diff --git a/app/test/playwright/specs/chat-composer-caret.spec.ts b/app/test/playwright/specs/chat-composer-caret.spec.ts
index 3400f1b72b..6f082c3e6b 100644
--- a/app/test/playwright/specs/chat-composer-caret.spec.ts
+++ b/app/test/playwright/specs/chat-composer-caret.spec.ts
@@ -222,7 +222,8 @@ test.describe('Chat composer — caret on mid-string edits', () => {
await page.keyboard.type('B');
await page.waitForTimeout(300);
- // Both characters land consecutively mid-string.
+ // Both characters land consecutively mid-string, caret after the second.
+ expect(await caretOffset(input)).toBe(7);
expect(await composerText(input)).toBe('helloAB world');
});