Apply patch [skip ci]
This commit is contained in:
parent
26de468f5a
commit
c773372c30
@ -61,7 +61,9 @@ LOCAL_DEV_MODE="true"
|
|||||||
rm deno-x86_64-unknown-linux-gnu.zip
|
rm deno-x86_64-unknown-linux-gnu.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
Ensure the `deno` executable is available in your system's PATH. The above instructions place it in `/usr/local/bin/`, which is typically included in the PATH.
|
Ensure the `deno` executable is available in your system's PATH. The above
|
||||||
|
instructions place it in `/usr/local/bin/`, which is typically included in the
|
||||||
|
PATH.
|
||||||
|
|
||||||
2. Clone repository and navigate to project directory
|
2. Clone repository and navigate to project directory
|
||||||
3. Set up environment variables (copy `.env.example` to `.env`)
|
3. Set up environment variables (copy `.env.example` to `.env`)
|
||||||
@ -81,7 +83,9 @@ Ensure the `deno` executable is available in your system's PATH. The above instr
|
|||||||
2. Run `deno task check` to validate code quality
|
2. Run `deno task check` to validate code quality
|
||||||
3. Test with `deno task test` and `deno task e2e`
|
3. Test with `deno task test` and `deno task e2e`
|
||||||
4. Deno KV handles data persistence automatically
|
4. Deno KV handles data persistence automatically
|
||||||
5. **File-Level Validation**: When coding, ensure compliance by running the following commands on the specific file being modified (replace `routes/index.tsx` with your file path):
|
5. **File-Level Validation**: When coding, ensure compliance by running the
|
||||||
|
following commands on the specific file being modified (replace
|
||||||
|
`routes/index.tsx` with your file path):
|
||||||
```bash
|
```bash
|
||||||
deno check routes/index.tsx
|
deno check routes/index.tsx
|
||||||
deno fmt routes/index.tsx
|
deno fmt routes/index.tsx
|
||||||
@ -154,4 +158,3 @@ Ensure the `deno` executable is available in your system's PATH. The above instr
|
|||||||
- Follow OWASP security guidelines
|
- Follow OWASP security guidelines
|
||||||
- Use local authentication to avoid external dependencies
|
- Use local authentication to avoid external dependencies
|
||||||
- Regular security audits and dependency updates
|
- Regular security audits and dependency updates
|
||||||
|
|
||||||
|
|||||||
11
TODO.md
11
TODO.md
@ -3,9 +3,12 @@
|
|||||||
## TypeScript Errors Found (34 total)
|
## TypeScript Errors Found (34 total)
|
||||||
|
|
||||||
### Primary Issue: Missing Playwright Dependency
|
### Primary Issue: Missing Playwright Dependency
|
||||||
Multiple files have `TS2307: Import "@playwright/test" not a dependency and not in import map`
|
|
||||||
|
Multiple files have
|
||||||
|
`TS2307: Import "@playwright/test" not a dependency and not in import map`
|
||||||
|
|
||||||
**Affected Files:**
|
**Affected Files:**
|
||||||
|
|
||||||
- tests/e2e/document-api.spec.ts:1:36
|
- tests/e2e/document-api.spec.ts:1:36
|
||||||
- tests/e2e/documents.spec.ts:1:36
|
- tests/e2e/documents.spec.ts:1:36
|
||||||
- tests/e2e/financial-api.spec.ts:1:36
|
- tests/e2e/financial-api.spec.ts:1:36
|
||||||
@ -22,19 +25,23 @@ Multiple files have `TS2307: Import "@playwright/test" not a dependency and not
|
|||||||
- tests/e2e/tenant-dashboard.spec.ts:1:36
|
- tests/e2e/tenant-dashboard.spec.ts:1:36
|
||||||
|
|
||||||
### Secondary Issue: Implicit Any Types
|
### Secondary Issue: Implicit Any Types
|
||||||
|
|
||||||
`TS7031: Binding element` errors for untyped parameters:
|
`TS7031: Binding element` errors for untyped parameters:
|
||||||
|
|
||||||
**Files with untyped `page` parameter:**
|
**Files with untyped `page` parameter:**
|
||||||
|
|
||||||
- tests/e2e/documents.spec.ts (lines 4:61, 29:63)
|
- tests/e2e/documents.spec.ts (lines 4:61, 29:63)
|
||||||
- tests/e2e/financial-ui.spec.ts (lines 4:60, 19:71)
|
- tests/e2e/financial-ui.spec.ts (lines 4:60, 19:71)
|
||||||
- tests/e2e/guest-home.spec.ts (lines 4:26, 8:62, 24:58)
|
- tests/e2e/guest-home.spec.ts (lines 4:26, 8:62, 24:58)
|
||||||
- tests/e2e/tenant-dashboard.spec.ts (lines 4:68, 18:67, 31:58, 50:68, 70:62)
|
- tests/e2e/tenant-dashboard.spec.ts (lines 4:68, 18:67, 31:58, 50:68, 70:62)
|
||||||
|
|
||||||
**Files with untyped `request` parameter:**
|
**Files with untyped `request` parameter:**
|
||||||
|
|
||||||
- tests/e2e/document-api.spec.ts (lines 4:75, 70:78)
|
- tests/e2e/document-api.spec.ts (lines 4:75, 70:78)
|
||||||
- tests/e2e/financial-api.spec.ts (lines 4:68, 19:59, 40:65, 76:66)
|
- tests/e2e/financial-api.spec.ts (lines 4:68, 19:59, 40:65, 76:66)
|
||||||
|
|
||||||
**Files with other untyped parameters:**
|
**Files with other untyped parameters:**
|
||||||
|
|
||||||
- tests/e2e/helpers.ts:7:8 - `({ now })` parameter
|
- tests/e2e/helpers.ts:7:8 - `({ now })` parameter
|
||||||
- tests/e2e/helpers.ts:82:31 - `({ id })` parameter
|
- tests/e2e/helpers.ts:82:31 - `({ id })` parameter
|
||||||
|
|
||||||
@ -51,7 +58,7 @@ Multiple files have `TS2307: Import "@playwright/test" not a dependency and not
|
|||||||
|
|
||||||
3. **Example fix pattern:**
|
3. **Example fix pattern:**
|
||||||
```typescript
|
```typescript
|
||||||
import { Page, Request, 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
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
"gcs": "https://deno.land/x/google_cloud_storage/mod.ts",
|
"gcs": "https://deno.land/x/google_cloud_storage/mod.ts",
|
||||||
"google-cloud-storage": "npm:@google-cloud/storage",
|
"google-cloud-storage": "npm:@google-cloud/storage",
|
||||||
"gLog": "npm:google-logging-utils",
|
"gLog": "npm:google-logging-utils",
|
||||||
"cosmos": "npm:@azure/cosmos"
|
"cosmos": "npm:@azure/cosmos",
|
||||||
"@playwright/test": "npm:@playwright/test"
|
"@playwright/test": "npm:@playwright/test"
|
||||||
},
|
},
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
|||||||
@ -61,46 +61,45 @@ export default define.page(function TenantSettingsPage({
|
|||||||
}: {
|
}: {
|
||||||
data: SettingsPageData;
|
data: SettingsPageData;
|
||||||
}) {
|
}) {
|
||||||
const { user, error } = data as SettingsPageData;
|
const { user, error } = data as SettingsPageData;
|
||||||
|
|
||||||
if (error) {
|
|
||||||
return (
|
|
||||||
<div class="min-h-screen bg-gray-50 p-8">
|
|
||||||
<div class="max-w-4xl mx-auto">
|
|
||||||
<h1 class="text-3xl font-bold text-red-600 mb-4">Error</h1>
|
|
||||||
<p class="text-gray-700">{error}</p>
|
|
||||||
<div class="mt-6">
|
|
||||||
<a
|
|
||||||
href="/tenant/dashboard"
|
|
||||||
class="text-blue-600 hover:text-blue-500 font-medium"
|
|
||||||
>
|
|
||||||
Go to Dashboard
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (error) {
|
||||||
return (
|
return (
|
||||||
<div class="min-h-screen bg-gray-50">
|
<div class="min-h-screen bg-gray-50 p-8">
|
||||||
{/* Header */}
|
<div class="max-w-4xl mx-auto">
|
||||||
<div class="bg-white shadow">
|
<h1 class="text-3xl font-bold text-red-600 mb-4">Error</h1>
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
<p class="text-gray-700">{error}</p>
|
||||||
<div class="py-6">
|
<div class="mt-6">
|
||||||
<h1 class="text-3xl font-bold text-gray-900">Tenant Settings</h1>
|
<a
|
||||||
<p class="mt-1 text-sm text-gray-500">
|
href="/tenant/dashboard"
|
||||||
Manage your notification and payment preferences.
|
class="text-blue-600 hover:text-blue-500 font-medium"
|
||||||
</p>
|
>
|
||||||
</div>
|
Go to Dashboard
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Main Content */}
|
|
||||||
<div class="max-w-4xl mx-auto sm:px-6 lg:px-8 py-8">
|
|
||||||
<TenantSettings user={user} />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
}
|
||||||
);
|
|
||||||
|
return (
|
||||||
|
<div class="min-h-screen bg-gray-50">
|
||||||
|
{/* Header */}
|
||||||
|
<div class="bg-white shadow">
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
<div class="py-6">
|
||||||
|
<h1 class="text-3xl font-bold text-gray-900">Tenant Settings</h1>
|
||||||
|
<p class="mt-1 text-sm text-gray-500">
|
||||||
|
Manage your notification and payment preferences.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Main Content */}
|
||||||
|
<div class="max-w-4xl mx-auto sm:px-6 lg:px-8 py-8">
|
||||||
|
<TenantSettings user={user} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { expect, test, type APIRequestContext } from "@playwright/test";
|
import { type APIRequestContext, expect, test } from "@playwright/test";
|
||||||
import { e2eHeaders } from "./helpers.ts";
|
import { e2eHeaders } from "./helpers.ts";
|
||||||
|
|
||||||
test("lease document API supports create, retrieve, and delete", async ({ request }: { request: APIRequestContext }) => {
|
test("lease document API supports create, retrieve, and delete", async ({ request }: { request: APIRequestContext }) => {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { expect, test, type Page } from "@playwright/test";
|
import { expect, type Page, test } from "@playwright/test";
|
||||||
import { applyDeterministicPage, useE2EUser } from "./helpers.ts";
|
import { applyDeterministicPage, useE2EUser } from "./helpers.ts";
|
||||||
|
|
||||||
test("tenant can review and sign lease documents", async ({ page }: { page: Page }) => {
|
test("tenant can review and sign lease documents", async ({ page }: { page: Page }) => {
|
||||||
@ -54,4 +54,3 @@ test("landlord can review and sign lease documents", async ({ page }: { page: Pa
|
|||||||
}).first();
|
}).first();
|
||||||
await expect(updatedRow).toContainText("Signed");
|
await expect(updatedRow).toContainText("Signed");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { expect, test, type APIRequestContext } from "@playwright/test";
|
import { type APIRequestContext, expect, test } from "@playwright/test";
|
||||||
import { e2eHeaders } from "./helpers.ts";
|
import { e2eHeaders } from "./helpers.ts";
|
||||||
|
|
||||||
test("tenant payment methods API returns default method", async ({ request }: { request: APIRequestContext }) => {
|
test("tenant payment methods API returns default method", async ({ request }: { request: APIRequestContext }) => {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { expect, test, type Page } from "@playwright/test";
|
import { expect, type Page, test } from "@playwright/test";
|
||||||
import { applyDeterministicPage, useE2EUser } from "./helpers.ts";
|
import { applyDeterministicPage, useE2EUser } from "./helpers.ts";
|
||||||
|
|
||||||
test("tenant payment history surfaces late fees", async ({ page }: { page: Page }) => {
|
test("tenant payment history surfaces late fees", async ({ page }: { page: Page }) => {
|
||||||
@ -35,4 +35,3 @@ test("landlord rent collection highlights overdue payments", async ({ page }: {
|
|||||||
await expect(overdueCard).toContainText("1");
|
await expect(overdueCard).toContainText("1");
|
||||||
await expect(lateFeeCard).toContainText("$50");
|
await expect(lateFeeCard).toContainText("$50");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { expect, test, type Page } from "@playwright/test";
|
import { expect, type Page, test } from "@playwright/test";
|
||||||
import { applyDeterministicPage } from "./helpers.ts";
|
import { applyDeterministicPage } from "./helpers.ts";
|
||||||
|
|
||||||
test.beforeEach(async ({ page }) => {
|
test.beforeEach(async ({ page }) => {
|
||||||
@ -32,4 +32,3 @@ test("guest landing shows system ready banner", async ({ page }: { page: Page })
|
|||||||
page.locator("form[action='/auth/login']").filter({ hasText: "ENTER" }),
|
page.locator("form[action='/auth/login']").filter({ hasText: "ENTER" }),
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { expect, test, Page } from "@playwright/test";
|
import { expect, Page, test } from "@playwright/test";
|
||||||
import { applyDeterministicPage, e2eHeaders, useE2EUser } from "./helpers.ts";
|
import { applyDeterministicPage, e2eHeaders, useE2EUser } from "./helpers.ts";
|
||||||
|
|
||||||
test("landlord can generate a tenant invite email", async ({ page }: { page: Page }) => {
|
test("landlord can generate a tenant invite email", async ({ page }: { page: Page }) => {
|
||||||
@ -102,4 +102,3 @@ test("tenant invite preview shows property details and actions", async ({ page }
|
|||||||
await expect(page.getByRole("button", { name: /decline/i })).toBeVisible();
|
await expect(page.getByRole("button", { name: /decline/i })).toBeVisible();
|
||||||
await expect(page.getByRole("link", { name: /cancel/i })).toBeVisible();
|
await expect(page.getByRole("link", { name: /cancel/i })).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { expect, test, Page } from "@playwright/test";
|
import { expect, Page, test } from "@playwright/test";
|
||||||
import { applyDeterministicPage, useE2EUser } from "./helpers.ts";
|
import { applyDeterministicPage, useE2EUser } from "./helpers.ts";
|
||||||
|
|
||||||
test("landlord dashboard surfaces portfolio activity", async ({ page }: { page: Page }) => {
|
test("landlord dashboard surfaces portfolio activity", async ({ page }: { page: Page }) => {
|
||||||
@ -75,4 +75,3 @@ test("landlord can update maintenance status", async ({ page }: { page: Page })
|
|||||||
await expect(page).toHaveURL(/\/landlord\/maintenance/);
|
await expect(page).toHaveURL(/\/landlord\/maintenance/);
|
||||||
await expect(statusSelect).toHaveValue("in_progress");
|
await expect(statusSelect).toHaveValue("in_progress");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { expect, test, Page } from "@playwright/test";
|
import { expect, Page, test } from "@playwright/test";
|
||||||
import { applyDeterministicPage, useE2EUser } from "./helpers.ts";
|
import { applyDeterministicPage, useE2EUser } from "./helpers.ts";
|
||||||
|
|
||||||
test("landlord messages view paginates conversations", async ({ page }: { page: Page }) => {
|
test("landlord messages view paginates conversations", async ({ page }: { page: Page }) => {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { expect, test, Page } from "@playwright/test";
|
import { expect, Page, test } from "@playwright/test";
|
||||||
import { applyDeterministicPage, useE2EUser } from "./helpers.ts";
|
import { applyDeterministicPage, useE2EUser } from "./helpers.ts";
|
||||||
|
|
||||||
test("landlord profile setup advances to property details", async ({ page }: { page: Page }) => {
|
test("landlord profile setup advances to property details", async ({ page }: { page: Page }) => {
|
||||||
@ -49,4 +49,3 @@ test("property setup submits and lands on landlord dashboard", async ({ page }:
|
|||||||
await expect(page.getByRole("heading", { name: /landlord dashboard/i }))
|
await expect(page.getByRole("heading", { name: /landlord dashboard/i }))
|
||||||
.toBeVisible();
|
.toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { expect, test, Page } from "@playwright/test";
|
import { expect, Page, test } from "@playwright/test";
|
||||||
import { applyDeterministicPage, useE2EUser } from "./helpers.ts";
|
import { applyDeterministicPage, useE2EUser } from "./helpers.ts";
|
||||||
|
|
||||||
test("landlord sees multi-property portfolio overview", async ({ page }: { page: Page }) => {
|
test("landlord sees multi-property portfolio overview", async ({ page }: { page: Page }) => {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { expect, test, Page } from "@playwright/test";
|
import { expect, Page, test } from "@playwright/test";
|
||||||
import { applyDeterministicPage, e2eHeaders, useE2EUser } from "./helpers.ts";
|
import { applyDeterministicPage, e2eHeaders, useE2EUser } from "./helpers.ts";
|
||||||
|
|
||||||
test("tenant onboarding lets renters apply and reach dashboard", async ({ page }: { page: Page }) => {
|
test("tenant onboarding lets renters apply and reach dashboard", async ({ page }: { page: Page }) => {
|
||||||
@ -77,4 +77,3 @@ test("invite links highlight the selected rental on onboarding", async ({ page }
|
|||||||
await expect(page.getByText("Skyline Lofts")).toBeVisible();
|
await expect(page.getByText("Skyline Lofts")).toBeVisible();
|
||||||
await expect(page.getByLabel(/select a property/i)).toHaveCount(0);
|
await expect(page.getByLabel(/select a property/i)).toHaveCount(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { expect, test, Page } from "@playwright/test";
|
import { expect, Page, test } from "@playwright/test";
|
||||||
import { applyDeterministicPage, useE2EUser } from "./helpers.ts";
|
import { applyDeterministicPage, useE2EUser } from "./helpers.ts";
|
||||||
|
|
||||||
test("landlord can send reminder and tenant receives it", async ({ page }: { page: Page }) => {
|
test("landlord can send reminder and tenant receives it", async ({ page }: { page: Page }) => {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { expect, test, type Page } from "@playwright/test";
|
import { expect, type Page, test } from "@playwright/test";
|
||||||
import { applyDeterministicPage, useE2EUser } from "./helpers.ts";
|
import { applyDeterministicPage, useE2EUser } from "./helpers.ts";
|
||||||
|
|
||||||
test("tenant dashboard shows lease summary and activity", async ({ page }: { page: Page }) => {
|
test("tenant dashboard shows lease summary and activity", async ({ page }: { page: Page }) => {
|
||||||
@ -81,4 +81,3 @@ test("tenant rent pay flow accepts payment method", async ({ page }: { page: Pag
|
|||||||
await submitButton.click();
|
await submitButton.click();
|
||||||
await expect(page).toHaveURL(/\/tenant\/rent\/confirmation\?success=true/);
|
await expect(page).toHaveURL(/\/tenant\/rent\/confirmation\?success=true/);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user