-
Notifications
You must be signed in to change notification settings - Fork 4
Comparing changes
Open a pull request
base repository: reactiflux/mod-bot
base: main
head repository: reactiflux/mod-bot
compare: vc-e2e-tests
- 14 commits
- 25 files changed
- 2 contributors
Commits on Jul 31, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 7762e9b - Browse repository at this point
Copy the full SHA 7762e9bView commit details -
Add Playwright e2e testing setup
- Install @playwright/test dependency - Create playwright.config.ts with sensible defaults - Add test directory structure with happy path tests: - Landing page functionality and navigation - Health check endpoint - Basic routing and auth flows - Add npm scripts for running e2e tests - Configure to use dev-client server for testing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 15cfaf1 - Browse repository at this point
Copy the full SHA 15cfaf1View commit details -
Fix Playwright tests to prevent hanging on Discord OAuth redirects
- Replace navigation tests that follow Discord OAuth redirects with href validation - Add route interception to capture OAuth URLs without external navigation - Create dedicated auth-flow.spec.ts with proper OAuth testing - Update health check test to handle both OK and ERROR responses - Remove aggressive timeouts that could cause issues - Use proper assertions that don't rely on external app behavior This prevents the Discord app from opening during tests and eliminates hanging processes while still validating the OAuth flow works correctly. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e62e02d - Browse repository at this point
Copy the full SHA e62e02dView commit details
Commits on Aug 1, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 70c7d6c - Browse repository at this point
Copy the full SHA 70c7d6cView commit details -
Add programmatic authentication for e2e tests
- Create auth helper that programmatically creates test users and sessions - Add authenticated user flow tests that bypass Discord OAuth - Update auth-flow tests to focus on route protection without external redirects - Implement proper test cleanup to avoid database pollution - Test authenticated routes, logout functionality, and session management This enables comprehensive e2e testing of authenticated features without requiring actual Discord OAuth flow or external app interactions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f7eda49 - Browse repository at this point
Copy the full SHA f7eda49View commit details -
Add real Discord OAuth token capture for e2e testing
- Create interactive auth capture script that guides user through real Discord OAuth - Add real-auth helper to use captured tokens in tests - Create comprehensive authenticated flow tests using real Discord tokens - Add npm script 'capture-auth' to run the auth capture process - Include detailed README with setup and usage instructions - Ignore test-auth-data.json to prevent committing real tokens This enables testing authenticated features with real Discord API calls while maintaining security and avoiding external app conflicts. Usage: 1. npm run capture-auth (one-time setup) 2. FORCE_AUTH_TESTS=1 npm run test:e2e (run authenticated tests) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c5d4c39 - Browse repository at this point
Copy the full SHA c5d4c39View commit details -
Fix Playwright environment variable loading
- Add dotenv import to playwright.config.ts to load .env file - Set explicit cwd and env for webServer to ensure proper environment - Use dotenv-cli in npm scripts to explicitly load .env - Add environment troubleshooting to README - Install dotenv-cli for command line environment loading This ensures Playwright tests have access to Discord credentials and other environment variables from the .env file. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ee0b08e - Browse repository at this point
Copy the full SHA ee0b08eView commit details -
Add graceful port fallback for server startup
- Add port utility functions for checking availability and finding open ports - Update dev/prod servers to automatically fallback to next available port - Add blank slate home route accessible via top-left Euno icon - Enhance Playwright config to handle dynamic port allocation - Improve developer experience with clear port conflict messaging 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e31bd04 - Browse repository at this point
Copy the full SHA e31bd04View commit details -
Configuration menu - View commit details
-
Copy full SHA for 186ffcc - Browse repository at this point
Copy the full SHA 186ffccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c9154e - Browse repository at this point
Copy the full SHA 0c9154eView commit details
Commits on Aug 2, 2025
-
Add working e2e session borrowing implementation
Implements session borrowing from live Discord OAuth sessions in the database for e2e testing without requiring real OAuth setup. Key features: - Borrows live sessions with Discord tokens from local database - Creates new test session cookies from borrowed session data - Handles expired tokens gracefully with fallback behavior - 4 comprehensive e2e tests demonstrating the approach - Unit tests for database query logic - TypeScript type safety with proper type annotations - Cookie parsing that handles HttpOnly and other attributes Files: - tests/helpers/simple-session-borrowing.ts - Core working implementation - tests/e2e/verified-session-borrowing.spec.ts - 4 working e2e tests - tests/session-borrowing.test.ts - Unit tests for DB queries - tests/e2e/working-session-test.spec.ts - Original proof-of-concept - tests/e2e/simple-session-test.spec.ts - Basic test scaffold All tests pass, TypeScript types pass, and linting passes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 52033b6 - Browse repository at this point
Copy the full SHA 52033b6View commit details -
Improve auth testing infrastructure and fix cookie parsing
Updates existing auth helpers and test infrastructure to support the new session borrowing system: Auth Helper Improvements: - createTestUser() now automatically uses real Discord tokens when available - createTestAdmin() now automatically uses real Discord tokens when available - Added createRealTestUser() that requires real tokens (throws if unavailable) - Added fallback warnings when using mock data - Maintains backward compatibility with existing tests Cookie Parsing Fixes: - Fixed cookie parsing in all e2e tests to handle proper cookie format - Handles cookies with multiple = signs correctly - Prevents "Invalid cookie format" errors Capture Auth Script Enhancements: - Added direct SQLite database access to avoid complex imports - Better error handling and module loading - Added test-session-borrowing npm script - Cleaned up unused variable declarations Documentation: - Updated test README with new auth helper usage patterns - Documents automatic real token usage vs manual requirements - Explains benefits of the new approach All existing tests continue to work with enhanced functionality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c677c2f - Browse repository at this point
Copy the full SHA c677c2fView commit details -
Fix unused variables in capture-auth script
Removes unused variable declarations that were causing linting warnings. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cc060d3 - Browse repository at this point
Copy the full SHA cc060d3View commit details -
Add enhanced session borrowing helper with advanced features
Provides more sophisticated session borrowing capabilities beyond the simple implementation: Features: - Comprehensive session filtering and search options - Token validation with Discord API calls - Session age and freshness filtering - Mock user creation with fallback behavior - Captured auth data integration - Type-safe interfaces for all session data Interfaces: - LiveSessionInfo: Complete session metadata with Discord token details - LiveSessionOptions: Flexible filtering options for session selection Functions: - findActiveSessionsInDb(): Query sessions with advanced filtering - createTestUserWithFallback(): Multi-tier auth fallback (live -> captured -> mock) - validateDiscordToken(): Real Discord API validation - Various utility functions for session management This complements the simple-session-borrowing.ts for more complex testing scenarios. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d10f730 - Browse repository at this point
Copy the full SHA d10f730View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...vc-e2e-tests