This commit is contained in:
Nathan Anderson 2026-01-20 14:11:35 -06:00
parent 7e8032e512
commit 948d48d4eb

88
TODO.md
View File

@ -1,55 +1,65 @@
# TODO - Deno Check Errors # TODO - Deno Check Errors
## TypeScript Errors Found (51 total) ## TypeScript Errors Found (34 total)
### Common Error Pattern ### Primary Issue: Missing Playwright Dependency
Most errors are `TS7031: Binding element 'page' implicitly has an 'any' type` in test files. Multiple files have `TS2307: Import "@playwright/test" not a dependency and not in import map`
### Files Requiring Fixes **Affected Files:**
- tests/e2e/document-api.spec.ts:1:36
- tests/e2e/documents.spec.ts:1:36
- tests/e2e/financial-api.spec.ts:1:36
- tests/e2e/financial-ui.spec.ts:1:36
- tests/e2e/guest-home.spec.ts:1:36
- tests/e2e/helpers.ts:1:36
- tests/e2e/invite-tenant.spec.ts:1:36
- tests/e2e/landlord-dashboard.spec.ts:1:36
- tests/e2e/landlord-messages.spec.ts:1:36
- tests/e2e/landlord-onboarding.spec.ts:1:36
- tests/e2e/multi-property.spec.ts:1:36
- tests/e2e/onboarding.spec.ts:1:36
- tests/e2e/reminders.spec.ts:1:36
- tests/e2e/tenant-dashboard.spec.ts:1:36
1. **tests/e2e/helpers.ts:82:31** - `({ id })` parameter has implicit any type ### Secondary Issue: Implicit Any Types
2. **tests/e2e/invite-tenant.spec.ts** - Multiple test functions with `page` parameter `TS7031: Binding element` errors for untyped parameters:
- Line 4:62
- Line 77:75 **Files with untyped `page` parameter:**
3. **tests/e2e/landlord-dashboard.spec.ts** - Multiple test functions with `page` parameter - tests/e2e/documents.spec.ts (lines 4:61, 29:63)
- Line 4:65 - tests/e2e/financial-ui.spec.ts (lines 4:60, 19:71)
- Line 27:68 - tests/e2e/guest-home.spec.ts (lines 4:26, 8:62, 24:58)
- Line 39:54 - tests/e2e/tenant-dashboard.spec.ts (lines 4:68, 18:67, 31:58, 50:68, 70:62)
- Line 64:57
4. **tests/e2e/landlord-messages.spec.ts** - Multiple test functions with `page` parameter **Files with untyped `request` parameter:**
- Line 4:65 - tests/e2e/document-api.spec.ts (lines 4:75, 70:78)
- Line 29:73 - tests/e2e/financial-api.spec.ts (lines 4:68, 19:59, 40:65, 76:66)
5. **tests/e2e/landlord-onboarding.spec.ts** - Multiple test functions with `page` parameter
- Line 4:70 **Files with other untyped parameters:**
- Line 28:73 - tests/e2e/helpers.ts:7:8 - `({ now })` parameter
6. **tests/e2e/multi-property.spec.ts:4:66** - Test function with `page` parameter - tests/e2e/helpers.ts:82:31 - `({ id })` parameter
7. **tests/e2e/onboarding.spec.ts** - Multiple test functions with `page` parameter
- Line 4:75
- Line 24:73
- Line 44:62
- Line 56:75
8. **tests/e2e/reminders.spec.ts:4:68** - Test function with `page` parameter
9. **tests/e2e/tenant-dashboard.spec.ts** - Multiple test functions with `page` parameter
- Line 4:68
- Line 18:67
- Line 31:58
- Line 50:68
- Line 70:62
## Required Actions ## Required Actions
1. **Add proper TypeScript types for Playwright test parameters** 1. **Install Playwright dependency:**
- Import Page type from `@playwright/test` ```bash
- Type the `page` parameter in all test functions deno add jsr:@playwright/test
- Type the `id` parameter in helpers.ts ```
2. **Example fix pattern:** 2. **Add proper TypeScript types for Playwright test parameters:**
- Import types from `@playwright/test`
- Type the `page`, `request`, `now`, and `id` parameters
3. **Example fix pattern:**
```typescript ```typescript
import { Page, TestInfo } from '@playwright/test'; import { Page, Request, TestInfo } from '@playwright/test';
test("example test", async ({ page }: { page: Page }) => { test("example test", async ({ page }: { page: Page }) => {
// test code // test code
}); });
test("api test", async ({ request }: { request: Request }) => {
// test code
});
``` ```
3. **Run deno check again after fixes to verify all errors resolved** 4. **Run deno check again after fixes to verify all errors resolved**