Skip to content

Conversation

@konard
Copy link
Collaborator

@konard konard commented Oct 25, 2025

Summary

This PR adds comprehensive integration tests to verify that we can download markdown versions and screenshots of the GitHub README page using all supported browser engines (Puppeteer and Playwright).

Changes Made

  1. New Test File: tests/integration/github-readme.test.js

    • 11 comprehensive tests covering markdown download and screenshot capture
    • Tests for both Puppeteer and Playwright engines
    • Engine parity tests to ensure consistent behavior across both engines
  2. Browser Abstraction Layer Fix: src/browser.js

    • Fixed Playwright adapter to properly handle browser contexts
    • Improved setUserAgent handling for Playwright (which doesn't support it the same way as Puppeteer)
    • Added context management to ensure proper cleanup
  3. Jest Configuration Update: jest.config.mjs

    • Added integration tests to test matching patterns

Test Coverage

Markdown Download Tests:

  • ✅ Puppeteer can download and convert GitHub README to markdown
  • ✅ Playwright can download and convert GitHub README to markdown
  • ✅ Both engines preserve README structure (headings, links, lists)

Screenshot Download Tests:

  • ✅ Puppeteer can capture screenshot of GitHub README
  • ✅ Playwright can capture screenshot of GitHub README
  • ✅ Screenshots have expected dimensions and valid PNG format

Engine Parity Tests:

  • ✅ Both engines can fetch GitHub README content
  • ✅ Both engines produce valid markdown from GitHub README
  • ✅ Both engines produce valid screenshots of GitHub README

Test Results

All 11 tests pass successfully:

  • Test execution time: ~190 seconds
  • All engines tested against real GitHub README page
  • PNG signature validation included
  • Markdown structure validation included

Fixes

Fixes #5


🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: undefined
@konard konard self-assigned this Oct 25, 2025
… downloads

- Add comprehensive test suite for GitHub README page in all supported browser engines
- Test markdown download and conversion with both Puppeteer and Playwright engines
- Test screenshot capture with both Puppeteer and Playwright engines
- Add engine parity tests to ensure both engines produce valid results
- Fix Playwright browser adapter to properly handle browser context
- Update jest.config.mjs to include integration tests in test matching patterns

All 11 new tests pass successfully, verifying that both Puppeteer and Playwright
can download and convert the GitHub README page to markdown and capture screenshots.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard marked this pull request as ready for review October 25, 2025 08:27
@konard konard changed the title [WIP] Add test that we can actually download markdown version and screenshot of GitHub README page in all our supported engines Add test that we can actually download markdown version and screenshot of GitHub README page in all our supported engines Oct 25, 2025
@konard
Copy link
Collaborator Author

konard commented Oct 25, 2025

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

📎 Log file uploaded as GitHub Gist (343KB)
🔗 View complete solution draft log


Now working session is ended, feel free to review and add any feedback on the solution draft.

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.

Add test that we can actually download markdown version and screenshot of GitHub README page in all our supported engines

2 participants