madbob / dusk-utils
A few utilities for unit testing with Laravel Dusk.
0.1.0
2021-11-14 09:39 UTC
Requires
- laravel/dusk: ^6.0
This package is auto-updated.
Last update: 2024-10-14 15:21:24 UTC
README
A few utilities for unit testing with Laravel Dusk.
typeAtXPath($expression, $value)
: similar to the nativetype
but uses a XPath expression as targetassertInputValueAtXPath($expression, $value)
: similar to the nativeassertInputValue
but uses a XPath expression as targetassertSeeAtXPath($expression, $value)
: similar to the nativeassertSee
but uses a XPath expression as targetscrollView($selector)
: similar to the nativescrollIntoView
but scrolls the element at the end of the viewport, not the beginningscrollTop()
: scrolls the viewport to the topscrollBottom()
: scrolls the viewport to the bottommainScreenshot($filename)
: similar to the nativescreenshot
but scrolls the viewport to the top before taking the shot
Installation
composer require madbob/dusk-utils
Then in the boot()
function of your preferred Service Provided (AppServiceProvider?) add the line
\MadBob\DuskUtils\Utils::init();
to init the extra macros.