Skip to content

Releases: igorgawrys1/dawn

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 06 Jul 11:17

Added

  • PHPUnit 13 support (phpunit/phpunit: ^13.0). Since Dawn requires PHPUnit at
    runtime (its assertions call PHPUnit\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\Component and Laravel\Dusk\Keyboard (the last eagerly, as it
    appears as a withKeyboard() closure parameter type). Previously only
    Browser/TestCase/ElementResolver/Dusk were aliased, so page-object
    and component test bodies that extend the Dusk base classes would not resolve
    when laravel/dusk is absent. CompatAliasTest now covers every alias.
  • ElementResolver now treats backslashes as valid in a plausible CSS selector,
    so escaped selectors (e.g. Tailwind's .md\:flex or [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 to Laravel\Dusk\Keyboard) can now be constructed
    directly with a Browser - matching Dusk's new Keyboard($browser) - as well
    as with a Playwright page (PageInterface), so direct construction outside
    withKeyboard() no longer throws a TypeError.

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 06 Jul 10:00

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

Choose a tag to compare

@github-actions github-actions released this 05 Jul 11:54
f61e4e3

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-position click(),
    clickAtPoint, moveMouse, clickAndHold, releaseMouse, and
    cursor/selector variants of doubleClick / rightClick / controlClick.
  • Drag & drop: drag (via dragTo) and dragUp/Down/Left/Right/dragOffset
    (via mouse move sequences).
  • Keyboard: withKeyboard() fluent wrapper (KeyboardActions).
  • Cookies: cookie / plainCookie / addCookie / deleteCookie and all
    six cookie assertions; encrypted cookies use Laravel's Crypt +
    CookieValuePrefix, exactly like Dusk.
  • Vue: assertVue, assertVueIsNot, assertVueContains,
    assertVueDoesNotContain (+ assertVueDoesntContain alias), vueAttribute,
    waitUntilVue, waitUntilVueIsNot - reads Vue 2 and Vue 3 internals.
  • Pages & Components: Dawn\Page and Dawn\Component, plus visit(Page),
    on, onWithoutAssert, component, onComponent; within/with accept a
    Component.
  • Frames: withinFrame() via a frame-aware ElementResolver (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.yml reviews 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 dialogs acceptDialog / dismissDialog /
    typeInDialog / waitForDialog / assertDialogOpened (the engine's
    synchronous transport + always-on dialog listener deadlock on blocking
    dialogs). All throw UnsupportedDuskMethod.

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 05 Jul 10:55
a4b1880

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/playwright engine (navigation, input, interaction,
    scoping, waiting, assertions; see COMPATIBILITY.md for the full table).
  • Dawn\ElementResolver - Dusk selector semantics (@dusk attributes, 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-browser requestAnimationFrame
    condition promise (navigation-safe re-arming). No PHP-side polling -
    except waitUsing(), whose arbitrary-PHP-closure contract is served by the
    one documented Dawn\Support\Waiter exception.
  • 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
    against RefreshDatabase.
  • Dawn\DawnServiceProvider - environment-gated /_dawn/login|logout|user
    routes powering loginAs(), 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).