RHIDP-14421: Implement new E2E test scenarios for Scorecard in plugins - #4631
RHIDP-14421: Implement new E2E test scenarios for Scorecard in plugins#4631imykhno wants to merge 2 commits into
Conversation
…verage Signed-off-by: Ihor Mykhno imykhno@redhat.com Assisted-By: Cursor <cursoragent@cursor.com>
Missing ChangesetsThe following package(s) are changed by this PR but do not have a changeset:
See CONTRIBUTING.md for more information about how to add changesets. Changed Packages
|
PR Summary by QodoExpand Scorecard E2E coverage for license KPI and drill-downs
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
|
🤖 Finished Review · ✅ Success · Started 7:55 PM UTC · Completed 8:12 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Cost: $6.91 |
Code Review by Qodo
1. Accessibility regressions go undetected
|
|
Important The |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4631 +/- ##
=======================================
Coverage 62.39% 62.39%
=======================================
Files 2607 2608 +1
Lines 104798 104828 +30
Branches 29477 29500 +23
=======================================
+ Hits 65386 65407 +21
- Misses 37551 37561 +10
+ Partials 1861 1860 -1
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
ReviewFindingsMedium
Low
Previous runReviewFindingsMedium
Low
Previous run (2)Review — commentPR #4631 adds E2E test scenarios for the Scorecard plugin's license file exists KPI, calculation error warning icons/tooltips, weighted KPI drill-down entities table, and entity link navigation. The PR also refactors This is a well-structured, test-only PR that follows existing patterns. One medium-severity finding and several low-severity suggestions are noted below. FindingsMedium1. Missing mock route in Adding Remediation: Add Low2. Broadened SVG selector reduces test precision —
3. Unsafe type assertion in The 4. This action method includes a 5. The method was refactored with a new signature ( 6. Incidental bug fix undocumented — The |
|
🤖 Review · Commit: |
e9563ba to
a3b937e
Compare
|
🤖 Review · ❌ Terminated · Started 12:36 PM UTC · Ended 12:56 PM UTC Commit: |
|
🤖 Finished Review · ✅ Success · Started 12:36 PM UTC · Completed 12:56 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Cost: $4.50 |
… ids, and page object refactor Signed-off-by: Ihor Mykhno imykhno@redhat.com Assisted-By: Cursor <cursoragent@cursor.com>
a3b937e to
b50688c
Compare
|
🤖 Review · ❌ Terminated · Started 2:45 PM UTC · Ended 2:47 PM UTC Commit: |
|
|
🤖 Finished Review · ❌ Failure (validation failed after 2 iteration(s)) · Started 2:45 PM UTC · Completed 2:47 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-5 |
|
🤖 Finished Review · ❌ Failure (validation failed after 2 iteration(s)) · Started 8:16 AM UTC · Completed 8:18 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-5 |
|
🤖 Finished Review · ✅ Success · Started 3:41 PM UTC · Completed 4:02 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Cost: $6.13 |
There was a problem hiding this comment.
Note: The following review comments could not be posted on the diff (GitHub returned 422) and are included here instead:
workspaces/scorecard/packages/app-legacy/e2e-tests/utils/mockHomepageAggregations.ts(file-level): Line 149 · [medium] logic-error
mockAllDefaultHomepageAggregationsSuccess is not updated to mock the new LICENSE_FILE_EXISTS_KPI_AGGREGATION_ROUTE. After this PR, AGGREGATED_CARDS_METRIC_IDS includes licenseFileExistsKpi (6 entries), and addAggregatedScorecardWidgets called without explicit widgetIds adds all 6 widgets. mockAggregationNoDataFound was updated with a handler for licenseFileExistsKpi, but mockAllDefaultHomepageAggregationsSuccess was not, creating an inconsistency.
Suggested fix: Add a mockApiResponse call for the license file exists KPI aggregation route with licenseFileExistsAggregatedResponse inside mockAllDefaultHomepageAggregationsSuccess, matching the pattern of the other 5 routes.
| } from '../utils/translationUtils'; | ||
|
|
||
| type MetricId = 'github.openPRs' | 'jira.openIssues'; | ||
| type MetricId = 'github.openPRs' | 'jira.openIssues' | 'filecheck.license'; |
There was a problem hiding this comment.
[low] edge-case
The MetricId type is expanded to include filecheck.license, but scorecardMessages.metric has a filecheck key, not a filecheck.license key. Methods like expectPageTitle access this.translations.metric[metricId].title without guarding against undefined, so passing filecheck.license without the optional customTitle parameter would throw TypeError. Current callers supply customTitle, but the type signature does not enforce this constraint.



Hey, I just made a Pull Request!
In this PR was added new e2e tests for scorecard plugin to increase test coverage exists for supported plugin functionality.
This PR for: RHIDP-14421
✔️ Checklist