Skip to content

test(e2e): isolate clipboard copy/paste tests from the host OS clipboard#2352

Merged
sinelaw merged 1 commit into
masterfrom
claude/flaky-clipboard-split-test-edhb45
Jun 15, 2026
Merged

test(e2e): isolate clipboard copy/paste tests from the host OS clipboard#2352
sinelaw merged 1 commit into
masterfrom
claude/flaky-clipboard-split-test-edhb45

Conversation

@sinelaw

@sinelaw sinelaw commented Jun 15, 2026

Copy link
Copy Markdown
Owner

CONTRIBUTING (Testing rule 4) requires e2e tests to use the internal
clipboard mode so they are isolated from the host system clipboard and
stay parallel-safe in CI. test_clipboard_shared_across_splits was flaky
because it drove Ctrl+C/Ctrl+V against the real OS clipboard: the async
paste path races a background arboard read against a timer, and the shared
host clipboard can be clobbered by other parallel tests, so the paste
intermittently produced "CopyThis" instead of "CopyThisCopyThis".

Seed the internal clipboard via set_clipboard_for_test, which enables
internal-only mode. That makes the copy/paste round-trip deterministic
and synchronous while still exercising the editor's copy/paste flow (the
feature under test is clipboard sharing across splits, not OS-clipboard
integration).

test_settings_paste had the same un-isolated copy->paste round-trip with
a live assertion, so apply the same fix. The other Ctrl+V sites in the
suite are either menu mnemonics (Alt+V), the file-explorer's own node
clipboard, already isolated, or #[ignore]d, so they need no change.

CONTRIBUTING (Testing rule 4) requires e2e tests to use the internal
clipboard mode so they are isolated from the host system clipboard and
stay parallel-safe in CI. `test_clipboard_shared_across_splits` was flaky
because it drove Ctrl+C/Ctrl+V against the real OS clipboard: the async
paste path races a background arboard read against a timer, and the shared
host clipboard can be clobbered by other parallel tests, so the paste
intermittently produced "CopyThis" instead of "CopyThisCopyThis".

Seed the internal clipboard via `set_clipboard_for_test`, which enables
internal-only mode. That makes the copy/paste round-trip deterministic
and synchronous while still exercising the editor's copy/paste flow (the
feature under test is clipboard sharing across splits, not OS-clipboard
integration).

`test_settings_paste` had the same un-isolated copy->paste round-trip with
a live assertion, so apply the same fix. The other Ctrl+V sites in the
suite are either menu mnemonics (Alt+V), the file-explorer's own node
clipboard, already isolated, or #[ignore]d, so they need no change.
@sinelaw sinelaw merged commit 92447e2 into master Jun 15, 2026
8 checks passed
@sinelaw sinelaw deleted the claude/flaky-clipboard-split-test-edhb45 branch June 15, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants