Skip to content

feat: Enable all Playwright tests and improve error handling - Phase 3 #64

@aoshimash

Description

@aoshimash

Overview

Enable all Playwright tests in CI environment and implement comprehensive error handling and debugging capabilities.

Background

After Phase 1 (#62) validates basic Playwright functionality and Phase 2 (#63) optimizes performance with caching, we need to enable all Playwright tests and ensure robust error handling.

Implementation Plan

Phase 3 (This Issue)

  1. Remove all CI skip conditions from Playwright tests:
    • TestBrowserPool_RenderPage (already enabled in Phase 1)
    • TestJSClient_RenderPage
    • TestJSClient_Get
  2. Implement enhanced error handling:
    • Detailed error logs for Playwright failures
    • Browser console logs on test failure
    • Network request/response logs for debugging
  3. (Optional) Add screenshot capture on test failure
  4. Ensure all tests pass consistently in CI

Technical Details

  • Remove all if os.Getenv("CI") == "true" conditions from Playwright tests
  • Add error context with browser logs:
    if err \!= nil {
        logs, _ := page.Context().Browser().NewBrowserCDPSession()
        // Capture and log browser state
    }
  • Consider implementing retry logic for flaky tests

Success Criteria

  • All Playwright tests run and pass in CI environment
  • No test flakiness introduced
  • Clear error messages when tests fail
  • Debugging information readily available in CI logs
  • CI remains stable over multiple runs

Dependencies

Related Issues

Future Considerations

  • Multi-browser testing (Firefox, WebKit)
  • Parallel test execution optimization
  • Visual regression testing capabilities

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions