jcergolj / laravel-view-test-assertions Goto Github PK
View Code? Open in Web Editor NEWFew additional testing assertions for Laravel views
Few additional testing assertions for Laravel views
First off, this is such a great and needed idea for laravel testing. Thanks for sharing!
Next, I don't know if the API has changed or not? I didn't see anything different in the README.
I updated some other libraries in the project and ran a composer update. I hadn't checked to see if the versions of laravel-view-test-assertions changed or not but I'm guessing it has since the latest version is marked 24 days old (v1.0).
Now, the same tests, using the same forms, produces a failed test using assertFormHasTextInput
:
e.g.
->assertFormHasTextInput('name')
Form HTML:
<input wire:model="name" type="text" name="name" id="name" autofocus >
Failed test text:
Form does not have text field named name.
Failed asserting that an object is not empty.
at vendor/jcergolj/laravel-view-test-assertions/src/ViewTestAssertions.php:271
267▕ if ($value !== null && $type !== 'select') {
268▕ $filterable .='[value="'.$value.'"]';
269▕ }
270▕
➜ 271▕ Assert::assertNotEmpty($form->filter($filterable), $msg);
272▕
273▕ return $this;
274▕ };
275▕ }
+3 vendor frames
4 tests/Feature/SupportingDataControllerTest.php:147
Illuminate\Testing\TestResponse::__call("assertFormHasTextInput")
Using:
"jcergolj/laravel-view-test-assertions": "^1.0",
Let me know if any more information would be helpful.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.