laravel / dusk

Laravel Dusk provides simple end-to-end testing and browser automation.
https://laravel.com/docs/dusk
MIT License
1.87k stars 320 forks source link

Add `assertAttributeMissing()` method #1083

Closed ziadoz closed 7 months ago

ziadoz commented 7 months ago

It would be helpful to have an assertAttributeMissing() method for testing JS attribute toggling behaviour:

Currently you have to assert like this:

$this->assertNull($browser->element('div')->getAttribute('style'));

After this PR it's more succinct:

$this->assertAttributeMissing('div', 'style');
github-actions[bot] commented 7 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.