Files
lobehub/apps
Arvin Xu 66abd805ac test: add controllers tests for desktop (#10536)
*  test: add unit tests for UploadFileCtr

Add comprehensive unit tests for UploadFileCtr covering:
- uploadFile: file upload functionality
- getFileUrlById: get file path by ID
- getFileHTTPURL: get HTTP URL for file
- deleteFiles: delete multiple files
- createFile: create new file

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

*  test: add unit tests for RemoteServerSyncCtr

Add comprehensive unit tests for RemoteServerSyncCtr covering:
- proxyTRPCRequest: proxy request handling with various configurations
- 401 token refresh and retry mechanism
- Error handling for network failures
- afterAppReady: IPC handler registration
- destroy: cleanup resources

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

*  test: add unit tests for McpInstallCtr

Add comprehensive unit tests for McpInstallController covering:
- Missing required parameters validation
- Third-party marketplace schema requirement
- Official market without schema
- Invalid JSON schema parsing
- Schema structure validation
- Schema identifier matching
- Valid stdio and http schema handling
- Invalid URL validation for http config
- Unknown config type handling
- BrowserManager availability check
- Optional fields handling
- Env configuration support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

*  test: add unit tests for SystemCtr

Add comprehensive unit tests for SystemController covering:
- getAppState: system info and user paths
- checkAccessibilityForMacOS: macOS accessibility check
- openExternalLink: external link opening
- updateLocale: locale update and broadcast
- updateThemeModeHandler: theme mode update
- getDatabasePath: database path retrieval
- getDatabaseSchemaHash: schema hash read/write
- getUserDataPath: user data path
- setDatabaseSchemaHash: schema hash persistence
- afterAppReady: system theme listener initialization

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

*  test: add unit tests for NotificationCtr

Add comprehensive unit tests for NotificationCtr covering:
- afterAppReady: notification setup for different platforms
- showDesktopNotification: notification display with various conditions
- isMainWindowHidden: window visibility state detection
- Error handling for notification failures
- Platform-specific behavior (Windows, macOS)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

*  test: add unit tests for RemoteServerConfigCtr

Add comprehensive unit tests for RemoteServerConfigCtr covering:
- getRemoteServerConfig: configuration retrieval
- setRemoteServerConfig: configuration update
- clearRemoteServerConfig: configuration and token clearing
- saveTokens: encrypted and unencrypted token storage
- getAccessToken/getRefreshToken: token decryption
- clearTokens: token memory and store clearing
- getTokenExpiresAt: expiration time retrieval
- isTokenExpiringSoon: expiration check with buffer
- refreshAccessToken: token refresh with error handling
- afterAppReady: token loading from store
- getRemoteServerUrl: URL resolution for cloud/selfHost modes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-01 22:50:45 +08:00
..