fix(FN-2577): preserve Todos access and TodoView interaction behavior
- Keep the view overflow trigger available when Todos is supported so the Todos view remains reachable - Update TodoView list rows to use an explicit select button and align active-state assertions with the new structure - Restore keyboard focus styling and mobile action visibility in TodoView CSS for accessibility and usability - Harden CLI extension test cleanup with retry logic for transient ENOTEMPTY/EBUSY tempdir removal errors
This commit is contained in:
@@ -2,6 +2,7 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
|
||||
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
import { tmpdir } from "node:os";
|
||||
import { setTimeout as delay } from "node:timers/promises";
|
||||
|
||||
// Each test spins up a fresh temp workspace, mounts the full extension API,
|
||||
// registers tools, and exercises them through real TaskStore/MissionStore
|
||||
@@ -79,6 +80,28 @@ function makeCtx(cwd: string) {
|
||||
return { cwd } as any;
|
||||
}
|
||||
|
||||
async function removeDirWithRetries(path: string) {
|
||||
const maxAttempts = 4;
|
||||
|
||||
for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
|
||||
try {
|
||||
await rm(path, { recursive: true, force: true });
|
||||
return;
|
||||
} catch (error) {
|
||||
const code = (error as NodeJS.ErrnoException).code;
|
||||
if (code !== "ENOTEMPTY" && code !== "EBUSY") {
|
||||
throw error;
|
||||
}
|
||||
|
||||
if (attempt === maxAttempts) {
|
||||
throw error;
|
||||
}
|
||||
|
||||
await delay(25 * attempt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ── Tests ──────────────────────────────────────────────────────────
|
||||
|
||||
// Skipped: 39 tests × ~1-4s each (~62s total) exercise every fn pi tool
|
||||
@@ -102,7 +125,7 @@ describe.skip("fn pi extension", () => {
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await rm(tmpDir, { recursive: true, force: true });
|
||||
await removeDirWithRetries(tmpDir);
|
||||
});
|
||||
|
||||
describe("registration", () => {
|
||||
|
||||
Reference in New Issue
Block a user