Closed ziadoz closed 6 months ago
Thanks for submitting a PR!
Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.
Pull requests that are abandoned in draft may be closed due to inactivity.
$browser->with(new DatePickerComponent, function ($browser) {
$browser->typeDate('2021-02-03 04:05:06');
})->with(new PrimaryCategoryPickerComponent, function ($browser) {
$browser->typeReference('FOO-123');
$browser->assertPickerSelected('FOO-123');
})->with(new SecondaryCategoryPickerComponent, function ($browser) {
$browser->typeReference('FOO-456');
$browser->assertPickerSelected('FOO-456');
});
Will this usage still be valid after this PR?
@crynobone Yes chaining like that should still work, and I've added a test for it.
This PR adds a new
component()
method that returns a browser instance scoped to a component. It works identically towith()
, only it doesn't require a closure, which can be more readable with many components on a page: