Skip to content

test(e2e): cover AI Hub make-public flow and public model_hub_table#29071

Merged
ryan-crabbe-berri merged 3 commits into
litellm_internal_stagingfrom
litellm_e2e_model_hub
May 28, 2026
Merged

test(e2e): cover AI Hub make-public flow and public model_hub_table#29071
ryan-crabbe-berri merged 3 commits into
litellm_internal_stagingfrom
litellm_e2e_model_hub

Conversation

@ryan-crabbe-berri

@ryan-crabbe-berri ryan-crabbe-berri commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds e2e coverage for three previously-uncovered manual-QA items in the AI Hub / public Model Hub area:

  • custom timeout decorator #32 Making models public — opens the multi-step modal, advances through Select → Confirm, submits, verifies the success toast.
  • Map timeout exceptions to something readable  #33 Internal tabs render — asserts Model Hub / Agent Hub / MCP Hub / Skill Hub all show and switch. Note: the manual-QA "Claude Code Plugin Marketplace" tab was renamed to Skill Hub; the test pins the current label.
  • Expanded .env, added Poetry and basic Docstring #34 Public model_hub_table loads — navigates anonymously with ?key=<master> and asserts the Model Hub tab. Agent Hub / MCP Hub tabs only render when public agents/MCPs exist, so they're not asserted in a fresh CI run.

Test plan

  • e2e_tests/tests/modelHub/modelHub.spec.ts::Make models public via the multi-step modal
  • e2e_tests/tests/modelHub/modelHub.spec.ts::AI Hub tab list renders Model Hub, Agent Hub, MCP Hub and Skill Hub
  • e2e_tests/tests/modelHub/modelHub.spec.ts::Public model_hub_table loads and renders the Model Hub tab

Refs LIT-3093

Three previously-uncovered manual-QA paths land in one spec:

- Admin opens "Select Models to Make Public", advances through the
  multi-step modal, and verifies the success toast.
- AI Hub tab strip exposes Model Hub / Agent Hub / MCP Hub / Skill Hub
  — note the manual-QA "Claude Code Plugin Marketplace" label was
  renamed to Skill Hub; the test pins the current name.
- Anonymous /ui/model_hub_table loads with the master key as `?key=`
  and renders the Model Hub tab. Agent Hub / MCP Hub tabs are
  conditional on public data and are not asserted here.
@greptile-apps

greptile-apps Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a new modelHub.spec.ts e2e test file covering three previously manual-only QA items: the multi-step "make models public" modal flow, the admin AI Hub tab strip (Model Hub / Agent Hub / MCP Hub / Skill Hub), and anonymous access to the public /ui/model_hub_table page.

  • The "make public" test now includes a seed-data guard (Select All (\\d+)) and advances through the wizard, asserting the success toast; the dismissFeedbackPopup call is correctly placed before tab assertions in all three tests.
  • The admin tab-strip test asserts all four tabs unconditionally, consistent with the author's confirmation that the admin view renders them regardless of seeded agent/MCP data.
  • The public-page test runs without stored auth state, uses the master key from the environment, and only asserts the always-present "Model Hub" tab, intentionally skipping the conditionally-rendered Agent Hub and MCP Hub tabs.

Confidence Score: 5/5

This PR is safe to merge — it adds only new test code with no production code changes.

The change is entirely additive (one new test file), the tests are well-structured with thoughtful inline comments, and no existing behavior is modified or weakened. The two noted issues are both non-blocking quality suggestions that don't affect the test's ability to pass on a fresh CI seed.

No files require special attention; the single changed file is a new test spec with no risk to production code.

Important Files Changed

Filename Overview
ui/litellm-dashboard/e2e_tests/tests/modelHub/modelHub.spec.ts New e2e spec covering make-public modal flow, admin AI Hub tab strip, and public model_hub_table; well-commented and guards against missing seed data, but the "make public" test has no teardown so the suite is not idempotent across re-runs against the same DB.

