Files
openidea/src/workbench/projectColor.test.ts
T
l0ng-ai 046fd37064 fix(ui): Match PyCharm project view, matched tags and text weight
- Project widget initials follow IDEA's AvatarUtils.initials ("idea" → "I").
- "Show directories with changed descendants" is off by default, as in IDEA.
- FileEntry gains `excluded`: only excluded folders get the excluded icon and
  dimming; git-ignored ones keep the plain icon and the ignored colour.
- `.github` folders get IDEA's GitHub folder icon.
- Matched tag names are never bold and use their own background
  (MATCHED_TAG_NAME); matched braces are bold in dark schemes only.
- Revert Greyscale antialiasing to `antialiased` for UI and editor; `auto`
  rendered text heavier than PyCharm.

Claude-Session: https://claude.ai/code/session_01SaPPsVPuk6ZTNsoUCNCbMv
2026-10-24 22:56:48 +08:00

16 lines
592 B
TypeScript

import { describe, expect, it } from "vitest";
import { projectInitials } from "./projectColor";
describe("projectInitials", () => {
it("follows IDEA's AvatarUtils.initials", () => {
expect(projectInitials("idea")).toBe("I");
expect(projectInitials("MyProject")).toBe("MP");
expect(projectInitials("OpenIDEA")).toBe("OI");
expect(projectInitials("py-demo")).toBe("PD");
expect(projectInitials("web demo")).toBe("WD");
expect(projectInitials("a.b.c")).toBe("AC");
expect(projectInitials("123abc")).toBe("A");
expect(projectInitials("")).toBe("?");
});
});