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

Inertiajs Events Laravel Dusk Laravel Package

protonemedia/inertiajs-events-laravel-dusk

Laravel Dusk helpers for testing Inertia.js events. Adds assertions and utilities so you can verify Inertia events fire as expected in browser tests, making it easier to cover Inertia-powered Laravel flows end to end.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

Test-strategy decisions for Inertia.js SPAs on Laravel Dusk. Inertia navigation is XHR-driven (no full page reload), so Dusk's default waitFor / assertSee primitives race against the client-side visit lifecycle. Teams end up either sprinkling pause()/fixed sleeps (slow, still flaky) or under-testing. This package surfaces Inertia's browser events (inertia:start, inertia:success, inertia:error, inertia:invalid, inertia:finish) into Dusk so assertions can synchronize on real navigation state. That directly informs:

  • Whether to invest in deterministic E2E waits vs. accept CI retries — quantifiable in flake rate and CI minutes.
  • Coverage scope for browser-level tests — it makes the failure paths of an Inertia visit (validation errors, 409/422 handling, modals, partial reloads) assertable end-to-end, instead of only at the HTTP layer via AssertableInertia. That is a coverage decision, not just a tooling one.
  • Build vs. buy vs. vendor — the capability is a thin Dusk browser macro. With 23 stars, 0 dependents, and MIT license, the framing is "small utility with real but bounded leverage." Release 1.3.0 materially changes the risk picture: the package now targets Laravel 10, Dusk 7, and PHP 8.2, which reads as maintenance-mode and current rather than abandoned. Decide between: adopt as a pinned dev-dependency, vendor/fork ~an afternoon of work, or hand-roll the macro. Pinning is now a more defensible default than it was at the prior assessment.
  • Dependency-risk policy — a concrete data point for the "do we allow low-traffic, single-maintainer dev-only packages?" question. Dev-only, MIT, small surface area → low blast radius. The release confirms someone is still shipping compatibility bumps, but there is still no SLA, no dependents, and no stated support window — so it stays on the "vendor if it becomes load-bearing" list, not the strategic roadmap.
  • Upgrade-path sequencing — 1.3.0 raises the floor to PHP ≥ 8.1 and Laravel ≥ 9 and drops older Laravel/PHP. This is a real constraint for any team still on PHP 8.0 or Laravel 8: the upgrade of this dev dependency may gate or be gated by the app upgrade. Worth sequencing explicitly rather than discovering at composer update.
  • Roadmap signal — low opportunity score and zero dependents mean this is not a candidate for platform standardization or a standalone upgrade initiative. It is a tactical unlock for a team already committed to Dusk, and 1.3.0 removes the "it's dead" objection without turning it into a platform bet.

When to Consider This Package

Consider it when:

  • You already run a Laravel Dusk suite against an Inertia (Vue/React/Svelte) app and have observed flaky or slow navigation assertions.
  • You are on Laravel 9/10, PHP 8.1/8.2, and Dusk 7 — i.e., inside the newly declared support window. This is the first release where that alignment is explicit, so verify your matrix against it.
  • Your Inertia version still emits the event names this package hooks (verify against your installed @inertiajs/inertia / @inertiajs/vue3 version — the package predates Inertia v1 GA and v2, and 1.3.0 did not change that).
  • You can pin the version and retain PHP capacity to fork a small macro if a future Laravel/Dusk bump outpaces upstream.
  • You need browser-level confidence on Inertia error/validation flows that unit and HTTP-layer tests can't reach.

Look elsewhere when:

  • You have no Dusk suite. Prefer Pest/PHPUnit feature tests with Inertia's AssertableInertia, or move browser testing to Playwright/Cypress, which have first-class async SPA primitives (network idle, route interception) and no equivalent maintenance gap.
  • You are on PHP 8.0 or Laravel 8 or below — 1.3.0 will not install. Pinning 1.2.x is possible but reinstates exactly the staleness this release was meant to fix.
  • You are on Laravel 11/12 or Inertia v2 — still unverified; 1.3.0 tops out at Laravel 10, so there is no upstream guarantee for the newest stacks.
  • You require a formally maintained dependency with SBOM/compliance/SLA backing — "recently released" is not the same as "supported," and a single-maintainer project with zero dependents still fails that bar.
  • You need more than event synchronization (JS-side state assertions, visual diffs, cross-browser matrices) — this narrow tool won't carry that.

How to Pitch It (Stakeholders)

To executives: This is a small, free (MIT), developer-only utility that makes our browser tests for Inertia screens reliable instead of timing-dependent. It doesn't touch production code or customers — it reduces CI flake and the engineering hours spent re-running and debugging E2E failures. The new 1.3.0 release is a compatibility refresh (Laravel 10, Dusk 7, PHP 8.2) and removes the "abandoned project" concern that previously argued for immediate forking. It is still not a platform bet: it's a single-maintainer, zero-dependent package, so we'd time-box adoption, pin the version, and keep vendoring as the fallback. Expected cost: under a day of engineering; expected return: fewer retried CI runs and trustworthy end-to-end coverage of form/validation flows.

To engineering: It registers Inertia's client-side lifecycle events as Dusk-observable hooks, so waitForInertiaEvent('success')-style assertions replace pause() and retry loops. Adoption is composer require --dev plus a macro registration. Two things changed with 1.3.0: the package now explicitly supports Laravel 10 / Dusk 7 / PHP 8.2, so it fits our current stack without patching; and it hard-drops Laravel < 9 and PHP < 8.1, so any service or CI image still on the old floor needs the app upgrade first (or a 1.2.x pin, which we should avoid). The remaining risk is Inertia-version drift — 1.3.0 did not touch the event-hook layer, so confirm the event names against our installed @inertiajs/* in a spike, and plan to vendor the macro into tests/Browser if we want to insulate against future staleness. Fallback is unchanged: a short in-house browser macro, same behavior, no dependency.

Recommendation: Spike, then pin-or-vendor — the drop-in path is now defensible. One day to validate against our Inertia version and confirm the PHP/Laravel floor matches our CI; if it works, pin 1.3.0 and treat vendoring into our own test support code as the pre-agreed exit if upstream goes quiet again.

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.
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names