Skip to content

fix(tests): retire the remaining stale antd selectors - #5854

Merged
mmabrouk merged 1 commit into
release/v0.112.0from
test-fix/stale-selectors
Aug 9, 2026
Merged

fix(tests): retire the remaining stale antd selectors#5854
mmabrouk merged 1 commit into
release/v0.112.0from
test-fix/stale-selectors

Conversation

@mmabrouk

@mmabrouk mmabrouk commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

Two selectors missed by the earlier antd → Radix migration passes (f85c5ac, ef89e25, 1fafabb, 45c401f, 0adbd26), both confirmed against the live EE dev stack (agenta-ee-dev-rel112, http://144.76.237.122:8180):

  • auto-evaluation/tests.ts's openAutoEvaluationModal matched .ant-modal. NewEvaluationModal renders through EnhancedModal, a facade over the @agenta/ui (Radix) Dialog — the real wrapper is [data-slot="dialog-content"]. Every test that opens this modal timed out at 60s before reaching its own assertions.
  • providerHelpers' selectMockModel matched .ant-popover / .ant-select / .ant-select-dropdown for the playground's model-configure popover and its nested model picker. Both are now @agenta/ui (Radix) Popovers — matched via [data-slot="popover-content"], the trigger's aria-haspopup="listbox", and getByRole("option") instead of antd classes. This is the shared helper behind most of the observability/playground failures: every test that needs to pick the mock test model failed here before reaching the rest of the test.

How I got the true failure list

Ran the full OSS acceptance suite (80 tests) against the live stack. 22 failed. Per the brief's two named traps: confirmed app-management.ts's "render app overview page" and both use-api/index.ts tests fail inside an unguarded page.waitForLoadState("networkidle") — pre-existing, dev-server-only, unrelated to selectors, left untouched.

The run overlapped two live-stack events the coordinator flagged mid-task: a ~1-2min 502 window (~21:19-21:22 UTC, a workspace rebase) and a type-scale CSS change that landed ~21:05-21:15 UTC. I reconstructed exact per-test timestamps from the results/ artifact directory mtimes and cross-checked every failure against both windows before treating it as real. ~10 of the 22 failures fell inside one of these windows; most were re-verified with a clean rerun after the stack stabilized.

What this PR fixes vs. leaves open

Fixed and verified live (rerun after the fix): the .ant-modal fix turns "should show an error when attempting to create an evaluation with a mismatched testset" from a 60s timeout into a 14s pass. The popover fix turns all 6 observability/index.ts "view traces" failures into passes reaching real trace data (one had a one-off slow-indexing retry that's a stack timing issue, not the selector).

Confirmed NOT a selector issue, left untouched:

  • app-management.ts:165 and both use-api/index.ts tests — the documented pre-existing networkidle trap.
  • agent-chat/attach-send-render-reload.spec.ts — fails in ~300ms with POST /workflows/ -> 404 (an HTML 404, not JSON). Root cause: apiBase(page) in agent-chat/tests.ts builds off new URL(page.url()), but the test never navigates before seeding, so page.url() is "about:blank" and its origin serializes to the string "null". This is a real bug, but it's a URL-construction bug in test-fixture code, not a stale selector — out of this PR's scope, flagging for a follow-up.
  • After the modal fix, "should run a single evaluation" and "should delete an evaluation run" now advance past the modal into openAutoEvaluationRunFromList's search-input flow and fail there on a toHaveValue mismatch — looks like a typing/re-render race, not a stale selector.
  • evaluators/index.ts:245's .ant-message toast wait, evaluators/tests.ts:84's waitForEvaluatorsQuery timeout, human-annotation/tests.ts:798's annotation-form predicate timeout, and testsset-management.ts's "should delete a testset" (union selector for the confirm modal never becomes visible) — none showed a stale antd class in their call path; look like flakiness or a real product-timing issue, not selectors. Recommend a follow-up investigation rather than a blind selector swap.

I did not touch the NEXT_PUBLIC_AGENTA_EMAIL_DELIVERY_ENABLED-gated test or weaken/delete any test to make it pass.

Test plan

  • Full OSS acceptance suite run against the live EE dev stack (80 tests, baseline: 22 failed / 26 skipped / 32 passed)
  • Scoped rerun of the two fixed sites plus every failure that overlapped the contamination windows, after the stack stabilized
  • .ant-modal fix confirmed: "mismatched testset" test now passes cleanly (14s)
  • Popover fix confirmed: observability suite passes through real trace data (5/6 clean, 1 one-off retry)

Two more selectors missed by the earlier antd -> Radix migration passes,
both confirmed live against the EE dev stack:

- auto-evaluation/tests.ts's openAutoEvaluationModal matched `.ant-modal`.
  NewEvaluationModal renders through EnhancedModal, a facade over the
  @agenta/ui (Radix) Dialog, so the wrapper is `[data-slot="dialog-content"]`.
  This was failing "should run a single evaluation", "should show an error
  when attempting to create an evaluation with a mismatched testset", and
  "should delete an evaluation run" — the modal itself never matched, so
  every test that opens it timed out at 60s before reaching its own
  assertions.

- providerHelpers' selectMockModel matched `.ant-popover`/`.ant-select`/
  `.ant-select-dropdown` for the playground's model-configure popover and
  its nested model picker. Both are now @agenta/ui (Radix) Popovers
  (useFieldSlots.tsx's Popover wrapping useModelConfigurePopover.tsx, and
  SelectLLMProviderBase's own nested Popover) — matched via
  `[data-slot="popover-content"]`, the trigger's `aria-haspopup="listbox"`,
  and `getByRole("option")` for the list items instead of antd classes.
  This is the shared helper behind most of the playground/observability
  failures: every acceptance test that needs to pick the mock test model
  (all 6 observability "view traces" tests, plus "Should run single view
  variant for chat") failed here before reaching the rest of the test.

Both fixes verified against a live rerun on the EE dev stack: the modal
fix turns "should show an error..." from a 60s .ant-modal timeout into a
14s pass, and the popover fix turns 6/6 observability failures into
passes reaching real trace data (one had a one-off slow-indexing retry,
unrelated to the selector).

Left uninvestigated (confirmed NOT a selector issue, so out of scope
here): "should run a single evaluation" and "should delete an evaluation
run" now advance past the modal into openAutoEvaluationRunFromList's
search-input flow and fail there on a toHaveValue mismatch — looks like a
typing/re-render race, not a stale selector.
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 9, 2026
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Blocked Blocked Aug 9, 2026 9:52pm

Request Review

@dosubot dosubot Bot added the tests label Aug 9, 2026
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@mmabrouk, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 4 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 4ef9de4c-f5fb-4329-b822-964286c5fdd2

📥 Commits

Reviewing files that changed from the base of the PR and between cd13ca3 and 9b73bd1.

📒 Files selected for processing (2)
  • web/oss/tests/playwright/acceptance/auto-evaluation/tests.ts
  • web/tests/tests/fixtures/base.fixture/providerHelpers/index.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Status Destroyed (PR closed)

Updated at 2026-08-09T22:02:47.043Z

@mmabrouk
mmabrouk merged commit 680e38f into release/v0.112.0 Aug 9, 2026
44 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant