The RefreshDatabase trait is super useful for maintaining a clean database for each feature test.
Recently, I ran into an issue with full-text indexes that prevented me from using that trait though.
I would create my data in the test, then exercise my endpoint which used Laravel's whereFullText method, but the search would return no results.
This is because the full-text index is not updated until the transaction is committed.
So that won't play nice with the RefreshDatabase trait, which wraps each test in a transaction that stays uncommitted throughout the test execution and then is rolled back at the end of the test.
The solution in this case is to use the DatabaseMigrations trait instead of RefreshDatabase for these tests that require full-text index searching.
This trait is a little bit slower since it runs the migrations before each test and rolls them back afterward, but it ensures that the full-text index is properly updated and your searches will work as expected.
Here to help,
Joel
P.S. Next time you bump into a weird issue and you aren't sure how to solve it, remember I'm here to help.