Skip to content

Add initial Pest unit and feature test suite#28

Open
thinkstylestudio wants to merge 3 commits into
developfrom
feature/pest-unit-tests-21ea
Open

Add initial Pest unit and feature test suite#28
thinkstylestudio wants to merge 3 commits into
developfrom
feature/pest-unit-tests-21ea

Conversation

@thinkstylestudio
Copy link
Copy Markdown

@thinkstylestudio thinkstylestudio commented May 20, 2026

Closes #5

Summary

Adds a foundational Pest test suite with proper test environment configuration and shared helpers for roles and Filament authentication.

Test infrastructure

  • phpunit.xml: In-memory SQLite database and APP_KEY for isolated, keyless CI runs
  • tests/Pest.php: RefreshDatabase for feature tests, plus helpers:
    • seedRolesAndPermissions()
    • createUserWithRole()
    • actingAsFilamentUser()

Unit tests

  • RolesEnum cases, labels, and Filament colors

Feature tests

  • HTTP: Welcome page
  • Auth: Dashboard guest redirect and authenticated access
  • Models: User panel access, impersonation rules, MFA helpers, avatar URL
  • Observers: Default editor role assignment
  • Mail: InviteUser subject and signed registration URL
  • Filament: Users list (deferred table loading + search), invite user action (direct + Livewire)

Verification

php artisan test

28 tests, 51 assertions — all passing.

Justin Rhodes and others added 3 commits August 11, 2025 21:01
Configure in-memory SQLite and APP_KEY for the test environment.
Add shared Pest helpers for seeding roles and Filament authentication.

Cover roles enum, user model behavior, user observer, invite mail,
welcome route, dashboard access, and Filament user list/invite flows.

Closes #5

Co-authored-by: Theron Smith <theron+github@thinkstylestudio.com>
@thinkstylestudio thinkstylestudio marked this pull request as ready for review May 20, 2026 06:47
@thinkstylestudio thinkstylestudio self-assigned this May 20, 2026
@thinkstylestudio thinkstylestudio changed the base branch from main to develop May 20, 2026 07:15
@dpellenwood dpellenwood requested a review from travisred May 22, 2026 15:25
Copy link
Copy Markdown

@dpellenwood dpellenwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pest Unit Tests

4 participants