| Package Data | |
|---|---|
| Maintainer Username: | Roquie |
| Maintainer Contact: | roquie0@gmail.com (roquie) |
| Package Create Date: | 2017-03-07 |
| Package Last Update: | 2021-02-04 |
| Language: | HTML |
| License: | MIT |
| Last Refreshed: | 2025-11-12 03:04:19 |
| Package Statistics | |
|---|---|
| Total Downloads: | 336,533 |
| Monthly Downloads: | 3,430 |
| Daily Downloads: | 77 |
| Total Stars: | 41 |
| Total Watchers: | 2 |
| Total Forks: | 11 |
| Total Open Issues: | 2 |
Select2.js support for the Laravel Dusk testing. Support Select2 v3 and Select2 v4 versions.
P.S. This gif slow because I forgot to set third parameter to one or zero.
composer require --dev roquie/laravel-dusk-select2
Now, u may use it!
roquie/laravel-dusk-select2 dependency to ^1.0 in your composer.json file. + .select2 from first parameter, also see last parameter.For default select2:
$browse->select2('@selector');
@selector class name of your <select> html tag.
If value not passed, it be selected automatically.
Another way, if need concrete value:
$browse->select2('@selector', 'you_text_value');
For multiple mode usage like this:
$browse->select2('@selector', ['foo', 'bar'], 5);
// the last parameter - count of seconds for ajax loading before choice item.
+ select2 out of the box?.@taylorotwell don't kill the kittens, Laravel Dusk also should be used outside of the framework.
cd tests
php -S localhost:8888 tests/index.html
vendor/bin/phpunit
If u using MacOS, before running phpunit, run vendor/laravel/dusk/bin/chromedriver-mac.