fix(tests): retire the remaining stale antd selectors - #5854
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
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 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 configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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. Comment |
Railway Preview Environment
Updated at 2026-08-09T22:02:47.043Z |
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'sopenAutoEvaluationModalmatched.ant-modal.NewEvaluationModalrenders throughEnhancedModal, 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'selectMockModelmatched.ant-popover/.ant-select/.ant-select-dropdownfor 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'saria-haspopup="listbox", andgetByRole("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 bothuse-api/index.tstests fail inside an unguardedpage.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-modalfix 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 6observability/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:165and bothuse-api/index.tstests — the documented pre-existingnetworkidletrap.agent-chat/attach-send-render-reload.spec.ts— fails in ~300ms withPOST /workflows/ -> 404(an HTML 404, not JSON). Root cause:apiBase(page)inagent-chat/tests.tsbuilds offnew URL(page.url()), but the test never navigates before seeding, sopage.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.openAutoEvaluationRunFromList's search-input flow and fail there on atoHaveValuemismatch — looks like a typing/re-render race, not a stale selector.evaluators/index.ts:245's.ant-messagetoast wait,evaluators/tests.ts:84'swaitForEvaluatorsQuerytimeout,human-annotation/tests.ts:798's annotation-form predicate timeout, andtestsset-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
.ant-modalfix confirmed: "mismatched testset" test now passes cleanly (14s)