Add feature test coverage for home + PDF endpoints#113
Open
anchovie91471 wants to merge 1 commit into
Open
Conversation
Establishes a minimal feature-test safety net before the Laravel 12 upgrade so the verification signal isn't purely manual smoke. Coverage (11 tests, 53 assertions): - SmokeTest: artisan about + package:discover boot checks. These reproduce the symptom that PR #112 fixed and double as a regression net for any future symfony bump. - HomeTest: Inertia screen 1, screen 2 (with fixture-backed JSON fetch), and screen-1-on-error paths. - PdfTest: default download, all three grouping strategies (via DataProvider), CJK language path (Noto JP font), and Google Sheets source (the URL transform at Controller.php:39 routes through sheets.googleapis.com so Http::fake matches the outbound URL). All outbound HTTP is faked via Http::fake — tests are offline and deterministic. The fixture (tests/Fixtures/meetings.json) is hand-crafted to hit explicit cardinality requirements: 25 meetings across all 7 days, 4 hierarchical regions + 4 flat city/state entries, 10 distinct type codes including 2 TC meetings that exercise the "Temporarily Closed" filter at Controller.php:540 (previously untested), and 1 CJK name for the Noto JP font path. Tests use PHP 8 attributes (#[Test], #[DataProvider]) for forward compatibility with PHPUnit 11 (PR-3). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Establishes a minimal feature-test safety net before the Laravel 12 upgrade (PR-2) so the verification signal there isn't purely manual smoke. PR-2 will be the upgrade. 2 PRs to make review easier.
11 tests, 53 assertions, all green locally:
tests/Feature/SmokeTest.phpartisan about+package:discoverboot. Reproduces the symptom PR #112 fixed; doubles as a regression net for future symfony bumps.tests/Feature/HomeTest.phptests/Feature/PdfTest.php#[DataProvider]), CJK language path (Noto JP font), and Google Sheets source.All outbound HTTP faked via
Http::fake()— tests run offline and deterministic with no network orGOOGLE_API_KEYrequirement.Fixture (
tests/Fixtures/meetings.json)Hand-crafted to exercise specific code paths:
Mississippi > North/South > Tupelo/Oxford/Jackson/Gulfport) + 4 flat city/state entries (Memphis TN, New Orleans LA) — exercises both branches ofextractRegions()(Controller.php:154-188)Controller.php:540(previously untested)朝の集い) for the Noto JP font path