Testing RelationManagers #2189
Unanswered
titantwentyone
asked this question in
Help
Replies: 3 comments 4 replies
-
Ryan is working on some testing helpers for tables (and relation managers) right now :) |
Beta Was this translation helpful? Give feedback.
1 reply
-
@titantwentyone I have some news... |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For regular resources I usually employ two tests to ensure that my resources are rendering and pulling in the data needed. For example:
For relation managers, the second item is fine to replicate but the first is tricky as
RelationManager
doesn't have a static function forgetEloquentQuery
plus I'd need to pass in theownerRecord
somehow and I couldn't see anything equivalent. I know the test may seem like overkill but I do it for completeness and it's useful to run if the relationship changes for some reason. Also good to check it here than rely onassertSee
which I find a bit "flakey". Is there a method to retrieve the Eloquent query used from a RelationManager for use within a test like this?Beta Was this translation helpful? Give feedback.
All reactions