1.5 KiB
1.5 KiB
I will implement extensive integration tests for Storage and Authentication, and add a placeholder for Edge Functions (as they are not yet implemented in the core).
1. Database Setup Update
I will update tests/integration/setup_db.sql to create specific buckets for testing:
public-bucket: Publicly accessible.private-bucket: Private (requires authentication).
2. Authentication Tests (auth.test.ts)
I will expand the authentication tests to cover:
- Session Persistence: Verify
getUser()returns the logged-in user. - Token Refresh: Verify
refreshSession()issues a new token. - Error Handling: Verify robust handling of invalid credentials.
3. Storage Tests (storage.test.ts)
I will expand storage tests to verify Row Level Security (RLS) and permissions:
- Public Access: Verify
anonusers can download frompublic-bucket. - Private Access: Verify
anonusers cannot download fromprivate-bucket. - Upload Permissions: Verify
authenticatedusers can upload toprivate-bucket. - Deletion: Verify
authenticatedusers can delete their own files (if delete is implemented, otherwise note it).
4. Edge Functions Tests (functions.test.ts)
I will create a new test file tests/integration/functions.test.ts that:
- Marks the test suite as
skipped. - Explains that Edge Functions are specified but not yet implemented in the current codebase.
This ensures we have a comprehensive regression suite for the implemented features while tracking future requirements.