Jeff Emmett
|
00a21f9610
|
feat: add worker unit tests for board permissions
Comprehensive test coverage for the board permissions system:
- handleGetPermission (authenticated/unauthenticated users)
- handleListPermissions (admin filtering)
- handleGrantPermission (editor assignment)
- handleRevokePermission (editor removal)
- handleUpdateBoard (protected status, global access)
- handleCreateAccessToken (security validation)
- handleListAccessTokens (admin-only access)
- handleRevokeAccessToken (token deletion)
- handleGetGlobalAdminStatus (admin checks)
- handleGetBoardInfo (board metadata)
- handleListEditors (editor listing)
Tests cover key security scenarios:
- Anonymous users get edit on new boards (permission model)
- Protected boards require authentication
- Access tokens cannot grant admin permissions
- View permission returned when database unavailable (secure default)
30 tests total, all passing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2025-12-18 02:58:22 -05:00 |
Jeff Emmett
|
4f6ff1797f
|
feat: add worker unit tests for CryptID auth handlers
- Create 25 unit tests for CryptID authentication handlers
- Add vitest.worker.config.ts for worker test environment
- Update CI workflow to run worker tests
- Test coverage for:
- handleCheckUsername (validation, normalization)
- handleLinkEmail (validation, database errors)
- handleVerifyEmail (token validation)
- handleRequestDeviceLink (validation, 404 handling)
- handleLinkDevice (token validation)
- handleLookup (publicKey validation)
- handleGetDevices (auth validation)
- handleRevokeDevice (auth and validation)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2025-12-18 02:46:28 -05:00 |
Jeff Emmett
|
a662b4798f
|
feat: add comprehensive test suite for CRDT, offline storage, and auth
- Add Vitest for unit tests with jsdom environment
- Add Playwright for E2E browser testing
- Create 27 unit tests for WebCrypto and IndexedDB
- Create 27 E2E tests covering:
- Real-time collaboration (CRDT sync)
- Offline storage and cold reload
- CryptID authentication flows
- Add CI/CD workflow with coverage gates
- Configure test scripts in package.json
Test Results:
- Unit tests: 27 passed
- E2E tests: 26 passed, 1 flaky
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2025-12-18 02:42:01 -05:00 |