Skip to content

Commit

Permalink
docs: add assertVisible and assertMissing details to the README file
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitry-vasileuski committed Feb 17, 2025
1 parent 51b5a3c commit 7dda61f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ Pause the test for the specified number of milliseconds.
- [assertAttribute](#assertattribute)
- [assertDontSee](#assertdontsee)
- [assertDontSee](#assertdontsee)
- [assertVisible](#assertvisible)
- [assertMissing](#assertmissing)

#### assertAttribute

Expand All @@ -92,3 +94,29 @@ test('assert does not see', function () {
->assertDontSee('we are a streaming service');
});
```

#### assertVisible

Assert that an element with the given selector is visible:

```php
test('assert visible', function () {
$url = 'https://laravel.com';

$this->visit($url)
->assertVisible('h1:visible');
});
```

#### assertMissing

Assert that an element with the given selector is hidden:

```php
test('assert missing', function () {
$url = 'https://laravel.com';

$this->visit($url)
->assertMissing('a.hidden');
});
```

0 comments on commit 7dda61f

Please sign in to comment.