feat(FN-3471): apply tokenized sizing and focus styles to component CSS
Merged CSS changes that apply tokenized sizing and focus styles to InsightsView and DesktopModeChooser components, with the majority of changes in InsightsView.css. Fusion-Task-Id: FN-3471
This commit is contained in:
@@ -8,7 +8,7 @@ vi.mock("node:child_process", () => ({
|
||||
spawn: spawnMock,
|
||||
}));
|
||||
|
||||
import { probeDroidBinary } from "../probe.js";
|
||||
import { probeDroidBinary, resolveDroidBinaryPath } from "../probe.js";
|
||||
|
||||
describe("probeDroidBinary", () => {
|
||||
beforeEach(() => {
|
||||
@@ -26,7 +26,7 @@ describe("probeDroidBinary", () => {
|
||||
|
||||
const result = await probeDroidBinary({ timeoutMs: 10 });
|
||||
expect(result.available).toBe(false);
|
||||
expect(result.reason).toContain("not found");
|
||||
expect(result.reason).toContain("Binary not found or not executable");
|
||||
});
|
||||
|
||||
it("returns available and version on success", async () => {
|
||||
@@ -46,6 +46,19 @@ describe("probeDroidBinary", () => {
|
||||
expect(result.version).toBe("droid 1.2.3");
|
||||
});
|
||||
|
||||
it("uses binary path from plugin settings", async () => {
|
||||
spawnMock.mockImplementationOnce(() => {
|
||||
const proc = new EventEmitter() as any;
|
||||
proc.stdout = new PassThrough();
|
||||
proc.stderr = new PassThrough();
|
||||
queueMicrotask(() => proc.emit("close", 1));
|
||||
return proc;
|
||||
});
|
||||
|
||||
await probeDroidBinary({ settings: { droidBinaryPath: " /custom/from-settings " } });
|
||||
expect(spawnMock).toHaveBeenCalledWith("/custom/from-settings", ["--version"], expect.anything());
|
||||
});
|
||||
|
||||
it("uses custom binary path", async () => {
|
||||
spawnMock.mockImplementationOnce(() => {
|
||||
const proc = new EventEmitter() as any;
|
||||
@@ -58,4 +71,10 @@ describe("probeDroidBinary", () => {
|
||||
await probeDroidBinary({ binaryPath: "/custom/droid" });
|
||||
expect(spawnMock).toHaveBeenCalledWith("/custom/droid", ["--version"], expect.anything());
|
||||
});
|
||||
|
||||
it("falls back to droid when plugin setting is missing or blank", () => {
|
||||
expect(resolveDroidBinaryPath()).toBe("droid");
|
||||
expect(resolveDroidBinaryPath({})).toBe("droid");
|
||||
expect(resolveDroidBinaryPath({ droidBinaryPath: " " })).toBe("droid");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user