Fix Filament action imports, grid calculations, and refactor test mocks to fakes in Report Builder#351
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
…, and CSS syntax Co-authored-by: nielsdrost7 <47660417+nielsdrost7@users.noreply.github.com>
nielsdrost7
left a comment
There was a problem hiding this comment.
@copilot I prefer faking over mocking.
Any changes required?
Co-authored-by: nielsdrost7 <47660417+nielsdrost7@users.noreply.github.com>
No changes required - the code now uses Changes in commit eaa747f:
Both tests now interact with the real repository using Laravel's Storage fake, providing better integration test coverage. |
Addresses feedback from #349 review: incorrect Filament action namespace usage, grid snapping calculation bug, test mock method mismatch, and Tailwind v4 syntax migration. Additionally refactors tests to use Storage fakes instead of mocks per project guidelines.
Changes
ReportBlocksTable.php
Filament\Tables\Actions\*instead ofFilament\Actions\*(page-level vs table-level)->recordActions()with->actions()for correct table APIarray $dataparameter from DeleteAction closureGridSnapperService.php
$xin width calculation instead of unclamped$position->getX()ReportTemplateServiceTest.php
Storage::fake('report_templates')following project guideline "Prefer Fakes and Fixtures over Mocks"ReportTemplateFileRepositoryinstance with faked storage layerit_persists_blocks()now validates actual file creation and content using Storage assertionsit_loads_blocks()now creates test fixtures usingStorage::put()instead of mocking return valuesinvoiceplane.css
!bg-primary-700→bg-primary-700!✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.