liberu-genealogy / genealogy-laravel

Full genealogy application using Laravel 11, PHP 8.3, Filament 3.2 and Livewire 3.5
https://www.liberu.net
MIT License
117 stars 60 forks source link

Write full test suite #12

Closed curtisdelicata closed 6 months ago

curtisdelicata commented 7 months ago

Write full tests set for all resource files under app/Filament/Resources/ following PHPUnit as standard?

Checklist - [X] Create `tests/Unit/Filament/Resources/AddrResourceTest.php` ✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/bbefc0631a336150e9cab71f66bed08aa84f06ad [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_full_test_suite/tests/Unit/Filament/Resources/AddrResourceTest.php) - [X] Running GitHub Actions for `tests/Unit/Filament/Resources/AddrResourceTest.php` ✓ [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_full_test_suite/tests/Unit/Filament/Resources/AddrResourceTest.php) - [X] Create `tests/Unit/Filament/Resources/AuthorResourceTest.php` ✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/cc7d0d50a2d1614c5522380c9163b00c98c0aecc [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_full_test_suite/tests/Unit/Filament/Resources/AuthorResourceTest.php) - [X] Running GitHub Actions for `tests/Unit/Filament/Resources/AuthorResourceTest.php` ✓ [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_full_test_suite/tests/Unit/Filament/Resources/AuthorResourceTest.php) - [X] Create `tests/Unit/Filament/Resources/ChanResourceTest.php` ✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/b3f67ce5ad6fc6feabcbffb37d71a55c4fe50be1 [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_full_test_suite/tests/Unit/Filament/Resources/ChanResourceTest.php) - [X] Running GitHub Actions for `tests/Unit/Filament/Resources/ChanResourceTest.php` ✓ [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_full_test_suite/tests/Unit/Filament/Resources/ChanResourceTest.php) - [X] Modify `phpunit.xml` ✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/d2620a3ab65d2f2c6017e043af307f086068cba9 [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_full_test_suite/phpunit.xml#L6-L13) - [X] Running GitHub Actions for `phpunit.xml` ✓ [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_full_test_suite/phpunit.xml#L6-L13) - [X] Modify `tests/Unit/ExampleTest.php` ✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/5a8f65bfbdf8691bb24c98172896bbd7cbfe98d1 [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_full_test_suite/tests/Unit/ExampleTest.php#L11-L13) - [X] Running GitHub Actions for `tests/Unit/ExampleTest.php` ✓ [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_full_test_suite/tests/Unit/ExampleTest.php#L11-L13)
sweep-ai[bot] commented 6 months ago

🚀 Here's the PR! #218

See Sweep's progress at the progress dashboard!
💎 Sweep Pro: I'm using GPT-4. You have unlimited GPT-4 tickets. (tracking ID: b5e4c37325)

[!TIP] I'll email you at genealogysoftwareuk@gmail.com when I complete this pull request!


Actions (click)

GitHub Actions✓

Here are the GitHub Actions logs prior to making any changes:

Sandbox logs for 7889494
Checking phpunit.xml for syntax errors... ✅ phpunit.xml has no syntax errors! 1/1 ✓
Checking phpunit.xml for syntax errors...
✅ phpunit.xml has no syntax errors!

Sandbox passed on the latest main, so sandbox checks will be enabled for this issue.


Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I think are relevant in decreasing order of relevance (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/liberu-genealogy/genealogy-laravel/blob/7889494ebaa8bcdc9c7b604f14d0652959ae5db8/tests/Unit/ExampleTest.php#L1-L14 https://github.com/liberu-genealogy/genealogy-laravel/blob/7889494ebaa8bcdc9c7b604f14d0652959ae5db8/phpunit.xml#L1-L28 https://github.com/liberu-genealogy/genealogy-laravel/blob/7889494ebaa8bcdc9c7b604f14d0652959ae5db8/config/octane.php#L157-L196 https://github.com/liberu-genealogy/genealogy-laravel/blob/7889494ebaa8bcdc9c7b604f14d0652959ae5db8/app/Filament/Resources/AddrResource.php#L1-L89 https://github.com/liberu-genealogy/genealogy-laravel/blob/7889494ebaa8bcdc9c7b604f14d0652959ae5db8/app/Filament/Resources/AuthorResource.php#L1-L81 https://github.com/liberu-genealogy/genealogy-laravel/blob/7889494ebaa8bcdc9c7b604f14d0652959ae5db8/app/Filament/Resources/ChanResource.php#L1-L82

Step 2: ⌨️ Coding

Ran GitHub Actions for bbefc0631a336150e9cab71f66bed08aa84f06ad:

Ran GitHub Actions for cc7d0d50a2d1614c5522380c9163b00c98c0aecc:

Ran GitHub Actions for b3f67ce5ad6fc6feabcbffb37d71a55c4fe50be1:

--- 
+++ 
@@ -29,3 +29,6 @@
         
     
 
+        
+            ./tests/Unit/Filament/Resources
+        

Ran GitHub Actions for d2620a3ab65d2f2c6017e043af307f086068cba9:

--- 
+++ 
@@ -8,6 +8,10 @@
 {
     /**
      * A basic test example.
+     *
+     * This test serves as a simple example of how to write tests in PHPUnit.
+     * For more comprehensive tests, especially for Filament resources,
+     * refer to the tests under tests/Unit/Filament/Resources/.
      */
     public function test_that_true_is_true(): void
     {

Ran GitHub Actions for 5a8f65bfbdf8691bb24c98172896bbd7cbfe98d1:


Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/write_full_test_suite.


🎉 Latest improvements to Sweep:
  • New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
  • Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
  • Use the GitHub issues extension for creating Sweep issues directly from your editor.

💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request.Something wrong? Let us know.

This is an automated message generated by Sweep AI.