Skip to content

Conversation

@karolswdev
Copy link
Owner

Summary

Describe the change. Link issues.

Type of change

  • Feature
  • Bug fix
  • Chore / CI / Docs

How to test

Steps for reviewers to validate locally.

Checklist

  • CI green
  • No secrets added
  • Docs updated (if needed)

This commit includes multiple fixes to enable the screenshot generation workflow to run successfully:

1. **Workflow Configuration** (.github/workflows/generate-screenshots.yml)
   - Added pull_request trigger for main/master branches
   - Workflow now triggers on PRs when frontend files change

2. **Backend Fixes** (backend/src/config/sentry.js)
   - Fixed Sentry handlers to return no-op middleware when Sentry DSN is not configured
   - Prevents crashes when Sentry is disabled in test environment

3. **Frontend Configuration** (frontend/vite.config.ts)
   - Configured Vite to run on port 3000 (matching Playwright expectations)
   - Added API proxy to backend on port 3001

4. **Playwright Configuration** (frontend/playwright.config.ts)
   - Added Chrome launch args for containerized environments (--no-sandbox, --disable-setuid-sandbox, etc.)
   - Configured for better compatibility with CI/CD environments

5. **Test Fixes** (frontend/e2e/generate-screenshots.spec.ts)
   - Fixed ES module __dirname issue using fileURLToPath
   - Ensures screenshot directory path is correctly resolved

6. **Database Seeders**
   - Updated seed-test-data.js to use correct database paths
   - Partially updated seeder schema to match database (users table)

These changes enable the screenshot workflow to run in GitHub Actions and generate user guide screenshots automatically.
- Removed --single-process and --disable-web-security flags that cause browser crashes
- Updated test to use storageState for better auth session management
- Added .auth directory to gitignore for auth tokens
- Improved error handling with try-catch for visibility checks
- Fixed ES module compatibility issues

These changes improve test stability, especially in CI/CD environments like GitHub Actions.
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.

3 participants