-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Tests fail possibly trying to load filters on non-PRO setup #345
Comments
Hello there! Thanks for opening your first issue on this repo! Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that. Backpack communication channels:
Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch. Thank you! -- |
I will add that I already had a As that's the case and the test I was running won't have been using my route, but PermissionManager's, I think this is more of a bug with PermissionManager rather than CRUD. I am assuming Testing against my version of the UserCrudController which is a standard one created using the backpack CLI, the test passes without the need to create the empty filter views. Are you able to move this issue to Laravel-Backpack/PermissionManager or should I recreate it on there? |
Hello there! Thanks for opening your first issue on this repo! Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that. Backpack communication mediums:
Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch. Thank you! -- |
Hello @nhunt290 thanks for the report and through explanation. Indeed, I can confirm that The main reason behind it, is that we can't add This is indeed a rather interesting use case, as the I am not sure what's the best way to handle this, using the package works, testing the package without pro is broken, but I am not seeing easy way out. Maybe an I will bring this to my colleagues attention so that we can try to figure out a better solution. I can't promise any deadlines, as I don't think this is high-priority. It's annoying indeed and prevents people from testing stuff while using the Permission Manager controllers. Thanks again for the detailed report and reproduction steps, they were very helpful 🙏 |
Hey @pxpm, thanks for the response. It is indeed an interesting use case. I wonder if maybe you could check inside the Perhaps with a combination of But, I understand it's not a high priority and that's OK, I'll leave it with you and the team to decide the best workaround :) |
Hey @nhunt290 that's what we are doing already: https://github.com/Laravel-Backpack/CRUD/blob/0e14e07c8449a20595b71ca70c3d6fdf628f3449/src/helpers.php#L395 and it's not the best solution as we just found out 🙃 You dont' get the paid features for free, we just don't test those inside Cheers |
Closing this issue as there has been no activity. Please feel free to reopen if needed or if you have additional information to provide. Thanks! |
Bug report
What I did
I have a UserCrudController with the method list method
I created a test to check my user.index route is accessible
What I expected to happen
I would expect the test to pass.
My test for the dashboard route passes just fine:
What happened
Test fails with the following exception:
Next Spatie\LaravelIgnition\Exceptions\ViewException: None of the views in the given array exist. in /Users/me/projects/b-f-l/vendor/laravel/framework/src/Illuminate/View/Factory.php:168
What I've already tried to fix it
The above exception comes from this method getting the first view that exists:
I added
dd($views)
above the $view declaration and ran the test again which returned:Is this related to previous issues like the following?
Laravel-Backpack/PageManager#123
Laravel-Backpack/CRUD#4196
For me, the last time I used backpack was v4 and I enjoyed it, so decided to use it again this time around. But after reading the above articles and checking the docs, it seems filters are now a PRO feature, which makes me think it's related the above issues in that the error message is not at all clear.
Just to try it, I created an empty
vendor/backpack/crud/filters/dropdown.blade.php
file. Ran the test again, and this time I dumped out:So, I did the same as above, created a blank select2.blade.php file, ran the test again, and this time it passed.
I don't really need filters, yet. I may do further down the line but not now, so I don't want to simply just upgrade for the sake of it.
Would there be a reason my tests seem to be trying to implement the filters? When I visit the user list page in the browser, I get no errors or any indication of it trying to load filters, so not sure why my test would be.
If this is a bug within Backpack, is there any way I can disable filters so they don't attempt to show? I don't really want to have to commit a couple of blank files if I don't have to.
Is it a bug in the latest version of Backpack?
After I run
composer update backpack/crud
the bug... is it still there? YesBackpack, Laravel, PHP, DB version
When I run
php artisan backpack:version
the output is:The text was updated successfully, but these errors were encountered: