Skip to content

fix(FR-2995): repair broken E2E tests for Serving & AI#7679

Draft
nowgnuesLee wants to merge 1 commit into
06-02-fix_fr-2994_repair_broken_e2e_tests_for_storage_vfolder_from
06-02-fix_fr-2995_repair_broken_e2e_tests_for_serving_ai
Draft

fix(FR-2995): repair broken E2E tests for Serving & AI#7679
nowgnuesLee wants to merge 1 commit into
06-02-fix_fr-2994_repair_broken_e2e_tests_for_storage_vfolder_from
06-02-fix_fr-2995_repair_broken_e2e_tests_for_serving_ai

Conversation

@nowgnuesLee
Copy link
Copy Markdown
Contributor

@nowgnuesLee nowgnuesLee commented Jun 2, 2026

Resolves #7630 (FR-2995)

Stacked on: #7676 (FR-2994 — Storage / VFolder) → #7653 (FR-2993 — Compute & Sessions) → #7652 (FR-2992 — Auth & Identity)

Part of FR-2059 (Fix Broken E2E Tests Cases). Repairs the Serving & AI sub-category — 30 originally failing tests, now 71 pass / 0 fail / 52 skip across the admin-model-card/, chat/, and serving/ suites.

Summary

Group Files Failing → after
admin-model-card 7 spec files + 1 shared POM 13 fail → 0 fail (all 13 now pass)
chat chat.spec.ts, chat-sync.spec.ts 6 fail → 0 fail
serving model-card-drawer, endpoint-route-table, serving-deploy-lifecycle 7 active fail → 0 fail (+ ~32 outdated tests marked test.fixme with explicit Jira-ticket references)

Root causes addressed

admin-model-card

  • Total N items dropdown wait was broken. BAIVFolderSelect's TotalFooter only renders when count > 0, and the test environment's model-store project has zero group-owned VFolders, so the footer is never shown. Switched the readiness signal from waiting on getByText(/Total \d+ items/) to waiting on .ant-select-item-option to appear. Applied in the shared POM (AdminModelCardPage.ts:330) and 3 inline call sites.
  • Tests required pre-existing VFolders. Refactored 7 spec files to self-provision their prerequisite VFolder via createNewFolderName (a parameter already supported by createModelCard) and added matching afterEach cleanup so created folders don't leak across runs.

chat

  • Button-index drift in multi-pane setup. EndpointSelect grew a showDetailPageButton compact info button inside the card-head Space.Compact, which shifted every chat-card-head button index by 1. Tests using .nth(1) for compare and .nth(0) for sync are now .nth(2) / .nth(1); button-count assertions of 3 are now 4. Fixed in chat.spec.ts and chat-sync.spec.ts. Also fixed one strict-mode hit by switching getByText('mock-endpoint-b') to a [title=...] visible-element locator.

