Skip to content

Commit 8664e68

Browse files
diegosouzapwclaude
andcommitted
test: update focusOnOpen assertion to accept textarea focus from IME routing
PR #11 routes focus to the hidden textarea inside the container rather than to the container element itself. Accept either as valid. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent ebcc6eb commit 8664e68

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/terminal.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3043,8 +3043,10 @@ describe('Synchronous open()', () => {
30433043
const term = await createIsolatedTerminal();
30443044
term.open(container);
30453045

3046-
// The terminal should have taken focus
3047-
expect(document.activeElement).toBe(container);
3046+
// With IME routing (PR #11) focus lands on the hidden textarea inside the
3047+
// container rather than on the container itself — either is correct.
3048+
const active = document.activeElement;
3049+
expect(active === container || container.contains(active)).toBe(true);
30483050

30493051
term.dispose();
30503052
});

0 commit comments

Comments
 (0)