Skip to content

test(scorecard): fix e2e catalog user picker click timeout on CI (validation for #3417)#3681

Closed
gustavolira wants to merge 5 commits into
redhat-developer:mainfrom
gustavolira:fix-scorecard-e2e-catalog-picker
Closed

test(scorecard): fix e2e catalog user picker click timeout on CI (validation for #3417)#3681
gustavolira wants to merge 5 commits into
redhat-developer:mainfrom
gustavolira:fix-scorecard-e2e-catalog-picker

Conversation

@gustavolira

Copy link
Copy Markdown
Member

Hey, I just made a Pull Request!

This is a CI-validation draft PR — it contains all commits from #3417 plus a one-file e2e fix, to verify the fix resolves the CI failures blocking that PR.

Context

The Workspace scorecard, CI step jobs on #3417 (and other scorecard PRs, e.g. #3639 which is a pure dependency bump) fail with 60 identical e2e failures: every test that calls CatalogPage.openCatalog() times out clicking the catalog All user picker:

TimeoutError: locator.click: Timeout 30000ms exceeded.
  - <li role="menuitem" class="MuiListItem-container-...">…</li> intercepts pointer events

The intercepting <li> is the picker item's own MUI ListItem container (it gets role="menuitem" via ContainerProps in Backstage's UserListPicker, with the count badge rendered as an absolutely-positioned secondary action). On the CI runners the geometric center of the inner <p>All </p> falls outside the clickable area, so Playwright retries until timeout — deterministically (60/60 tests, both Node versions, all 6 locales), while passing on developer machines.

Fix

Apply the all user filter via the catalog URL query parameter instead of clicking the picker, removing the hit-testing dependency entirely:

await this.page.goto('/catalog?filters[user]=all');
await expect(this.page.getByTestId('user-picker-all')).toBeVisible();

If CI goes green here, the single commit a28750e can be cherry-picked into #3417 (or applied by @imykhno).

✔️ Checklist

  • A changeset describing the change and affected packages. (not needed — e2e test-only change)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

🤖 Generated with Claude Code

imykhno and others added 5 commits July 2, 2026 12:34
…dStatusScore`

Signed-off-by: Ihor Mykhno <imykhno@redhat.com>
… safety and improved structure

Signed-off-by: Ihor Mykhno <imykhno@redhat.com>
…dKpi` across tests and configurations

Signed-off-by: Ihor Mykhno <imykhno@redhat.com>
Signed-off-by: Ihor Mykhno <imykhno@redhat.com>
The e2e suite fails on CI because the click on the 'All' user picker
times out: the picker item's container <li> (MUI ListItem container
with the count badge as secondary action) intercepts pointer events,
so Playwright retries until timeout. This breaks every entity test
(60 failures across all locales) while passing locally, where font
rendering keeps the click point inside the clickable area.

Apply the 'all' user filter through the catalog URL query parameter
instead of clicking the picker, removing the hit-testing dependency.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Gustavo Lira <guga.java@gmail.com>
@rhdh-gh-app

rhdh-gh-app Bot commented Jul 3, 2026

Copy link
Copy Markdown

Important

This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior.

Changed Packages

Package Name Package Path Changeset Bump Current Version
app-legacy workspaces/scorecard/packages/app-legacy none v0.0.0
@red-hat-developer-hub/backstage-plugin-scorecard-backend workspaces/scorecard/plugins/scorecard-backend major v2.7.9
@red-hat-developer-hub/backstage-plugin-scorecard-common workspaces/scorecard/plugins/scorecard-common major v2.7.9
@red-hat-developer-hub/backstage-plugin-scorecard workspaces/scorecard/plugins/scorecard major v2.7.9

@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@fullsend-ai-review

fullsend-ai-review Bot commented Jul 3, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 3:48 PM UTC · Completed 4:01 PM UTC
Commit: d69d6d6 · View workflow run →

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.12%. Comparing base (c7f0beb) to head (a28750e).
⚠️ Report is 8 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3681   +/-   ##
=======================================
  Coverage   54.12%   54.12%           
=======================================
  Files        2344     2344           
  Lines       89539    89546    +7     
  Branches    25076    25078    +2     
=======================================
+ Hits        48460    48467    +7     
  Misses      39524    39524           
  Partials     1555     1555           
Flag Coverage Δ *Carryforward flag
adoption-insights 83.70% <ø> (ø) Carriedforward from ad8ef98
ai-integrations 67.95% <ø> (ø) Carriedforward from ad8ef98
app-defaults 69.79% <ø> (ø) Carriedforward from ad8ef98
augment 46.39% <ø> (ø) Carriedforward from ad8ef98
boost 74.68% <ø> (ø) Carriedforward from ad8ef98
bulk-import 72.46% <ø> (ø) Carriedforward from ad8ef98
cost-management 14.10% <ø> (ø) Carriedforward from ad8ef98
dcm 61.81% <ø> (ø) Carriedforward from ad8ef98
extensions 61.53% <ø> (ø) Carriedforward from ad8ef98
global-floating-action-button 71.18% <ø> (ø) Carriedforward from ad8ef98
global-header 59.71% <ø> (ø) Carriedforward from ad8ef98
homepage 49.84% <ø> (ø) Carriedforward from ad8ef98
install-dynamic-plugins 56.77% <ø> (ø) Carriedforward from ad8ef98
konflux 91.49% <ø> (ø) Carriedforward from ad8ef98
lightspeed 68.50% <ø> (ø) Carriedforward from ad8ef98
mcp-integrations 85.46% <ø> (ø) Carriedforward from ad8ef98
orchestrator 37.71% <ø> (ø) Carriedforward from ad8ef98
quickstart 65.63% <ø> (ø) Carriedforward from ad8ef98
sandbox 79.56% <ø> (ø) Carriedforward from ad8ef98
scorecard 82.70% <100.00%> (+0.03%) ⬆️
theme 61.26% <ø> (ø) Carriedforward from ad8ef98
translations 7.25% <ø> (ø) Carriedforward from ad8ef98
x2a 78.68% <ø> (ø) Carriedforward from ad8ef98

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Harness.

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fullsend-ai-review

Copy link
Copy Markdown

Looks good to me.

The rename from average to weightedStatusScore is comprehensive — all source code, configuration, test, documentation, and translation files are updated consistently. No stale references remain outside the diff (CHANGELOG entries are historical records). The type system refactoring in AggregatedMetricCard.tsx from switch/case to type-guard functions is structurally sound. The e2e fix in CatalogPage.openCatalog() correctly replaces a flaky click interaction with deterministic URL navigation. Breaking changes are properly marked as major in the changeset for all three packages, and no external consumers in the monorepo are affected.

Low

  • [logic-error] workspaces/scorecard/plugins/scorecard/src/components/AggregatedMetricCards/AggregatedMetricCard.tsx — The destructured const { cardTitle, description, dataTestId, scorecard } = props is only used in the UnsupportedAggregationType fallback path; the type-guarded branches pass {...props} directly. Harmless but slightly misleading to readers.

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Jul 3, 2026
@gustavolira

Copy link
Copy Markdown
Member Author

Validation complete — the fix was pushed directly to #3417 (commit a28750e) and its CI is now green (scorecard e2e passed in ~18m on both Node versions). Closing this draft.

@gustavolira gustavolira closed this Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants