Skip to content

FOLLOW-UP: Add integration tests for DOM event delegation paths (from PR #49) #50

@adnaan

Description

@adnaan

Context

This follow-up task was identified during the review of PR #49.

Source PR: #49
PR Title: feat: extend lvt-el: and lvt-fx: to support native DOM event triggers
Suggested by: @claude[bot], @copilot

Task Description

Add integration tests for the DOM event delegation system introduced in PR #49. Current tests cover processElementInteraction and setupFxDOMEventTriggers but miss several key paths:

  • Wrapper-level bubbling delegation: Dispatch a real DOM event on a child element and assert the closest matching lvt-el:*:on:{event} handler fires (and parent handlers don't)
  • Non-bubbling direct attachment: Test mouseenter/mouseleave/focus/blur listeners are attached directly to elements
  • Lifecycle listener routing: Test setupFxLifecycleListeners / processFxLifecycleAttributes fire effects on lvt:success etc.
  • Teardown/reconnect cycles: Test that teardownDOMEventTriggerDelegation and teardownFxDOMEventTriggers properly remove listeners and clear guard keys, allowing re-attachment on reconnect

Original Comments

"No automated tests cover setupDOMEventTriggerDelegation (bubbling vs non-bubbling events, delegation boundary)" — @copilot

"Tests were added for setupFxDOMEventTriggers but there's no test coverage for processElementInteraction or setupDOMEventTriggerDelegation firing actual DOM events" — @claude[bot]


This issue was automatically created by prmonitor from PR review comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-upFollow-up task from PR reviewfrom-reviewIssue originated from PR review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions