test(e2e): isolate clipboard copy/paste tests from the host OS clipboard#2352
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_splitswas flakybecause 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 enablesinternal-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_pastehad the same un-isolated copy->paste round-trip witha 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.