Closed bsdnomad closed 11 months ago
I'd accept a PR that fixes this.
Given the package is not recommended to be used on a production application I wonder how relevant it would be to run tests with it being enabled.
Maybe we should just add a note in the README to set the package config to disabled in the base TestCase.
I'm happy to hear thoughts on this.
Hi guys,
Actually that comes due to the way Inertia assertions work. Basically it expects a View object in the response while, after placing respective comments in the template contents that becomes a string, respectively 'page' attribute is missing and the assertion functions chain throws an exception the response is not a view. I'll dig deeper and try to suggest a solution.
Dear contributor,
because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.
What happened?
Hi there,
I was headbanging a lot why some tests performing Inertia assertions began failing accidentally until I figured out it goes always like that when blade comments are enabled.
Disabling the extension in config/blade-comments.php allowing all the tests to pass successfully. Hope that is going to save some time and prevent a lot of troubles to anybody impacted by the issue.
How to reproduce the bug
Using a vanilla Jetstream + Inertia + Vue starter kit application installed do the following:
The results are reproucible also with just any non-nested page component.
web.php:
app/Http/Controllers/MyInvokableController.php:
tests/Feature/MyInvokableControllerTest.php:
resources/js/Pages/Show.vue:
Package Version
1.0.1
PHP Version
8.1
Laravel Version
10
Which operating systems does with happen with?
Linux
Notes
No response