Reviews (3): Last reviewed commit: "docs(e2e): explain admin vs public AI Hu..." | Re-trigger Greptile

Comment thread ui/litellm-dashboard/e2e_tests/tests/modelHub/modelHub.spec.ts
Comment thread ui/litellm-dashboard/e2e_tests/tests/modelHub/modelHub.spec.ts Outdated
@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Address Greptile review:

- Make-public test now asserts "Select All (N)" with N>=1 before clicking,
  so a missing-seed-data run surfaces immediately instead of timing out
  on the disabled Next button or the success toast.
- Public model_hub_table test dismisses the feedback popup before the
  tab visibility assertion, matching the ordering used by navigateToPage
  so a popup race can't mask the tab mid-evaluation.
@ryan-crabbe-berri

Copy link
Copy Markdown
Collaborator Author

@greptileai re review

Comment on lines +45 to +49
for (const tabName of ["Model Hub", "Agent Hub", "MCP Hub", "Skill Hub"]) {
const tab = page.getByRole("tab", { name: tabName });
await expect(tab, `${tabName} tab should be present`).toBeVisible({ timeout: 5_000 });
await tab.click();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Agent Hub / MCP Hub tabs may not render in a data-empty admin view

The loop unconditionally asserts all four tabs, including Agent Hub and MCP Hub. The fixture config seeds only two model groups (fake-openai-gpt-4, fake-anthropic-claude) and no agents or MCP servers. If these tabs are conditionally rendered in the admin view (i.e., they only appear when at least one agent or MCP server exists — the same conditionality the PR notes for the public page), the test will time out on Agent Hub in every clean CI run. The PR description explicitly carves out this conditional behaviour for the public view but does not confirm the admin view renders them unconditionally; if the UI component behaves the same in both contexts, this test will be a persistent flake.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

model hub table will render all 4 unconditionally for admin path

Greptile flagged the all-4-tabs assertion as a potential CI flake,
inferring from the public-page comment that Agent Hub / MCP Hub might
be data-conditional in the admin view too. They aren't — ModelHubTable
renders all four tabs unconditionally for admins. Document the asymmetry
inline so future readers (and future review passes) don't re-derive it.
@ryan-crabbe-berri

Copy link
Copy Markdown
Collaborator Author

@greptileai re review

@ryan-crabbe-berri ryan-crabbe-berri merged commit 5699a06 into litellm_internal_staging May 28, 2026
115 of 118 checks passed
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
…erriAI#29071)

* test(e2e): cover AI Hub make-public flow and public model_hub_table

Three previously-uncovered manual-QA paths land in one spec:

- Admin opens "Select Models to Make Public", advances through the
  multi-step modal, and verifies the success toast.
- AI Hub tab strip exposes Model Hub / Agent Hub / MCP Hub / Skill Hub
  — note the manual-QA "Claude Code Plugin Marketplace" label was
  renamed to Skill Hub; the test pins the current name.
- Anonymous /ui/model_hub_table loads with the master key as `?key=`
  and renders the Model Hub tab. Agent Hub / MCP Hub tabs are
  conditional on public data and are not asserted here.

* test(e2e): harden AI Hub make-public + public hub assertions

Address Greptile review:

- Make-public test now asserts "Select All (N)" with N>=1 before clicking,
  so a missing-seed-data run surfaces immediately instead of timing out
  on the disabled Next button or the success toast.
- Public model_hub_table test dismisses the feedback popup before the
  tab visibility assertion, matching the ordering used by navigateToPage
  so a popup race can't mask the tab mid-evaluation.

* docs(e2e): explain admin vs public AI Hub tab asymmetry

Greptile flagged the all-4-tabs assertion as a potential CI flake,
inferring from the public-page comment that Agent Hub / MCP Hub might
be data-conditional in the admin view too. They aren't — ModelHubTable
renders all four tabs unconditionally for admins. Document the asymmetry
inline so future readers (and future review passes) don't re-derive it.
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