Skip to content

Add tests across the app - #78

Draft
travismolick wants to merge 1 commit into
mainfrom
test/app-coverage
Draft

travismolick wants to merge 1 commit into
mainfrom
test/app-coverage

Conversation

@travismolick

@travismolick travismolick commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Adds Pest feature and unit tests across the app:

  • Auth: login, OAuth callback, quick codes and rate limiting, logout (including ConCat logout from kiosks), banned users, lockdown
  • Volunteer time: check-in/out, kiosk rules, manual time entries, deleting entries
  • CRUD and permissions: users, events (including cloning departments), departments, time bonuses, rewards, reward claims, settings, kiosks
  • Attendee logs: visibility, gatekeepers, adding and removing users, registration level matching
  • Management panel and reports: every report's data, the audit log, ConCat application reports, exports
  • Time math: durations, bonus stacking, day boundary, earned hours, reward eligibility
  • Console commands, notifications (database and Telegram), every Telegram bot command, the webhook
  • ConCat API client (pagination, chunking) and the Socialite provider
  • Data shared with every Inertia page, and auth event logging

Test setup changes:

  • Tests\TestCase resets the static Setting and Kiosk caches before each test, because they otherwise carry over between tests and between requests in the same test.
  • Shared helpers are in tests/Pest.php: activateEvent(), userWithRole(), fakeTelegram(), timeEntryFor(), inertiaHeaders().

Depends on #77. Until it merges, 3 tests fail (2 in DepartmentTest, 1 in TimeBonusTest).

ExampleTest (/ returns 302) still fails. #67 removes it.

These tests also found two other bugs, fixed in #79: a crash in TimeEntry::calculateBonusTime() when bonuses aren't preloaded, and time entry form submits returning a 500.

@travismolick travismolick self-assigned this Oct 18, 2026
@travismolick
travismolick requested review from a team and Gawdl3y October 18, 2026 22:12
@travismolick travismolick added bug Something isn't working enhancement New feature or request blocked Another issue needs to be completed before this one labels Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Another issue needs to be completed before this one bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant