Testing lazy props #604
Replies: 4 comments 4 replies
-
Hey @claudiodekker, I know we've been asked about this before. Do we have a good solution for this yet? 🤔 |
Beta Was this translation helpful? Give feedback.
-
This way works for me: $this
->withHeaders([
'X-Inertia-Partial-Component' => 'Home/Home',
'X-Inertia-Partial-Data' => 'users',
])
->get('/')
->assertOK()
->assertInertia(fn(AssertableInertia $page) => $page
->has('users')
->etc()
); Credits: https://twitter.com/djgeisi/status/1637803207324778498 |
Beta Was this translation helpful? Give feedback.
-
Just arrived here looking for how to test lazy props - would be great if we could have |
Beta Was this translation helpful? Give feedback.
-
Bubbling this back to the top, is this something that is intended to have official support eventually? |
Beta Was this translation helpful? Give feedback.
-
Using the new test helpers
How would one assert that a prop exists when it's loaded via
Inertia::lazy()
?Beta Was this translation helpful? Give feedback.
All reactions