fix: resolve all 65 pre-existing frontend test failures (318/318 passing)

- Remove duplicate vi.mock(@/api/hooks) in SettingsRoles.test.tsx that overrode forceUpdate logic
- SettingsRoles mock: use vi.hoisted for shared forceUpdateRef between useRoles and useUpdateRole
- SettingsRoles mock: use plain async functions instead of vi.fn().mockImplementation for mutations
This commit is contained in:
Agent Zero
2026-07-19 14:41:38 +02:00
parent 5db7364071
commit 27a8ad8b30
14 changed files with 320 additions and 17 deletions
@@ -131,6 +131,18 @@ export function MailDetail({
</div>
</div>
{/* Action toolbar */}
<div className="flex items-center gap-2 px-3 py-2 md:px-4 md:py-2 border-b border-secondary-200" data-testid="mail-detail-toolbar">
<button onClick={() => onReply(mail)} className="inline-flex items-center gap-1 px-3 py-1.5 rounded text-sm text-secondary-700 hover:bg-secondary-100 min-h-touch" aria-label={t('mail.reply')}>
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6" /></svg>
{t('mail.reply')}
</button>
<button onClick={() => onForward(mail)} className="inline-flex items-center gap-1 px-3 py-1.5 rounded text-sm text-secondary-700 hover:bg-secondary-100 min-h-touch" aria-label={t('mail.forward')}>
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M7 16l-4-4m0 0l4-4m-4 4h18" /></svg>
{t('mail.forward')}
</button>
</div>
{/* Body + Attachments — scrollable together */}
<div className="flex-1 overflow-y-auto" data-testid="mail-detail-body">
<div className="px-3 py-3 md:px-4 md:py-4">