Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: To allow passing in a callback function to assertTableActionDataSet and assertTableBulkActionDataSet #15078

Merged
merged 6 commits into from
Dec 14, 2024

Conversation

chester-sykes
Copy link
Contributor

@chester-sykes chester-sykes commented Dec 13, 2024

Description

This PR refactors the assertTableActionDataSet and assertTableBulkActionDataSet so that you can pass in a callback to get access to the data that is currently set in the table action, like you can with the assertFormSet.

I think this feature will be useful for testing the FileUpload as currently I don't know how you would test that a image is set with assertTableActonDataSet because it uses UUIDs so you can't assert that the right file has been set.

Also when I ran composer cs, it removed this use Filament\Support\Assets\AlpineComponent; from packages/tables/src/TablesServiceProvider.php, I checked and I couldn't see it being used anywhere. I commited it even though its not related to my PR, not sure if I should have. If not then please let me know and I'll revert.

Visual changes

No visual changes.

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@chester-sykes chester-sykes changed the title Refactor: To allow passing in a callback function to assertTableActonDataSet' and assertTableBulkActionDataSet` Refactor: To allow passing in a callback function to assertTableActonDataSet and assertTableBulkActionDataSet Dec 13, 2024
@danharrin danharrin added the enhancement New feature or request label Dec 14, 2024
@danharrin danharrin added this to the v3 milestone Dec 14, 2024
@danharrin
Copy link
Member

Thanks

@danharrin danharrin merged commit 74548a2 into filamentphp:3.x Dec 14, 2024
10 checks passed
@chester-sykes chester-sykes changed the title Refactor: To allow passing in a callback function to assertTableActonDataSet and assertTableBulkActionDataSet Refactor: To allow passing in a callback function to assertTableActionDataSet and assertTableBulkActionDataSet Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants