sciagent code + Gitea Actions CI/CD
CI/CD / backend (push) Failing after 2m8s
CI/CD / frontend (push) Failing after 1m40s
CI/CD / deploy (push) Has been skipped

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Thinh Lam
2026-06-30 09:38:30 +07:00
commit 688fac73e9
1167 changed files with 158244 additions and 0 deletions
@@ -0,0 +1,42 @@
/**
* Full-browser check (Playwright) for the same class of bug as
* `src/components/InitiativeApplicationForm.draftTyping.integration.test.tsx`.
*
* Requires a **running** frontend (default E2E_BASE_URL) and an **authenticated** applicant
* session with the « Đơn Đề nghị Công nhận » tab reachable (Báo cáo gate completed if applicable).
*
* Run (example):
* cd fe0 && npm run dev
* E2E_FORM_TYPING=1 npm run test:e2e -- e2e/initiative-application-form-typing.spec.ts
*/
import { test, expect } from "@playwright/test";
test.describe("Initiative Đơn form — keystroke regressions", () => {
test.skip(
process.env.E2E_FORM_TYPING !== "1",
"Opt-in only: export E2E_FORM_TYPING=1 with a logged-in dev server.",
);
test("browser typing does not surface React Maximum update depth in console", async ({ page }) => {
const panics: string[] = [];
page.on("console", (msg) => {
if (msg.type() !== "error" && msg.type() !== "warning") return;
const t = msg.text();
if (/Maximum update depth exceeded|Too many re-renders/u.test(t)) panics.push(t);
});
await page.goto("/dashboard", { waitUntil: "domcontentloaded", timeout: 30_000 });
const appTab = page.getByRole("tab", { name: /Đơn Đ ngh Công nhn/u });
await expect(appTab).toBeVisible({ timeout: 20_000 });
await appTab.click();
const summary = page.locator("textarea.min-h-32").first();
await expect(summary).toBeVisible({ timeout: 25_000 });
await page.getByPlaceholder("Nhập tên sáng kiến...").focus();
await page.keyboard.insertText("Đánh máy ");
await summary.click();
await page.keyboard.insertText("Mô tả từng ký tự ");
await page.waitForTimeout(500);
expect(panics).toEqual([]);
});
});