Skip to content

Conversation

@coreyja
Copy link
Owner

@coreyja coreyja commented Aug 9, 2025

Summary

  • Set up Playwright testing infrastructure for end-to-end tests
  • Add GitHub Actions workflow for automated E2E testing in CI
  • Create OAuth mocking for GitHub authentication to enable testing without real auth

Changes

  • GitHub Actions Workflow: Added .github/workflows/playwright_tests.yml that runs E2E tests on push/PR
  • Playwright Configuration: Basic setup with Chrome browser and local server startup
  • OAuth Mocking: Mock GitHub OAuth flow for testing authentication without real credentials
  • Test Infrastructure: Created fixtures, helpers, and sample smoke tests
  • Package Setup: Configured e2e/ directory with dependencies and test scripts

Test Plan

  • Workflow can be triggered on push/PR
  • Tests can run locally with cd e2e && npm test
  • OAuth mocking allows testing auth flows
  • Verify CI runs successfully when PR is created

🤖 Generated with Claude Code

- Add Playwright configuration with OAuth mocking for GitHub auth
- Create reusable GitHub Actions workflow for E2E tests  
- Add basic smoke tests as a starting point
- Configure test infrastructure with fixtures and helpers

Add required environment variables to Playwright CI workflow

The server requires several environment variables to start up. Added fake/test values for all required env vars so the server can start during E2E tests.
Added DISCORD_BOT_DISABLED=true to the playwright_tests.yml workflow to prevent the server from attempting to connect to Discord during E2E tests. This eliminates the need for a real Discord token in CI.
Refactored Discord setup to be optional, allowing the server to run without a Discord token configured. This enables CI/E2E tests to run without requiring Discord integration.

Changes:
- discord::setup() now returns Option<DiscordSetup> instead of Result<DiscordSetup>  
- AppState.discord changed from DiscordClient to Option<DiscordClient>
- All Discord-dependent code now checks if Discord is configured before use
- Jobs and tools gracefully skip Discord operations when not configured
- Fixed test helpers to handle optional Discord client
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.

2 participants