Skip to content

Conversation

@rezwanahmedsami
Copy link
Collaborator

Add new tasks required for Screenshots Gallery implementation:

Phase 1 - Core:

  • Screenshot Capture on Failure: Implement page.screenshot() in PlaywrightRunner on action failure, save to filesystem with configurable directory, return path in ActionResult

Phase 3 - API:

  • Screenshot Serving Endpoint: Add GET /api/v1/runs/:id/actions/:actionId/screenshot with JWT auth via query param, CORS headers, update testRunProcessor to save screenshot paths to database

Phase 4 - Web (updated):

  • Screenshots Gallery: Updated with explicit dependencies and detailed requirements (thumbnail grid, lightbox, lazy loading)

Updated summary table: 91 total tasks (+2), 26 todo (+2)

Add new tasks required for Screenshots Gallery implementation:

Phase 1 - Core:
- Screenshot Capture on Failure: Implement page.screenshot() in
  PlaywrightRunner on action failure, save to filesystem with
  configurable directory, return path in ActionResult

Phase 3 - API:
- Screenshot Serving Endpoint: Add GET /api/v1/runs/:id/actions/:actionId/screenshot
  with JWT auth via query param, CORS headers, update testRunProcessor
  to save screenshot paths to database

Phase 4 - Web (updated):
- Screenshots Gallery: Updated with explicit dependencies and detailed
  requirements (thumbnail grid, lightbox, lazy loading)

Updated summary table: 91 total tasks (+2), 26 todo (+2)
- Add screenshotDir and screenshotMode options to RunOptions
- Implement captureScreenshot() method in PlaywrightRunner
- Support modes: on-failure, always, never
- Save screenshots as run-{timestamp}-{actionIndex}-{actionId}.png
- Add screenshotPath to ActionResult for captured screenshots
- Safe capture with try/catch for closed page scenarios
- Add CLI options: --screenshot, --screenshot-mode, --screenshot-dir
- Add 22 unit tests and 8 integration tests for screenshot capture
- Update TASKS.md to mark task as complete
- Add GET /api/v1/runs/:id/actions/:actionId/screenshot endpoint
- Support JWT auth via query param for <img> tag compatibility
- Add CORS headers and Cache-Control for cross-origin loading
- Add findActionByRunIdAndActionId method to RunRepository
- Update testRunProcessor to extract screenshot paths from result
- Add screenshotMode field to createRunSchema (on-failure/always/never)
- Pass screenshotMode from API request to job processor
- 6 new unit tests for screenshot endpoint
- 1,157 total tests passing

Tested manually:
- Created run with screenshotMode: always
- 22/22 screenshots captured successfully
- Screenshot endpoint returns PNG with correct headers
- Content-Type: image/png, Cache-Control: private, max-age=3600
- Add ScreenshotGallery component with thumbnail grid and lazy loading
- Add Lightbox modal with zoom, pan, keyboard navigation, and download
- Add ScreenshotIndicator component for actions table
- Add screenshot mode selector (On Failure/Always/Never) to run dialog
- Fix screenshotEnabled parameter in API client
- Integrate gallery into run details page
- Add screenshot column to run actions table
@rezwanahmedsami rezwanahmedsami merged commit aea812a into main Feb 2, 2026
7 checks passed
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.

1 participant