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 57 forks source link

Sweep: write tests #87

Closed curtisdelicata closed 6 months ago

curtisdelicata commented 6 months ago

Details

Write unit tests for all files under app/Filament/Resources/

Use pest as per filament 3 documentation unless phpunit is preferred

Checklist - [X] Create `tests/Pest.php` ✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/b505cec171504af075cfaf4f38d36f0623a2c839 [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_tests/tests/Pest.php) - [X] Running GitHub Actions for `tests/Pest.php` ✓ [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_tests/tests/Pest.php) - [X] Create `tests/Unit/Filament/Resources/PublicationResourceTest.php` ✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/19cb6ac9b1902038c1c3a81ef4ff634681265da5 [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_tests/tests/Unit/Filament/Resources/PublicationResourceTest.php) - [X] Running GitHub Actions for `tests/Unit/Filament/Resources/PublicationResourceTest.php` ✓ [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_tests/tests/Unit/Filament/Resources/PublicationResourceTest.php) - [X] Create `tests/Unit/Filament/Resources/PersonResourceTest.php` ✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/0398d106dc6d8523baba5d4f68308bcafca5915b [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_tests/tests/Unit/Filament/Resources/PersonResourceTest.php) - [X] Running GitHub Actions for `tests/Unit/Filament/Resources/PersonResourceTest.php` ✓ [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_tests/tests/Unit/Filament/Resources/PersonResourceTest.php) - [X] Modify `composer.json` ✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/1dade298dc47886db8f95a52c24e7516f6e7aa8e [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_tests/composer.json#L1-L1) - [X] Running GitHub Actions for `composer.json` ✓ [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_tests/composer.json#L1-L1) - [X] Modify `phpunit.xml` ✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/6e364ce3cf54f991a32b7aed5079eda8f2749b52 [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_tests/phpunit.xml#L3-L3) - [X] Running GitHub Actions for `phpunit.xml` ✓ [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_tests/phpunit.xml#L3-L3) - [X] Create `tests/Unit/Filament/Resources/FamilyResourceTest.php` ✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/8b041cddf11a8b7bbd5c16939f10b3ff85a3977b [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_tests/tests/Unit/Filament/Resources/FamilyResourceTest.php) - [X] Running GitHub Actions for `tests/Unit/Filament/Resources/FamilyResourceTest.php` ✓ [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/write_tests/tests/Unit/Filament/Resources/FamilyResourceTest.php)
sweep-ai[bot] commented 6 months ago

🚀 Here's the PR! #101

See Sweep's progress at the progress dashboard!
Sweep Basic Tier: I'm using GPT-4. You have 3 GPT-4 tickets left for the month and 1 for the day. (tracking ID: a068746459)

For more GPT-4 tickets, visit our payment portal. For a one week free trial, try Sweep Pro (unlimited GPT-4 tickets).

[!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 4b5b725
Checking composer.json for syntax errors... ✅ composer.json has no syntax errors! 1/1 ✓
Checking composer.json for syntax errors...
✅ composer.json 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/e91fd9ec1b3aac84d075239e7810fa474bac516e/app/Filament/Resources/PublicationResource.php#L1-L81 https://github.com/liberu-genealogy/genealogy-laravel/blob/e91fd9ec1b3aac84d075239e7810fa474bac516e/phpunit.xml#L1-L28 https://github.com/liberu-genealogy/genealogy-laravel/blob/e91fd9ec1b3aac84d075239e7810fa474bac516e/tests/Unit/ExampleTest.php#L1-L14 https://github.com/liberu-genealogy/genealogy-laravel/blob/e91fd9ec1b3aac84d075239e7810fa474bac516e/tests/Feature/ExampleTest.php#L1-L17

Step 2: ⌨️ Coding

Ran GitHub Actions for b505cec171504af075cfaf4f38d36f0623a2c839:

Ran GitHub Actions for 19cb6ac9b1902038c1c3a81ef4ff634681265da5:

Ran GitHub Actions for 0398d106dc6d8523baba5d4f68308bcafca5915b:

--- 
+++ 
@@ -23,7 +23,8 @@
         "mockery/mockery": "^1.6",
         "nunomaduro/collision": "^8.0",
         "phpunit/phpunit": "^11.0",
-        "spatie/laravel-ignition": "^2.4"
+        "spatie/laravel-ignition": "^2.4",
+        "pestphp/pest": "^1.0"
     },
     "autoload": {
         "psr-4": {

Ran GitHub Actions for 1dade298dc47886db8f95a52c24e7516f6e7aa8e:

--- 
+++ 
@@ -10,6 +10,7 @@
         
         
             ./tests/Feature
+            ./tests
         
     
     

Ran GitHub Actions for 6e364ce3cf54f991a32b7aed5079eda8f2749b52:

Ran GitHub Actions for 8b041cddf11a8b7bbd5c16939f10b3ff85a3977b:


Step 3: 🔁 Code Review

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


🎉 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.