Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Dom Assertions Laravel Package

sinnbeck/laravel-dom-assertions

Extra DOM assertion helpers for Laravel HTTP tests, giving you finer control than assertSee and friends: assert on elements, forms, selects, datalists, and text, with quick existence checks and Livewire/Blade support.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Enhanced Test Coverage for UI/UX Validation: Accelerates development of robust frontend assertions in Laravel HTTP tests, reducing manual DOM inspection and improving test reliability.
  • Shift-Left for Frontend Bugs: Enables developers to catch UI inconsistencies earlier in the SDLC, particularly for dynamic content (e.g., Livewire, Blade components).
  • Faster CI Feedback Loops (new in v3.3.0): Upstream assertion performance work means large DOM-assertion suites run leaner, shortening pull-request cycle time and lowering CI compute cost as suites scale — directly relevant to roadmap decisions about how aggressively we expand UI test coverage.
  • Build vs. Buy: Avoids reinventing wheel for complex DOM assertions, saving engineering time while maintaining flexibility. Continues to track PHP toolchain updates via routine CI dependency bumps, signaling an actively maintained project.
  • Roadmap for Test-Driven UI Development: Supports scaling test suites for feature-rich applications (e.g., dashboards, forms, or multi-step workflows) without the per-assertion overhead that historically made DOM-level tests expensive at volume.
  • Use Cases:
    • Validating form submissions (e.g., CSRF tokens, spoofed methods).
    • Asserting dynamic content (e.g., Livewire updates, AJAX-loaded elements).
    • Cross-browser/device consistency checks (via automated test suites).
    • Compliance testing (e.g., accessibility attributes, required fields).
    • Regression-proofing high-traffic or revenue-critical pages where DOM assertions are run on every commit.

When to Consider This Package

  • Adopt if:

    • Your Laravel app relies on complex frontend interactions (e.g., forms, dynamic components).
    • You need granular DOM assertions beyond assertSee/assertDontSee.
    • Your team prioritizes test-driven UI development or automated visual regression testing.
    • You use Livewire, Alpine.js, or Blade components requiring precise DOM validation.
    • CI runtime is a constraint — v3.3.0's faster assertion execution makes it more viable to run DOM-level checks broadly rather than selectively.
  • Look elsewhere if:

    • Your tests are simple (e.g., only checking for text presence).
    • You're using non-Laravel frameworks (e.g., Symfony, Django).
    • Your team lacks PHP/Laravel expertise to leverage advanced assertions.
    • You need visual regression tools (e.g., Percy, Applitools) instead of DOM-based checks.

Release note (v3.3.0): No breaking changes or new public API. Changes are a CI dependency bump for setup-php and an internal assertion speed-up. Existing suites should upgrade in place — treat as a routine patch-level adoption, not a migration project.


How to Pitch It (Stakeholders)

For Executives: "This package supercharges our Laravel test suite by automating complex UI validations—like form submissions, dynamic content, and accessibility checks—without manual DOM inspection. It reduces frontend bugs in production by catching issues earlier, saving QA time and improving user experience. The latest release also makes our UI assertions faster, so growing our test coverage no longer means proportionally growing CI wait times. Low-risk (MIT license) and developer-friendly, it aligns with our shift-left testing goals."

For Engineering: "Replace flaky assertSee hacks with fluent, chainable DOM assertions (e.g., assertFormExists()->hasCSRF()->hasMethod('PUT')). Works seamlessly with Livewire/Blade, supports whitespace normalization for cleaner tests, and integrates with existing Laravel test workflows. Zero dependency bloat—just install and assert. v3.3.0 is a drop-in upgrade: faster assertions, no API changes, no code changes required on our side."

  • DevOps: "No infrastructure changes needed; runs in existing test suites. The v3.3.0 speed-up reduces per-run CI cost as assertion coverage grows."
  • Design: "Validates UI consistency across browsers/devices automatically."
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera