Skip to content

Add browser console logging #774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2025
Merged

Add browser console logging #774

merged 1 commit into from
Jun 5, 2025

Conversation

mjh1
Copy link
Contributor

@mjh1 mjh1 commented Jun 5, 2025

PR Type

Tests, Enhancement


Description

  • Add browser console logging to tests

  • Listen to console events via page.on

  • Log console messages with TestLogger


Changes walkthrough 📝

Relevant files
Tests
video.spec.ts
Add browser console logging                                                           

apps/app-e2e/tests/video.spec.ts

  • Added page.on("console", msg => logger.log…)
  • Logs browser console text with TestLogger
  • +5/-0     

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @mjh1 mjh1 temporarily deployed to Preview - e2e June 5, 2025 16:27 — with GitHub Actions Inactive
    Copy link

    vercel bot commented Jun 5, 2025

    The latest updates on your projects. Learn more about Vercel for Git ↗︎

    Name Status Preview Comments Updated (UTC)
    pipelines-app 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jun 5, 2025 4:27pm

    @mjh1 mjh1 merged commit 6b7f87e into main Jun 5, 2025
    5 of 6 checks passed
    @mjh1 mjh1 deleted the mh/debug branch June 5, 2025 16:27
    Copy link

    github-actions bot commented Jun 5, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 PR contains tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Event Listener Leak

    Console listeners are added for every test without cleanup, which may accumulate handlers and cause memory leaks or duplicate logs.

    page.on("console", msg => {
      logger.log(`Browser console: ${msg.text()}`);
    });
    Unfiltered Console Logs

    Logging all console messages might produce excessive noise; consider filtering by message type or severity to focus on relevant information.

    page.on("console", msg => {
      logger.log(`Browser console: ${msg.text()}`);
    });

    Copy link

    github-actions bot commented Jun 5, 2025

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    1 participant