{{ message }}
Repository navigation
fix(browser-runner): support Node-registered custom element commands - #16113
Open
carrerasdarren-cell wants to merge 1 commit into
Open
carrerasdarren-cell wants to merge 1 commit into
carrerasdarren-cell wants to merge 1 commit into
Conversation
Contributor
This branch has not been deployed
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.

Proposed changes
Fixes #12717. A custom element command registered in the Node-side
beforehook is currently announced to the browser as a name only, so the component spec receives a browser command andelement.customCommand()fails with a missing-function error. Carry the existingattachToElementoption through the worker event and browser state, then register an element proxy that sends its receiver's element ID to the existing Node handler.Keep browser and element registrations distinct by scope and name, deduplicate them within each session, and validate the browser-state descriptors centrally. The Node handler already reconstructs the element receiver and is unchanged. Add a standard component lane covering native/browser controls, two element receivers, same-name scope separation, argument/async-result delivery, original error name/message, and rejection of a missing element ID.
How you tested
3b5e5df, the isolated Chrome 158 component reproduction passed the browser/native controls and failed the element command withelement.ownedElementCommand is not a function. The identical three-check input passed after the fix. Three durable transport/state regressions also failed on the unchanged product before implementation.pnpm run test:package wdio-browser-runner --maxWorkers=2— 107 passing.pnpm run test:package wdio-utils --maxWorkers=2— 541 passing.pnpm run test:package wdio-types --maxWorkers=2— 11 passing, including type fixtures.tsc --noEmitfor all three touched packages,pnpm run test:typings:webdriverio, normal Oxlint and focused lint of the new component JS files passed.pnpm --dir e2e run test:browser:customCommands— all seven real Chrome 158 tests passed, with the standard lane reporting 100% coverage of the synthetic fixture and its setup. The script is included in the normal component chain.Component baseline limits:
pnpm run test:componentexits 1 at the existing Vue empty-array and strict multi-element text assertions (resolved/receivedundefined). Running the remaining standard scripts separately passes Svelte, Lit, Stencil and the new custom-command lane; misc passes nine tests but retains two image-dimension failures (256x213versus600x500, then256x256versus400x400). The same four failures were reproduced earlier on unmodified3b5e5dfwith the same Chrome 158 and lockfile. Their fixtures and normal config remain unchanged here. The uncaught-error checker could not reach a test in two current normal attempts because driver startup failed with TLSread ETIMEDOUT; it is not reported as verified in this run. No assertions were weakened or skipped to make the component suite appear green.Types of changes
Checklist
Backport Request
#XXXXXFurther comments
Prepared with OpenAI Codex assistance. Validation used actual local commands and isolated Chrome sessions; no cloud-provider or other-browser matrix was run.