Skip to content

fix(E2E): paste from clipboard instead of typing fixture content into documents#3361

Merged
Dave Shoup (shouples) merged 5 commits intomainfrom
djs/e2e-fix-insert-content
Apr 8, 2026
Merged

fix(E2E): paste from clipboard instead of typing fixture content into documents#3361
Dave Shoup (shouples) merged 5 commits intomainfrom
djs/e2e-fix-insert-content

Conversation

@shouples
Copy link
Copy Markdown
Contributor

@shouples Dave Shoup (shouples) commented Apr 7, 2026

Summary of Changes

We've seen an uptick in test failures when trying to write schema content to a text document in the E2E tests since they now show some IDE diagnostics and an error notification:
image

So instead of playing whack-a-mole with editor settings, this PR swaps the pressSequentially behavior to fill editor document contents with copying the fixture body to the test clipboard and pasting directly.

Latest run, happy Windows tests:
image

Pull request checklist

Please check if your PR fulfills the following (if applicable):

Tests

  • Added new
  • Updated existing
  • Deleted existing

Release notes

  • Does anything in this PR need to be mentioned in the user-facing CHANGELOG?

Copilot AI review requested due to automatic review settings April 7, 2026 21:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves E2E test stability for editor interactions by switching from per-keystroke typing (pressSequentially) to clipboard-based paste when inserting fixture content into VS Code text documents, avoiding interference from diagnostics/notifications and auto-editing behaviors.

Changes:

  • Add a clipboard write helper and update TextDocument.insertContent() to paste via ControlOrMeta+v.
  • Grant "clipboard-read"/"clipboard-write" permissions once in the shared E2E baseTest fixture and remove redundant per-test permission granting where touched.
  • Clarify/default editor settings comments around formatting-related behaviors in tests.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/e2e/utils/settings.ts Updates guidance around editor settings that can affect test content insertion.
tests/e2e/utils/flinkStatement.ts Removes now-redundant clipboard permission grant in Flink statement helper flow.
tests/e2e/utils/clipboard.ts Introduces writeToClipboard() and updates clipboard permission notes.
tests/e2e/objects/editor/TextDocument.ts Switches document insertion to clipboard write + paste for stability.
tests/e2e/baseTest.ts Centralizes clipboard permissions in the base Electron context setup.

Comment thread tests/e2e/utils/clipboard.ts
Comment thread tests/e2e/utils/clipboard.ts Outdated
@sonarqube-confluent
Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@shouples Dave Shoup (shouples) marked this pull request as ready for review April 7, 2026 22:20
@shouples Dave Shoup (shouples) requested a review from a team as a code owner April 7, 2026 22:20
Comment thread tests/e2e/utils/settings.ts
Copy link
Copy Markdown
Contributor

@Cerchie Lucia Cerchie (Cerchie) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a grammar nit, but functionally, LGTM

Image

@shouples Dave Shoup (shouples) merged commit 194587f into main Apr 8, 2026
14 checks passed
@shouples Dave Shoup (shouples) deleted the djs/e2e-fix-insert-content branch April 8, 2026 20:00
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.

3 participants