Conversation
- Add custom keybinding (Cmd+J E) for command palette to avoid Firefox's Ctrl+Shift+P private browsing shortcut conflict - Make clipboard permissions Chromium-only in Clipboard POM (Firefox/WebKit don't support programmatic clipboard permission grants) - Skip context menu clipboard tests on Firefox/WebKit (navigator.clipboard API requires user gesture on non-Chromium browsers) - Refactor console-clipboard.test.ts to be parameterized and DRY - Expand cross-browser workflow to test: search, layouts, console-clipboard, and notebook-copy-paste Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
E2E Tests 🚀 |
- Add viewer, variables, and notebook tests to cross-browser workflow - Add synthetic paste workaround for Edge/WebKit clipboard API restrictions - Simplify tracing by removing tracingInitialized flag (rely on try/catch) - Fix viewer tests for web mode with iframe locator conditionals - Use clipboard.paste(text) API for reliable cross-browser paste Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
380f3f0 to
f7bac20
Compare
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
f7bac20 to
e1e0bd9
Compare
Remove redundant screenshot from stopTracing that ran unconditionally. Now only the on-test-end screenshot is captured, and only when test fails. Added try-catch to handle cases where page isn't available. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
||
| await measureAndLog(() => this.context.tracing.stopChunk({ path: persistPath }), `stopTracing${name ? ` for ${name}` : ''}`, this.options.logger); | ||
|
|
||
| // To ensure we have a screenshot at the end where |
There was a problem hiding this comment.
We are getting duplicate screenshots. This is already handled in the reporting fixture.
| pushd $ROOT | ||
|
|
||
| # Required for Node 22+ to run TypeScript files directly | ||
| export NODE_OPTIONS="--experimental-strip-types" |
There was a problem hiding this comment.
Node 22+ requires the --experimental-strip-types flag to run TypeScript files directly. Without this, launching the code server for web-based e2e tests fails because
build/lib/preLaunch.ts can't be executed. This aligns with how the precommit hook already handles Node 22+ TypeScript execution.
There was a problem hiding this comment.
Just FYI, Tim signed off on this change. Basically I was unable to run web-based tests with the Playwright VSCode extension. They worked fine via CLI, just via UI was the problem. Super annoying.
| required: false | ||
| description: "Exclude tests matching this regex pattern (passed to --grep-invert)" | ||
| type: string | ||
| default: "" |
There was a problem hiding this comment.
haha, well, it's only in cross browser tests yml! not all browsers play nicely. :)
a4918a5
This reverts commit a4918a5.
|
The 1 failure is unrelated, going ahead and merging. |
Summary
Fixes several issues preventing e2e tests from running on Firefox and WebKit browsers:
Ctrl+Shift+Pfor private browsing. Added custom keybindingCmd+J Ethat browsers won't capture.grantPermissions('clipboard-read')is Chromium-only. Made the Clipboard POM handle non-Chromium browsers gracefully.navigator.clipboard.readText()requires user gesture on Firefox/WebKit. Context menu clipboard tests now skip on these browsers.console-clipboard.test.tsto be parameterized/DRY.Tests Added to Cross-Browser
console-clipboardbootstrap-extensionslayoutsnotebook-cell-action-bar*,notebook-copy-paste,notebook-edit-mode*,notebook-focus-and-selection*,notebook-undo-redosearchvariables-expanded,variables-filter,variables-sessionsviewer(3 tests)*Indicates test excluded on Webkit using grepInvert in YML
QA Notes
@:web @:console @:variables @:layouts
Example run: https://github.com/posit-dev/positron/actions/runs/22950739625