{"repo":"sinnbeck/laravel-dom-assertions","free":true,"listed":false,"github":"https://github.com/sinnbeck/laravel-dom-assertions","clone":"git clone https://github.com/sinnbeck/laravel-dom-assertions.git","description":"Adds DOM assertions to laravels test responses","language":"PHP","stars":106,"topics":["laravel","pestphp","php","phpunit","testing"],"license":"MIT","category":"dev-tools","readme_excerpt":"DOM Assertions for Laravel This package provides some extra assertion helpers to use in HTTP Tests. If you have ever needed more control over your view assertions than assertSee , assertSeeInOrder , assertSeeText , assertSeeTextInOrder , assertDontSee , and assertDontSeeText then this is the package for you. Installation You can install the package via composer: Version 3.x and above requires PHP 8.1+ and Laravel 10+. Note: If you're using PHP 8.0 or Laravel 9, please use version 2.x: Table of contents - Asserting on elements - Asserting on forms - Asserting on selects - Asserting on datalists - Asserting on text - Quick existence checks - Usage with Livewire - Usage with Blade views and components - Method reference - Rector rules - Contributing - Credits - License Asserting on elements Use assertElementExists() (or its alias assertElement() ) on a test response to assert against the DOM. This package assumes a valid HTML document and will wrap your markup in , , and tags if they are missing. Called with no arguments, it simply asserts that a element was parsed: Pass a CSS selector as the first argument to target a specific element: The second argument is a closure that receives an AssertElement instance, which is where all of the fluent assertions below live. Asserting the element type Asserting attributes Assert that an attribute is present, optionally with a specific value: Or assert that it is absent: Asserting on children Confirm a child element exists: Narrow it down w","default_branch":null,"files":null,"tree":[],"storefront":"/r/sinnbeck","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sinnbeck/laravel-dom-assertions/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}