Files
fusion/packages/dashboard/app/components/__tests__/mobile-dropdown-positioning.test.tsx
gsxdsm f58fb8955a fix(engine-tests): eliminate temp-dir leak and raise subprocess guard for concurrent workspace runs
Two engine merger tests created mkdtempSync workspaces directly in tmpdir()
under the tracked `fusion-test-` prefix; under full-suite concurrent load
the post-run check-test-isolation flagged them as leaks. Route both
(`merger-no-op-fix-finalize.test.ts`, `merger-verification-fix-already-on-main.test.ts`)
through FUSION_TEST_WORKER_ROOT like sibling merger tests so they nest
inside the already-tracked worker root.

Bump engine vitest subprocess guard from 60s to 120s and testTimeout to
30s — plain git commands (branch -d, worktree remove) queued behind
system contention during `pnpm -r --workspace-concurrency=2` runs were
timing out. The guard only fires on hangs, so healthy tests pay nothing.

Also bundles in-progress dashboard mobile-breakpoint regex/CSS test
updates and docs index additions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 20:20:42 -07:00

38 lines
1.5 KiB
TypeScript

import fs from "node:fs";
import { loadAllAppCss } from "../../test/cssFixture";
import path from "node:path";
import { describe, expect, it } from "vitest";
describe("mobile dropdown positioning and momentum scrolling css", () => {
it("includes iOS momentum scrolling for dep-dropdown", () => {
const css = loadAllAppCss();
expect(css).toMatch(/\.dep-dropdown[\s\S]*-webkit-overflow-scrolling:\s*touch;/);
});
it("includes iOS momentum scrolling for file-browser-list", () => {
const css = loadAllAppCss();
expect(css).toMatch(/\.file-browser-list[\s\S]*-webkit-overflow-scrolling:\s*touch;/);
});
it("includes modal momentum scrolling selectors inside the 768px mobile media query", () => {
const css = loadAllAppCss();
const momentumBlockMatch = css.match(/@media[^{]*\(max-width: 768px\)[^{]*\{[\s\S]*\/\* iOS momentum scrolling for all modal content areas \*\/[\s\S]*?\}/);
expect(momentumBlockMatch).toBeTruthy();
const block = momentumBlockMatch?.[0] ?? "";
expect(block).toContain(".modal-content");
expect(block).toContain(".modal-body");
expect(block).toContain(".modal-scroll");
expect(block).toContain(".task-detail-content");
expect(block).toContain(".agent-log-content");
expect(block).toContain(".file-browser-list");
expect(block).toContain(".settings-content");
expect(block).toContain(".activity-log-content");
expect(block).toContain("-webkit-overflow-scrolling: touch;");
});
});