diff --git a/dusk.md b/dusk.md index cc0cb689cd..053e4a5f8c 100644 --- a/dusk.md +++ b/dusk.md @@ -1414,6 +1414,7 @@ Dusk provides a variety of assertions that you may make against your application [assertDontSeeIn](#assert-dont-see-in) [assertSeeAnythingIn](#assert-see-anything-in) [assertSeeNothingIn](#assert-see-nothing-in) +[assertCount](#assert-count) [assertScript](#assert-script) [assertSourceHas](#assert-source-has) [assertSourceMissing](#assert-source-missing) @@ -1757,6 +1758,15 @@ Assert that no text is present within the selector: $browser->assertSeeNothingIn($selector); ``` + +#### assertCount + +Assert that elements matching the given selector appear the specified number of times: + +```php +$browser->assertCount($selector, $count); +``` + #### assertScript @@ -2505,6 +2515,16 @@ class ExampleTest extends DuskTestCase } ``` +The `component` method may be used to retrieve a browser instance scoped to the given component: + +```php +$datePicker = $browser->component(new DatePickerComponent); + +$datePicker->selectDate(2019, 1, 30); + +$datePicker->assertSee('January'); +``` + ## Continuous Integration