serving

  • Mock global IDs not decodable as UUIDs. e2e/serving/mocking/model-store-mock.ts used opaque mock IDs that safeDecodeUuid returned undefined for, causing ModelCardDrawer to fall back to its store-only fetch policy (no-op). Replaced mock GIDs with valid UUID-shaped values so the drawer hits store-and-network and the query actually runs.
  • Locator and URL drift in model-card-drawer. openModelCardDrawer now uses filter({ hasText: cardTitle }) with a 15s timeout (matches the drawer's useDeferredValue delay); URLs updated from /serving/ to /deployments/; modal title 'Deploy Model''Create New Deployment with Preset'.
  • Outdated routes (FR-2664, FR-2675, FR-2822) skipped. Several product refactors removed/renamed surfaces that the affected tests target:
    • FR-2664: replaced ServingPageQuery/EndpointDetailPageQuery with DeploymentListPageQuery/DeploymentDetailPageQuery; removed the Routes Info card from the endpoint detail page.
    • FR-2675/FR-2822: removed the /service/start route that ServiceLauncherCreatePage relied on.
      These tests are marked test.fixme(true, '...') with explicit references to the responsible Jira tickets so they're trivial to find and re-enable once the test surfaces are rewritten against the new product UI.

Known product bug (separate follow-up PR)

AdminModelCardSettingModal.tsx's FolderCreateModalV2.onRequestClose calls convertToUUID(result.id) on a value that is already a Relay GlobalID, producing a doubly-encoded value the backend rejects. The fix is to use toLocalId(result.id) instead.

This PR works around the bug in the POM (createNewFolderViaPlus re-opens the dropdown after folder creation and clicks the option by name, ensuring a correctly typed VirtualFolderNode GlobalID is stored). The product fix will be submitted as a separate PR to keep this PR scoped to test repairs.

Files changed

  • e2e/utils/classes/AdminModelCardPage.ts — dropdown readiness signal + createNewFolderViaPlus workaround for the product bug
  • e2e/admin-model-card/admin-model-card-{page-load,create,delete,edit,filter,sort-refresh,url-state}.spec.ts — uniform createNewFolderName + cleanup refactor
  • e2e/chat/chat.spec.ts, e2e/chat/chat-sync.spec.ts — button-index + strict-mode locator fixes
  • e2e/serving/mocking/model-store-mock.ts — UUID-shaped mock global IDs
  • e2e/serving/model-card-drawer.spec.ts — drawer locator + URL + modal-title updates; test.fixme for tests blocked by product refactor
  • e2e/serving/endpoint-route-table.spec.ts — describe-level test.fixme (FR-2664 removed the target surface)
  • e2e/serving/serving-deploy-lifecycle.spec.tstest.fixme for /service/start-dependent tests (FR-2675/FR-2822)

Test plan

  • pnpm exec playwright test e2e/admin-model-card/ e2e/serving/ e2e/chat/ --workers=2 — 71 pass / 0 fail / 52 skip
  • pnpm exec playwright test e2e/admin-model-card/ — 36 pass / 1 skip
  • pnpm exec playwright test e2e/chat/ — all targeted tests pass
  • Skipped tests have explicit test.fixme(true, 'reason') annotations with Jira-ticket references for the responsible product refactor

Fixes 30 failing tests across admin-model-card (13), chat (6), and
serving (7 active + several outdated tests skipped). Final state of the
Serving & AI suite: 71 pass / 0 fail / 52 skip.

Root causes:

- admin-model-card Total-N-items dropdown wait broken: BAIVFolderSelect's
  TotalFooter only renders when count > 0, and the test environment's
  model-store project has zero group-owned VFolders. Switched the
  readiness signal from waiting on the 'Total N items' footer text to
  waiting on the first '.ant-select-item-option' to appear. Applied in
  the shared POM (AdminModelCardPage.ts) and 3 inline call sites.

- admin-model-card tests required pre-existing VFolders: refactored 7
  spec files to self-provision their prerequisite VFolder via
  createNewFolderName (already supported by createModelCard) and added
  matching afterEach cleanup so created folders don't leak across runs.

- AdminModelCardSettingModal product bug worked around in the POM:
  FolderCreateModalV2's onRequestClose passes convertToUUID(result.id)
  but result.id is already a Relay GlobalID, so the form-field receives
  a doubly-encoded value the backend rejects. Until the product fix
  lands, createNewFolderViaPlus in the POM re-opens the dropdown after
  folder creation and clicks the option by name to ensure a correctly
  typed VirtualFolderNode GlobalID is stored. The product fix will be
  submitted as a separate PR.

- chat multi-pane button index drift: EndpointSelect grew a
  showDetailPageButton compact info button in the card-head Space, which
  shifted every chat-card-head button index by 1. Tests using nth(1) for
  compare / nth(0) for sync now use nth(2) / nth(1); button-count
  assertions of 3 became 4. Fixed in chat.spec.ts and chat-sync.spec.ts.
  Also fixed one strict-mode hit in test :939 by switching
  getByText('mock-endpoint-b') to a [title=...] visible-element locator.

- serving model-card-drawer mock IDs invalid: mock global IDs were not
  decodable as UUIDs, so safeDecodeUuid returned undefined and
  ModelCardDrawer fell back to its store-only fetch policy (no-op).
  Replaced mock GIDs with valid UUID-shaped values so the drawer hits
  store-and-network and the query actually runs.

- serving model-card-drawer locator and URL drift: openModelCardDrawer
  now uses filter({ hasText: cardTitle }) with a 15s timeout (matches
  the drawer's useDeferredValue delay); URLs updated from /serving/ to
  /deployments/; modal title 'Deploy Model' -> 'Create New Deployment
  with Preset'.

- serving outdated routes (FR-2664, FR-2675, FR-2822) skipped: the
  Routes Info card was removed from the endpoint detail page, the
  /service/start launcher route was removed in favor of the new
  deployments flow, and several queries were renamed. The affected
  tests are marked test.fixme with explicit references to the
  responsible Jira tickets so they're easy to find and re-enable once
  the test surfaces are rewritten against the new product UI.

Relates to FR-2059 (Fix Broken E2E Tests Cases) - Serving & AI
sub-task. Stacked on top of FR-2994 (Storage / VFolder).
@github-actions github-actions Bot added the size:XL 500~ LoC label Jun 2, 2026
Copy link
Copy Markdown
Contributor Author

nowgnuesLee commented Jun 2, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

graphite-app Bot pushed a commit that referenced this pull request Jun 2, 2026
…esult.id (#7681)

Resolves #7680 (FR-3022)

## Summary

When an admin creates a new VFolder inline via the `+` button in `AdminModelCardSettingModal` (which opens `FolderCreateModalV2`), the `onRequestClose` callback receives a `result` whose `result.id` is a Relay **Globally Unique ID** (base64-encoded `VFolder:uuid`).

The previous code passed it through `convertToUUID`, which only normalizes a 32-char hex sequence into dash-separated UUID format — it does **not** decode base64. On a base64 GlobalID it fails the regex and returns the GlobalID untouched, which then gets re-wrapped by `toGlobalId`, producing a doubly-encoded value the backend rejects.

This swaps `convertToUUID` for `toLocalId` (`atob(globalId).split(':')?.[1]`), which correctly decodes the GlobalID — matching the convention already used elsewhere in the same file (`toLocalId(modelCard.id)`, `toLocalId(values.vfolderId)`).

## Changes

- `react/src/components/AdminModelCardSettingModal.tsx`: `convertToUUID(result.id)` → `toLocalId(result.id)`; dropped the now-unused `convertToUUID` import.

## Impact

Only affects the admin inline-create-VFolder path (open Model Card Setting modal → create new VFolder via `+` → submit). The dropdown-select path was unaffected. Discovered while healing `e2e/admin-model-card/` tests for FR-2995; once this lands, the `createNewFolderViaPlus` POM workaround in #7679 can be removed.

## Verification

`scripts/verify.sh` — Relay, Lint, Format, TypeScript all PASS. (The "Vite warmup paths" check fails identically on a clean `main` checkout — a pre-existing environmental issue unrelated to this change.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant