test(settings): add UnsavedChangesGuard test coverage (9 cases)

Also fixes Radix aria-describedby accessibility warning by adding
explicit aria-describedby={undefined} to AlertDialog.Content.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Molecule AI · core-fe 2026-05-12 07:51:45 +00:00
parent 76d715d597
commit 500d1811fa

View File

@ -22,7 +22,10 @@ export function UnsavedChangesGuard({
onDiscard,
}: UnsavedChangesGuardProps) {
return (
<AlertDialog.Root open={open} onOpenChange={(o) => { if (!o) onKeepEditing(); }}>
<AlertDialog.Root
open={open}
onOpenChange={(o) => { if (!o) onKeepEditing(); }}
>
<AlertDialog.Portal>
<AlertDialog.Overlay className="guard-dialog__overlay" />
<AlertDialog.Content