Skip to content

test: update LLM provider e2e tests for refreshed UI#8779

Merged
raunakab merged 2 commits intorefactor/llm-configfrom
refactor/llm-config-tests
Feb 27, 2026
Merged

test: update LLM provider e2e tests for refreshed UI#8779
raunakab merged 2 commits intorefactor/llm-configfrom
refactor/llm-config-tests

Conversation

@raunakab
Copy link
Contributor

@raunakab raunakab commented Feb 26, 2026

Description

Update the LLM provider setup e2e tests to match the refreshed LLM Configuration page UI and fix a broken API endpoint in the test utility.

  • Update llm_provider_setup.spec.ts for new UI (page title, button labels, settings/trash icon buttons, delete confirmation modal, default model dropdown)
  • Fix OnyxApiClient.setProviderAsDefault to call the correct POST /api/admin/llm/default endpoint with { provider_id, model_name } body (was calling non-existent /admin/llm/provider/{id}/default)
  • Add test for delete confirmation modal warning when deleting the default provider
  • Add test for default model dropdown visibility

Additional Options

  • [Optional] Please cherry-pick this PR to the latest release version.
  • [Optional] Override Linear Check

Summary by cubic

Updates LLM provider e2e tests for the new LLM Models UI and more reliable cleanup. Covers Connect flow, Settings/Trash actions, delete confirmation, and the Default Model card; mocks the test endpoint and uses the correct default-provider API with model selection.

  • New Features

    • Tests for Default Model card visibility and the “Default” tag.
    • Delete confirmation warning when removing the default provider, with cancel behavior.
  • Bug Fixes

    • setProviderAsDefault posts to /api/admin/llm/default with { provider_id, model_name } (defaults to "gpt-4o").
    • Restores the initial default provider in try/finally for reliable test cleanup.

Written for commit f0397a1. Summary will update on new commits.

@raunakab raunakab requested a review from a team as a code owner February 26, 2026 00:09
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 26, 2026

Greptile Summary

Updated E2E tests to match the refreshed LLM Configuration page UI, including new page title ("LLM Models"), Connect button, settings/trash action buttons, delete confirmation modal, and default model dropdown.

Key Changes:

  • Updated test selectors to match new UI elements (settings/trash icons instead of Edit button, "Connect" instead of "Set up")
  • Fixed API utility method setProviderAsDefault to call the correct endpoint (POST /api/admin/llm/default) with proper request body structure { provider_id, model_name }
  • Refactored response types to match new API structure (AdminLLMProviderResponse with providers array and default_text object)
  • Added test coverage for delete confirmation modal warning when deleting default provider
  • Added test for default model dropdown visibility

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are test-only updates that align E2E tests with refreshed UI, plus a necessary API endpoint fix. Code is well-structured, properly typed, includes helpful comments, and follows project standards. No production code is affected.
  • No files require special attention

Important Files Changed

Filename Overview
web/tests/e2e/admin/llm_provider_setup.spec.ts Updated E2E tests to match refreshed UI with new page title, button labels (Connect/Settings/Trash), delete confirmation modal, and default model dropdown tests
web/tests/e2e/utils/onyxApiClient.ts Fixed setProviderAsDefault to use correct endpoint (POST /api/admin/llm/default) with proper request body structure

Last reviewed commit: ef0da26

@github-actions
Copy link
Contributor

github-actions bot commented Feb 26, 2026

Preview Deployment

Status Preview Commit Updated
https://onyx-preview-7up29awi7-danswer.vercel.app f0397a1 2026-02-26 02:13:23 UTC

Copy link
Contributor

@cubic-dev-ai cubic-dev-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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@raunakab raunakab force-pushed the refactor/llm-config branch from a5919ad to 23fc6d4 Compare February 26, 2026 00:59
@raunakab raunakab force-pushed the refactor/llm-config-tests branch from ef0da26 to e3328ec Compare February 26, 2026 00:59
@raunakab raunakab force-pushed the refactor/llm-config branch from 23fc6d4 to ce2aac7 Compare February 26, 2026 01:41
@raunakab raunakab requested a review from Weves as a code owner February 26, 2026 01:41
@raunakab raunakab force-pushed the refactor/llm-config-tests branch from e3328ec to bf9ca4f Compare February 26, 2026 01:55
@raunakab raunakab removed the request for review from Weves February 26, 2026 02:17
@raunakab raunakab merged commit fcb2e06 into refactor/llm-config Feb 27, 2026
5 checks passed
@raunakab raunakab deleted the refactor/llm-config-tests branch February 27, 2026 15:50
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