How to test list table search in translatable (via spatie) field with pest
I have the following test:
So if the first page title is : - the test passes
but if it is: - the test fails
P.S. locale is EN by default
Can you help me what is going on? And how to proper test it?
2 Replies
Try just ‘title’ you shouldn’t have to specify the ->en since spatie package will automatically query the correct language based on locale.
You may need to manually set the locale for tests though. Not 100% sure. Unless the test suite is booting up an application.
Does not return any records.
If I dump I get 'en'