Testing with Tenancy
How can I make test with tenancy? Got this error now
Missing required parameter for [Route: filament.client.resources.tags.index] [URI: client/{tenant}/tags] [Missing parameter: tenant].
Solution:Jump to solution
not taking credit for everyone shard on that thread, thank you all β€οΈ
but feels this can help other if it marks as resolved and got indexed
it also looks like a good "trick" to add π
so I am copy it here...
4 Replies
Hi, have you found a solution? I have the same problem
Answered here: https://discord.com/channels/883083792112300104/1223555189420720180
Solution
not taking credit for everyone shard on that thread, thank you all β€οΈ
but feels this can help other if it marks as resolved and got indexed
it also looks like a good "trick" to add π
so I am copy it here
test render tenant owned records
set tenant for tests
Also, how would you go about testing a "Simple Resource" (where there is only a ManageRecords page)?
How would you test the CreateAction modals and test whether the record is created?
EDIT:
Okay, not sure if it's the best way, but this works (sorry example is in PHPUnit, I find Pest utterly confusing π )
Thank you all π