Skip to content

Add Playwright end-to-end tests for browser-only behavior #106

Description

@StanZGenchev

The unit tests run in happy-dom with a mock Alpine, so they cannot verify anything that needs a real browser - real Alpine reactivity and x-model, the built dist/ bundles, applied CSS and layout, floating-ui positioning, focus and Tab traversal, CSS transitions, pointer drags and theme switching. Until now these were checked manually.

Add a Playwright suite that covers those gaps:

  • Specs in tests/e2e/, running against the built dist/harmonia.js and dist/harmonia.css with real Alpine, served over http from static fixture pages.
  • Initial coverage for the interaction-heavy components - dialog (focus trap, focus return, transitions), split (real pointer drag, min clamping, persistence), menu and select (floating-ui positioning, outside click, keyboard navigation), date picker (fixed clock, grid keyboard navigation), table (sticky header and column, group collapse, hover), plus smoke and theme specs.
  • Behavioral assertions only (data-slot, aria-*, computed styles, geometry), no screenshot baselines.
  • Run only Chromium locally. A new GitHub Actions workflow runs the suite on Chromium, Firefox and WebKit for pushes and PRs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions