Files
ComfyUI_frontend/tests-ui
Christian Byrne 10748bdac9 [auth] handle auth/requires-recent-login for account deletion and password updates (#6109)
## Summary

Implemented error recovery system to handle Firebase
`auth/requires-recent-login` errors when deleting accounts or updating
passwords.


https://github.com/user-attachments/assets/92a79e2a-cff5-4b18-b529-dbaf5f2303f2

## Changes

- **What**: Added [ErrorRecoveryStrategy
pattern](https://firebase.google.com/docs/auth/web/manage-users#re-authenticate_a_user)
to `useErrorHandling` composable with automatic retry logic for
sensitive Firebase operations
- **Breaking**: None - recovery strategies are optional, all existing
code unchanged

## Technical Details

Firebase enforces
[reauthentication](https://firebase.google.com/docs/reference/js/auth#autherrorcodes)
for security-sensitive operations (account deletion, password changes)
after ~5 minutes of inactivity. Previously these operations failed with
cryptic error messages.

New flow:
1. Operation throws `auth/requires-recent-login`
2. Recovery strategy shows confirmation dialog
3. User logs out and re-authenticates
4. Operation automatically retries

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6109-auth-handle-auth-requires-recent-login-for-account-deletion-and-password-updates-28f6d73d36508119abf4ce30eecea976)
by [Unito](https://www.unito.io)
2025-10-18 01:24:52 -07:00
..

ComfyUI Frontend Testing Guide

This guide provides an overview of testing approaches used in the ComfyUI Frontend codebase. These guides are meant to document any particularities or nuances of writing tests in this codebase, rather than being a comprehensive guide to testing in general. By reading these guides first, you may save yourself some time when encountering issues.

Testing Documentation

Documentation for unit tests is organized into three guides:

Testing Structure

The ComfyUI Frontend project uses a mixed approach to unit test organization:

  • Component Tests: Located directly alongside their components with a .spec.ts extension
  • Unit Tests: Located in the tests-ui/tests/ directory
  • Store Tests: Located in the tests-ui/tests/store/ directory
  • Browser Tests: These are located in the browser_tests/ directory. There is a dedicated README in the browser_tests/ directory, so it will not be covered here.

Test Frameworks and Libraries

Our tests use the following frameworks and libraries:

Getting Started

To run the tests locally:

# Run unit tests
pnpm test:unit

# Run unit tests in watch mode
pnpm test:unit:dev

Refer to the specific guides for more detailed information on each testing type.