kiana1300
How to test SelectColumn in a table?
I am trying to test my SelectColum that when I change a role, that user's role is updated in the database. From the testing docs https://filamentphp.com/docs/3.x/tables/testing#select-columns , it doesn't seem like this type of functionality is testable through a method much like a filter can be applied with ... I'm wondering if there is a method such as that I just can't find in the docs/through the ide.
Here is a barebones test:
Here is my code snippet
1 replies
Testing ImportAction within a table headerActions
Scenario: I have a livewire component using filament table with the headerActions of ImportAction. I have a csv file that when uploaded, will update the database with the values within in.
A snippet of my table:
My test
Problem: when I
->callTableAction('import_choices')
, I know I can pass through the $record, $data, $arguments from drilling into it, but I'm not too sure what I need to pass in order to get my import, and see that the $this->field->choice_id
is set.
When I run my test currently, I don't get any errors but my Import count is 0.
How do I test this import?2 replies