Skip to content

Add frontend widget test coverage#758

Merged
mshriver merged 1 commit intoibutsu:mainfrom
mshriver:frontend-widgets-coverage
Nov 25, 2025
Merged

Add frontend widget test coverage#758
mshriver merged 1 commit intoibutsu:mainfrom
mshriver:frontend-widgets-coverage

Conversation

@mshriver
Copy link
Copy Markdown
Contributor

@mshriver mshriver commented Nov 25, 2025

Summary by Sourcery

Tests:

  • Introduce a new Jest test suite for the generic bar widget in the frontend.

Copilot AI review requested due to automatic review settings November 25, 2025 17:01
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Nov 25, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds initial Jest test coverage for the generic bar frontend widget by introducing a new test file.

File-Level Changes

Change Details Files
Introduce test coverage for the generic bar widget.
  • Create a new Jest test file for the generic bar widget component
  • Define render/setup helpers to mount the widget in a test environment
  • Add unit tests that cover the widget’s core rendering behavior and key interactions/edge cases
frontend/src/widgets/generic-bar.test.js

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive test coverage for the GenericBarWidget component, a chart widget that displays test result data in a stacked bar chart format.

  • Adds 456 lines of test coverage for the GenericBarWidget component
  • Includes tests for rendering, data fetching, props handling, error states, and user interactions
  • Sets up appropriate mocks for PatternFly chart components, HTTP client, and internal components

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mshriver mshriver force-pushed the frontend-widgets-coverage branch 2 times, most recently from 2d7e26d to 3458bf6 Compare November 25, 2025 17:15
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.19%. Comparing base (83fe65d) to head (9d60e4d).

❌ Your project check has failed because the head coverage (57.19%) is below the target coverage (85.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #758      +/-   ##
==========================================
+ Coverage   54.58%   57.19%   +2.60%     
==========================================
  Files         151      151              
  Lines        7335     7335              
  Branches      652      652              
==========================================
+ Hits         4004     4195     +191     
+ Misses       3064     2873     -191     
  Partials      267      267              

see 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 83fe65d...9d60e4d. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mshriver mshriver force-pushed the frontend-widgets-coverage branch from 3458bf6 to 85c448f Compare November 25, 2025 17:24
@mshriver mshriver force-pushed the frontend-widgets-coverage branch from 85c448f to 9d60e4d Compare November 25, 2025 17:24
@mshriver mshriver merged commit 97c8b40 into ibutsu:main Nov 25, 2025
15 of 16 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.

2 participants