Releases: igorgawrys1/dawn
Releases · igorgawrys1/dawn
Release list
v0.3.1
Added
- PHPUnit 13 support (
phpunit/phpunit: ^13.0). Since Dawn requires PHPUnit at
runtime (its assertions callPHPUnit\Framework\Assert), the previous^12
cap would have blocked Laravel 13 apps that run on PHPUnit 13. Verified: the
full suite passes on PHPUnit 13.2 + Laravel 13 + testbench 11 (PHP 8.4).
Fixed
- Dusk class-name compatibility now also aliases
Laravel\Dusk\Page,
Laravel\Dusk\ComponentandLaravel\Dusk\Keyboard(the last eagerly, as it
appears as awithKeyboard()closure parameter type). Previously only
Browser/TestCase/ElementResolver/Duskwere aliased, so page-object
and component test bodies that extend the Dusk base classes would not resolve
when laravel/dusk is absent.CompatAliasTestnow covers every alias. ElementResolvernow treats backslashes as valid in a plausible CSS selector,
so escaped selectors (e.g. Tailwind's.md\:flexor[name="a\:b"]) are
kept as resolution candidates instead of being silently dropped. A dangling
trailing backslash is still rejected so it cannot corrupt the candidate list.KeyboardActions(aliased toLaravel\Dusk\Keyboard) can now be constructed
directly with aBrowser- matching Dusk'snew Keyboard($browser)- as well
as with a Playwright page (PageInterface), so direct construction outside
withKeyboard()no longer throws a TypeError.
v0.3.0
Added
- Laravel 13 support:
illuminate/support: ^13.0,orchestra/testbench: ^11.0,
and a Laravel 13 (PHP 8.4) job in the integration matrix. Verified against a
real laravel/laravel ^13.0 app (login/logout + encrypted-cookie round-trip)
and the PHPStan/larastan leg (which resolves to Laravel 13 + testbench 11).
v0.2.0
Pushes coverage of the Dusk Browser API to ~95% (auto-measured against the
current upstream Dusk). Everything not covered is documented as genuinely
un-mappable in COMPATIBILITY.md.
Added
- Mouse: full
page.mouse()mapping - cursor-positionclick(),
clickAtPoint,moveMouse,clickAndHold,releaseMouse, and
cursor/selector variants ofdoubleClick/rightClick/controlClick. - Drag & drop:
drag(viadragTo) anddragUp/Down/Left/Right/dragOffset
(via mouse move sequences). - Keyboard:
withKeyboard()fluent wrapper (KeyboardActions). - Cookies:
cookie/plainCookie/addCookie/deleteCookieand all
six cookie assertions; encrypted cookies use Laravel'sCrypt+
CookieValuePrefix, exactly like Dusk. - Vue:
assertVue,assertVueIsNot,assertVueContains,
assertVueDoesNotContain(+assertVueDoesntContainalias),vueAttribute,
waitUntilVue,waitUntilVueIsNot- reads Vue 2 and Vue 3 internals. - Pages & Components:
Dawn\PageandDawn\Component, plusvisit(Page),
on,onWithoutAssert,component,onComponent;within/withaccept a
Component. - Frames:
withinFrame()via a frame-awareElementResolver(Playwright
frameLocator), with reads routed through locators inside the frame. - Waiting:
waitForEvent();fitContent()measures the document and
resizes the viewport. - Compatibility badge:
scripts/compat-report.php+ a weekly workflow that
measures Dawn against the current laravel/dusk and refreshes a shields
endpoint badge. - Claude auto-review:
.github/workflows/claude-review.ymlreviews PRs.
Changed
- Failure capture dismisses any dialog a failing test left open before taking
the screenshot, and never lets a capture error mask the test's real failure.
Not supported (documented in COMPATIBILITY.md)
maximize/move(no OS window in Playwright),tinker/stop
(interactive-only), and JS dialogsacceptDialog/dismissDialog/
typeInDialog/waitForDialog/assertDialogOpened(the engine's
synchronous transport + always-on dialog listener deadlock on blocking
dialogs). All throwUnsupportedDuskMethod.
v0.1.0
Initial release: run existing Laravel Dusk suites on Playwright by swapping
only the test base class.
Added
Dawn\Browser- Dusk's public Browser API reimplemented on the
playwright-php/playwrightengine (navigation, input, interaction,
scoping, waiting, assertions; see COMPATIBILITY.md for the full table).Dawn\ElementResolver- Dusk selector semantics (@duskattributes, page
element aliases,within()scope prefixes, field/button resolution orders)
compiled to Playwright locators, resolved lazily so native auto-waiting
applies at action time.- Waiting delegated to Playwright: element waits via
locator.waitFor();
text/URL/script waits via a single in-browserrequestAnimationFrame
condition promise (navigation-safe re-arming). No PHP-side polling -
exceptwaitUsing(), whose arbitrary-PHP-closure contract is served by the
one documentedDawn\Support\Waiterexception. Dawn\TestCase+ProvidesBrowser- DuskTestCase-compatible lifecycle:
browse()(multi-browser capable), persistent primary browser per class,
failure screenshots and console logs in Dusk's paths, fail-fast guard
againstRefreshDatabase.Dawn\DawnServiceProvider- environment-gated/_dawn/login|logout|user
routes poweringloginAs(),logout(),assertAuthenticated*().- Dusk class-name compatibility:
Laravel\Dusk\Browser(and TestCase,
ElementResolver, Dusk) alias to their Dawn equivalents when laravel/dusk is
not installed - test files stay byte-identical. Dawn\Keyboard- WebDriverKeys token & chord translation to Playwright
keys ({command},['{shift}', 'x'], …).- Typed failure modes:
UnsupportedDuskMethod(with compatibility-table
link),TimeoutException(Dusk-style messages),ElementNotFound. - Test suite: unit tests (including selector-formatting and URL-assertion
cases ported verbatim from laravel/dusk's own suite), a real-browser
fixture suite with zero sleeps, a byte-identical Dusk acceptance class, and
a real laravel/laravel integration test (scripts/integration-test.sh)
covering Laravel 10/11/12. - CI: Pint, PHPStan (max), no-sleep guard, browser tests on PHP 8.2–8.4,
real-app integration matrix across Laravel 10/11/12.
Known limitations (throw UnsupportedDuskMethod; see COMPATIBILITY.md)
- Dusk Pages & Components, dialogs,
withinFrame, drag & drop, cookie
helpers/assertions,assertVue*, cursor-position mouse variants,
maximize()/move()(Playwright has viewports, not OS windows).