Repository navigation
fix: update dialog selectors to avoid matching toast notifications in… - #737
Conversation
There was a problem hiding this comment.
ℹ️ Minor suggestions only — the selector rewrites all match the current base-ui components.
Reviewed changes
- Dialog vs. toast (
mfa,passkeys,git-agent-tab) — dialog locators now intersectgetByRole("dialog")with:not([data-slot="toast"]), which correctly drops base-ui toasts (their root carries bothrole="dialog"anddata-slot="toast"). - Sprint modals (
sprint-lifecycle) —modal()targets[data-slot="dialog-content"], [data-slot="alert-dialog-content"]instead ofdiv.fixed.inset-0; the quick-create negative check reuses the same constant. - View settings (
interaction-views) — newrowLabel/rowButton/chooseOptionhelpers drive the base-uiSelectrows (role=combobox→role=option),discardAndClosehandles the new unsaved-changes confirmation, and value assertions usetoContainText. - Option and tab roles —
conversationsandrole-badges-selectorpickrole=optionitems fromSearchableList;environmentsasserts the detail-header tab bar asrole=tab. - Save confirmation (
git-automation) — asserts the global "Git automation settings updated successfully" toast instead of the removed inline "Saved.".
I checked each new selector against the components it targets (toast.tsx data-slot="toast" + role="dialog", dialog-content/alert-dialog-content slots, SelectTrigger's role="combobox", SelectItem's role="option", the Tabs header in environment-detail.tsx, and the gitSettings toast subject) and they line up.
ℹ️ Feature files still describe the replaced UI
Every spec here opens with // spec: features/... and those feature files are the documented source of truth, but two of them still describe the pre-refactor behavior, so the spec and its scenario text now disagree.
Technical details
# Feature/spec drift left by the spec updates
## Affected sites
- `apps/e2e/features/projects/git-automation.feature:61` — `Then "Saved." is shown and the warning disappears`
still names the inline confirmation this PR stops asserting.
- `apps/e2e/features/projects/interaction-views.feature:594-599` — the "Closing the popup without
saving discards unsaved changes" scenario goes straight from Escape to "the settings popup should
close", with no mention of the new "Discard unsaved changes?" confirmation the spec now clicks through.
## Required outcome
- Both scenario steps describe what the specs actually assert (the toast title for git automation;
Escape → discard confirmation → popup closes for view settings).deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Shared dialog helper —
apps/e2e/tests/helpers/dialog.tsnow exportsDIALOG_CONTENTanddialogPanel(), documenting that base-ui toasts carryrole="dialog"+data-slot="toast". - Dialog sites consolidated — the seven
mfa/passkeys/git-agent-tabdialog locators now calldialogPanel(page)instead of repeating the toast-exclusion intersection inline. - Sprint modals —
sprint-lifecycleimportsDIALOG_CONTENTfrom the helper, and its header comment andmodal()docstring now describe Dialog/AlertDialog panels instead of plaindivs. - Role filter —
role-badges-selectorselects the filter option with{ name: describedRole, exact: true }. - Feature files synced —
git-automation.featurenow names the success toast, andinteraction-views.featureincludes the "Discard unsaved changes?" → "Discard" steps.
I re-checked the helper against the components it targets: DeleteGitIdentityDialog and the MFA/passkey dialogs are Dialog (role=dialog), the view-settings-panel.tsx close handler only prompts when the draft differs, and common.toast.updated + the gitSettings subject produce the asserted toast copy exactly. biome lint on apps/e2e still passes.
The one remaining validation step is the PR body's own caveat: these specs have not yet been run against the e2e stack, so dispatching e2e-tests.yml on the branch is what proves the selectors end to end.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Summary
Fixes the failing
e2e-testsrun 43390604283 (about 35–40 failures per browser, the same specs in every browser). The specs were out of date with a recent UI refactor (base-ui dialogs, selects, tabs, toasts); no app code changes.Changes
sprint-lifecycle(~25 tests)Dialog/AlertDialog, notdiv.fixed.inset-0modal()targetsdialog-content/alert-dialog-content; "no dialog" check uses the same locatormfa,passkeys,git-agent-tabrole="dialog", sogetByRole("dialog")matched the success toast once the modal closed[data-slot="toast"]from the dialog locatorinteraction-views(7 tests)Selectcomboboxes withoptionitems; Escape with unsaved edits opens a "Discard unsaved changes?" dialogrowLabel/rowButton/chooseOption, added a discard stepconversations(3),role-badges-selector(filter)role=optionoptionenvironmentstabelementstabgit-automation(2)Not changed
passkeys:212,git-task-detail:195andsubtask-hierarchy:415failed only in chromium on the first attempt (reported as flaky), and the webkit-onlyrole-badges-selectorfailures pass in chromium, so they are left alone.Verification
tscreports no errors in the touched files.e2e-testsworkflow on this branch to confirm.